возвращает флаги сборки для использования во время сборки пакета (returns build flags to use during package build)
Команды (Commands)
--dump
Print to standard output all compilation flags and their
values. It prints one flag per line separated from its
value by an equal sign ('flag=value'). This is the default
action.
--list
Print the list of flags supported by the current vendor
(one per line). See the SUPPORTED FLAGS
section for more
information about them.
--status
Display any information that can be useful to explain the
behaviour of dpkg-buildflags
(since dpkg 1.16.5): relevant
environment variables, current vendor, state of all
feature flags. Also print the resulting compiler flags
with their origin.
This is intended to be run from debian/rules
, so that the
build log keeps a clear trace of the build flags used.
This can be useful to diagnose problems related to them.
--export=
format
Print to standard output commands that can be used to
export all the compilation flags for some particular tool.
If the format value is not given, sh
is assumed. Only
compilation flags starting with an upper case character
are included, others are assumed to not be suitable for
the environment. Supported formats:
sh
Shell commands to set and export all the
compilation flags in the environment. The flag
values are quoted so the output is ready for
evaluation by a shell.
cmdline
Arguments to pass to a build program's command line
to use all the compilation flags (since dpkg
1.17.0). The flag values are quoted in shell
syntax.
configure
This is a legacy alias for cmdline
.
make
Make directives to set and export all the
compilation flags in the environment. Output can be
written to a makefile fragment and evaluated using
an include
directive.
--get
flag
Print the value of the flag on standard output. Exits with
0 if the flag is known otherwise exits with 1.
--origin
flag
Print the origin of the value that is returned by --get
.
Exits with 0 if the flag is known otherwise exits with 1.
The origin can be one of the following values:
vendor
the original flag set by the vendor is returned;
system
the flag is set/modified by a system-wide
configuration;
user
the flag is set/modified by a user-specific
configuration;
env
the flag is set/modified by an environment-specific
configuration.
--query
Print any information that can be useful to explain the
behaviour of the program: current vendor, relevant
environment variables, feature areas, state of all feature
flags, and the compiler flags with their origin (since
dpkg 1.19.0).
For example:
Vendor: Debian
Environment:
DEB_CFLAGS_SET=-O0 -Wall
Area: qa
Features:
bug=no
canary=no
Area: reproducible
Features:
timeless=no
Flag: CFLAGS
Value: -O0 -Wall
Origin: env
Flag: CPPFLAGS
Value: -D_FORTIFY_SOURCE=2
Origin: vendor
--query-features
area
Print the features enabled for a given area (since dpkg
1.16.2). The only currently recognized areas on Debian
and derivatives are future
, qa
, reproducible
, sanitize
and
hardening
, see the FEATURE AREAS
section for more details.
Exits with 0 if the area is known otherwise exits with 1.
The output is in RFC822 format, with one section per
feature. For example:
Feature: pie
Enabled: yes
Feature: stackprotector
Enabled: yes
--help
Show the usage message and exit.
--version
Show the version and exit.