libc/glibc: cleanup CFLAGS handling
author"Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
Wed Dec 28 17:05:46 2011 +0100 (2011-12-28)
changeset 2828e47d17391ae3
parent 2827 f8f2f75ff3fd
child 2829 0c3c95f911ec
libc/glibc: cleanup CFLAGS handling

Signed-off-by: "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
scripts/build/libc/glibc-eglibc.sh-common
     1.1 --- a/scripts/build/libc/glibc-eglibc.sh-common	Tue Dec 27 16:11:34 2011 +0100
     1.2 +++ b/scripts/build/libc/glibc-eglibc.sh-common	Wed Dec 28 17:05:46 2011 +0100
     1.3 @@ -310,17 +310,11 @@
     1.4      cross_cc=$(CT_Which "${CT_TARGET}-gcc")
     1.5      extra_cc_args+=" ${extra_flags}"
     1.6  
     1.7 -    CT_DoLog DEBUG "Using gcc for target    : '${cross_cc}'"
     1.8 -    CT_DoLog DEBUG "Configuring with addons : '$(do_libc_add_ons_list ,)'"
     1.9 -    CT_DoLog DEBUG "Extra config args passed: '${extra_config[*]}'"
    1.10 -    CT_DoLog DEBUG "Extra CC args passed    : '${extra_cc_args}'"
    1.11 -    CT_DoLog DEBUG "Extra flags (multilib)  : '${extra_flags}'"
    1.12 -
    1.13 -    glibc_cflags="${CT_TARGET_CFLAGS} ${CT_LIBC_GLIBC_EXTRA_CFLAGS} ${OPTIMIZE}"
    1.14      case "${CT_LIBC_ENABLE_FORTIFIED_BUILD}" in
    1.15          y)  ;;
    1.16          *)  glibc_cflags+=" -U_FORTIFY_SOURCE";;
    1.17      esac
    1.18 +    glibc_cflags+=" ${CT_TARGET_CFLAGS} ${OPTIMIZE} ${CT_LIBC_GLIBC_EXTRA_CFLAGS}"
    1.19  
    1.20      # ./configure is mislead by our tools override wrapper for bash
    1.21      # so just tell it where the real bash is _on_the_target_!
    1.22 @@ -345,6 +339,12 @@
    1.23      # Run explicitly through CONFIG_SHELL, or the build breaks badly (loop-of-death)
    1.24      # when the shell is not bash... Sigh... :-(
    1.25  
    1.26 +    CT_DoLog DEBUG "Using gcc for target    : '${cross_cc}'"
    1.27 +    CT_DoLog DEBUG "Configuring with addons : '$(do_libc_add_ons_list ,)'"
    1.28 +    CT_DoLog DEBUG "Extra config args passed: '${extra_config[*]}'"
    1.29 +    CT_DoLog DEBUG "Extra CC args passed    : '${glibc_cflags}'"
    1.30 +    CT_DoLog DEBUG "Extra flags (multilib)  : '${extra_flags}'"
    1.31 +
    1.32      CT_DoExecLog CFG                                                \
    1.33      BUILD_CC="${CT_BUILD}-gcc"                                      \
    1.34      CFLAGS="${glibc_cflags}"                                        \