diff options
author | Mike Frysinger <vapier@gentoo.org> | 2011-03-10 08:04:16 +0000 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2011-03-10 08:04:16 +0000 |
commit | 262059a36cb9e150b96dce766dce52535d8c8fa8 (patch) | |
tree | c2937dd5368cdec54804695830e32b0f769569d0 /sys-libs | |
parent | QA: Removed unneeded VIRTUALX_REQUIRED (diff) | |
download | gentoo-2-262059a36cb9e150b96dce766dce52535d8c8fa8.tar.gz gentoo-2-262059a36cb9e150b96dce766dce52535d8c8fa8.tar.bz2 gentoo-2-262059a36cb9e150b96dce766dce52535d8c8fa8.zip |
Split out the target-specific flag munging into its own func to make the common logic easier to understand, and skip it altogether for headers targets since we wont have a compiler which can accept the flags in the first place.
(Portage version: 2.2.0_alpha26/cvs/Linux x86_64)
Diffstat (limited to 'sys-libs')
-rw-r--r-- | sys-libs/glibc/ChangeLog | 7 | ||||
-rw-r--r-- | sys-libs/glibc/files/eblits/common.eblit | 66 |
2 files changed, 43 insertions, 30 deletions
diff --git a/sys-libs/glibc/ChangeLog b/sys-libs/glibc/ChangeLog index d5c4cdccc592..f66f5cd4db36 100644 --- a/sys-libs/glibc/ChangeLog +++ b/sys-libs/glibc/ChangeLog @@ -1,6 +1,11 @@ # ChangeLog for sys-libs/glibc # Copyright 1999-2011 Gentoo Foundation; Distributed under the GPL v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/ChangeLog,v 1.756 2011/03/10 07:35:38 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/ChangeLog,v 1.757 2011/03/10 08:04:16 vapier Exp $ + + 10 Mar 2011; Mike Frysinger <vapier@gentoo.org> files/eblits/common.eblit: + Split out the target-specific flag munging into its own func to make the + common logic easier to understand, and skip it altogether for headers targets + since we wont have a compiler which can accept the flags in the first place. 10 Mar 2011; Mike Frysinger <vapier@gentoo.org> files/eblits/common.eblit: Handle "default" ABI for sparc64 targets without falling back to a sparc32 diff --git a/sys-libs/glibc/files/eblits/common.eblit b/sys-libs/glibc/files/eblits/common.eblit index b2472e162218..25ae8d88f279 100644 --- a/sys-libs/glibc/files/eblits/common.eblit +++ b/sys-libs/glibc/files/eblits/common.eblit @@ -1,6 +1,6 @@ # Copyright 1999-2011 Gentoo Foundation # Distributed under the terms of the GNU General Public License v2 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/common.eblit,v 1.15 2011/03/10 07:35:38 vapier Exp $ +# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/common.eblit,v 1.16 2011/03/10 08:04:16 vapier Exp $ # We need to be able to set alternative headers for # compiling for non-native platform @@ -39,34 +39,10 @@ alt_usrlibdir() { fi } -setup_flags() { - # Make sure host make.conf doesn't pollute us - if is_crosscompile || tc-is-cross-compiler ; then - CHOST=${CTARGET} strip-unsupported-flags - fi - - # Store our CFLAGS because it's changed depending on which CTARGET - # we are building when pulling glibc on a multilib profile - CFLAGS_BASE=${CFLAGS_BASE-${CFLAGS}} - CFLAGS=${CFLAGS_BASE} - CXXFLAGS_BASE=${CXXFLAGS_BASE-${CXXFLAGS}} - CXXFLAGS=${CXXFLAGS_BASE} - ASFLAGS_BASE=${ASFLAGS_BASE-${ASFLAGS}} - ASFLAGS=${ASFLAGS_BASE} - - # Over-zealous CFLAGS can often cause problems. What may work for one - # person may not work for another. To avoid a large influx of bugs - # relating to failed builds, we strip most CFLAGS out to ensure as few - # problems as possible. - strip-flags - strip-unsupported-flags - filter-flags -m32 -m64 -mabi=* - - unset CBUILD_OPT CTARGET_OPT - if has_multilib_profile ; then - CTARGET_OPT=$(get_abi_CTARGET) - [[ -z ${CTARGET_OPT} ]] && CTARGET_OPT=$(get_abi_CHOST) - fi +setup_target_flags() { + # This largely mucks with compiler flags. None of which should matter + # when building up just the headers. + just_headers && return 0 case $(tc-arch) in x86) @@ -155,6 +131,38 @@ setup_flags() { fi ;; esac +} + +setup_flags() { + # Make sure host make.conf doesn't pollute us + if is_crosscompile || tc-is-cross-compiler ; then + CHOST=${CTARGET} strip-unsupported-flags + fi + + # Store our CFLAGS because it's changed depending on which CTARGET + # we are building when pulling glibc on a multilib profile + CFLAGS_BASE=${CFLAGS_BASE-${CFLAGS}} + CFLAGS=${CFLAGS_BASE} + CXXFLAGS_BASE=${CXXFLAGS_BASE-${CXXFLAGS}} + CXXFLAGS=${CXXFLAGS_BASE} + ASFLAGS_BASE=${ASFLAGS_BASE-${ASFLAGS}} + ASFLAGS=${ASFLAGS_BASE} + + # Over-zealous CFLAGS can often cause problems. What may work for one + # person may not work for another. To avoid a large influx of bugs + # relating to failed builds, we strip most CFLAGS out to ensure as few + # problems as possible. + strip-flags + strip-unsupported-flags + filter-flags -m32 -m64 -mabi=* + + unset CBUILD_OPT CTARGET_OPT + if has_multilib_profile ; then + CTARGET_OPT=$(get_abi_CTARGET) + [[ -z ${CTARGET_OPT} ]] && CTARGET_OPT=$(get_abi_CHOST) + fi + + setup_target_flags if [[ -n ${CTARGET_OPT} && ${CBUILD} == ${CHOST} ]] && ! is_crosscompile; then CBUILD_OPT=${CTARGET_OPT} |