mirror of
https://github.com/crosstool-ng/crosstool-ng.git
synced 2025-02-20 17:12:55 +00:00
glibc: configure adding debug symbols in glibc build
After building the cross toolchain and compile a simple C program, objdump reports debug information even though -g modifier was not used. These debug segments are in glibc library and CRT files. So a new config entry: CT_GLIBC_ENABLE_DEBUG was added to control when we want to add debug information to glibc, by default is enabled. Signed-off-by: Guillermo E. Martinez <guillermo.e.martinez@oracle.com>
This commit is contained in:
parent
618affc789
commit
8a1ef66776
@ -172,6 +172,13 @@ config GLIBC_CONFIGPARMS
|
||||
Note: If you need to pass more than one value, separate them with
|
||||
'\n'. Eg.: var1=val1\nvar2=val2
|
||||
|
||||
config GLIBC_ENABLE_DEBUG
|
||||
bool
|
||||
default y
|
||||
prompt "Enable debug symbols"
|
||||
help
|
||||
Compile glibc using -g modifier.
|
||||
|
||||
config GLIBC_EXTRA_CFLAGS
|
||||
string
|
||||
prompt "extra target CFLAGS"
|
||||
|
@ -131,8 +131,12 @@ glibc_backend_once()
|
||||
# Pre-seed the configparms file with values from the config option
|
||||
printf "%s\n" "${CT_GLIBC_CONFIGPARMS}" > configparms
|
||||
|
||||
if [ "${CT_GLIBC_ENABLE_DEBUG}" = "y" ]; then
|
||||
glibc_cflags+=" -g"
|
||||
fi
|
||||
|
||||
# glibc can't be built without -O2 (reference needed!)
|
||||
glibc_cflags+=" -g -O2"
|
||||
glibc_cflags+=" -O2"
|
||||
|
||||
if [ "${CT_GLIBC_ENABLE_COMMON_FLAG}" = "y" ]; then
|
||||
glibc_cflags+=" -fcommon"
|
||||
|
Loading…
x
Reference in New Issue
Block a user