diff options
author | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2011-11-21 23:33:08 +0100 |
---|---|---|
committer | Yann E. MORIN" <yann.morin.1998@anciens.enib.fr> | 2011-11-21 23:33:08 +0100 |
commit | 2d5dc881e356ee44053b716a4e10a7eec0c1c60e (patch) | |
tree | cda0e53247742358aed163b2005a59dc160ff2c3 | |
parent | d6f8cd9b0a714fc22fc1ddd200fb0e4047708df9 (diff) | |
download | crosstool-ng-2d5dc881e356ee44053b716a4e10a7eec0c1c60e.tar.gz crosstool-ng-2d5dc881e356ee44053b716a4e10a7eec0c1c60e.tar.bz2 crosstool-ng-2d5dc881e356ee44053b716a4e10a7eec0c1c60e.zip |
libc/glibc: add extra CFLAGS when building the C library
When building multilib, we need extra CFLAGS that tell the compiler
to use non-default settings (eg. big/little endian, hard/soft float,
-march/cpu/tune flags, and so on...).
We have to pass these flags to the build.
Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
-rw-r--r-- | scripts/build/libc/glibc-eglibc.sh-common | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/scripts/build/libc/glibc-eglibc.sh-common b/scripts/build/libc/glibc-eglibc.sh-common index dba9a761..0748bb95 100644 --- a/scripts/build/libc/glibc-eglibc.sh-common +++ b/scripts/build/libc/glibc-eglibc.sh-common @@ -68,8 +68,10 @@ do_libc() { # Usage: do_libc_backend param=value [...] # Parameter : Definition : Type : Default # libc_mode : 'startfiles' or 'final' : string : (none) +# extra_flags : Extra CFLAGS to use (for multilib) : string : (empty) do_libc_backend() { local libc_mode + local extra_flags local src_dir="${CT_SRC_DIR}/${CT_LIBC}-${CT_LIBC_VERSION}" local extra_cc_args local -a extra_config @@ -169,11 +171,13 @@ do_libc_backend() { printf "${CT_LIBC_GLIBC_CONFIGPARMS}\n" > configparms cross_cc=$(CT_Which "${CT_TARGET}-gcc") + extra_cc_args+=" ${extra_flags}" CT_DoLog DEBUG "Using gcc for target: '${cross_cc}'" CT_DoLog DEBUG "Configuring with addons : '$(do_libc_add_ons_list ,)'" CT_DoLog DEBUG "Extra config args passed: '${extra_config[*]}'" CT_DoLog DEBUG "Extra CC args passed : '${extra_cc_args}'" + CT_DoLog DEBUG "Extra flags (multilib) : '${extra_flags}'" glibc_cflags="${CT_TARGET_CFLAGS} ${CT_LIBC_GLIBC_EXTRA_CFLAGS} ${OPTIMIZE}" case "${CT_LIBC_ENABLE_FORTIFIED_BUILD}" in |