summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2007-11-18 03:28:02 +0000
committerMike Frysinger <vapier@gentoo.org>2007-11-18 03:28:02 +0000
commit2d291b206a69b9fe3b70149b115ab5962f8c6cc7 (patch)
treeb2b22d9993b2af8108e625c25160e595d6150c91 /sys-libs
parentPull in linux/types.h in linux/mroute.h. (diff)
downloadgentoo-2-2d291b206a69b9fe3b70149b115ab5962f8c6cc7.tar.gz
gentoo-2-2d291b206a69b9fe3b70149b115ab5962f8c6cc7.tar.bz2
gentoo-2-2d291b206a69b9fe3b70149b115ab5962f8c6cc7.zip
check user CFLAGS so that we force -march= to match $CHOST
(Portage version: 2.1.3.19)
Diffstat (limited to 'sys-libs')
-rw-r--r--sys-libs/glibc/files/eblits/common.eblit16
1 files changed, 9 insertions, 7 deletions
diff --git a/sys-libs/glibc/files/eblits/common.eblit b/sys-libs/glibc/files/eblits/common.eblit
index be1a05376443..a6afdc245031 100644
--- a/sys-libs/glibc/files/eblits/common.eblit
+++ b/sys-libs/glibc/files/eblits/common.eblit
@@ -1,6 +1,6 @@
# Copyright 1999-2007 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.4 2007/10/10 19:52:07 vapier Exp $
+# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/common.eblit,v 1.5 2007/11/18 03:28:02 vapier Exp $
# We need to be able to set alternative headers for
# compiling for non-native platform
@@ -71,10 +71,11 @@ setup_flags() {
case $(tc-arch) in
x86)
# -march needed for #185404
- if ! echo "" | $(tc-getCC) -E -dD - | grep -qs __i686__ ; then
+ local t=${CTARGET_OPT:-${CTARGET}}
+ t=${t%%-*}
+ if ! echo "" | $(tc-getCC) ${CFLAGS} -E -dD - | grep -qs __${t}__ ; then
filter-flags '-march=*'
- local t=${CTARGET_OPT:-${CTARGET}}
- export CFLAGS="-march=${t%%-*} ${CFLAGS}"
+ export CFLAGS="-march=${t} ${CFLAGS}"
fi
;;
amd64)
@@ -82,10 +83,11 @@ setup_flags() {
CFLAGS_x86="-m32"
# -march needed for #185404
- if ! echo "" | $(tc-getCC) -m32 -E -dD - | grep -qs __i686__ ; then
+ local t=${CTARGET_OPT:-${CTARGET}}
+ t=${t%%-*}
+ if ! echo "" | $(tc-getCC) ${CFLAGS} ${CFLAGS_x86} -m32 -E -dD - | grep -qs __${t}__ ; then
filter-flags '-march=*'
- local t=${CTARGET_OPT:-${CTARGET}}
- export CFLAGS_x86="${CFLAGS_x86} -march=${t%%-*}"
+ export CFLAGS_x86="${CFLAGS_x86} -march=${t}"
fi
;;
ppc)