Closed cthbleachbit closed 3 years ago
The issues in RFC status above are currently resolved as following:
noarch
:
ABSPLITDBG=1
in defines. AB3 will produce a warning message..debug_blah
sections. Such ELF files won't produce debug symbol files.
This PR introduces a new variable for use in
defines
:ABSPLITDBG
. This variable controls whether a separate package should be built to ship debugging symbols. Here are the detailed semantics:great-pack
will produce another deb packagegreat-pack-dbg
with the exact same version whenABSPLITDBG
is specified. This package will contain debug symbols at/usr/lib/debug/.build-id/SH/A256_BUILD_ID.debug
for each of ELF files shipped in the base package. The debug package only depends on the base package with the exact same version to minimize confusion from version mismatch of binaries and their symbols.ABSPLITDBG
has no effect whenABSTRIP
is unset. Since ELFs will retain debug symbols, it makes no sense toABSPLITDBG
. autobuild3 currently produces a warning message and unsetsABSPLITDBG
in this case.ABSPLITDBG
will append-ggdb
toCFLAGS
andCXXFLAGS
so that ELFs built will actually contain meaningful debug symbols.In RFC state:
ABHOST=noarch
cannot contain ELF, thus by extension should never produce a symbol package. Currently autobuild3 does not check against this case and will produce an empty symbol package.noarch
package should always has some sort of ELF file, thus by extension can always produce a debug package.-g
to produce meaningful symbols, but some packages (saybzip2
anddhcp
) are known to ignoreCFLAGS
,CXXFLAGS
and other environment variables. An ELF without debugging symbol can be successfully stripped, but the symbol file produced won't be helpful at all.01-first
,02-second
,03-third
and so on may specify different values forABSPLITDBG
, for02-second
and03-third
to produce meaningful debugging symbols,01-first
must be properly compiled with-g
even when symbol package for01
is not needed.