/[gentoo-x86]/sys-libs/glibc/files/eblits/common.eblit
Gentoo

Diff of /sys-libs/glibc/files/eblits/common.eblit

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

Revision 1.19 Revision 1.20
1# Copyright 1999-2011 Gentoo Foundation 1# Copyright 1999-2011 Gentoo Foundation
2# Distributed under the terms of the GNU General Public License v2 2# Distributed under the terms of the GNU General Public License v2
3# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/common.eblit,v 1.19 2011/03/20 21:28:51 vapier Exp $ 3# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/common.eblit,v 1.20 2011/03/20 22:23:47 vapier Exp $
4 4
5# We need to be able to set alternative headers for 5# We need to be able to set alternative headers for
6# compiling for non-native platform 6# compiling for non-native platform
7# Will also become useful for testing kernel-headers without screwing up 7# Will also become useful for testing kernel-headers without screwing up
8# the whole system. 8# the whole system.
44 # when building up just the headers. 44 # when building up just the headers.
45 just_headers && return 0 45 just_headers && return 0
46 46
47 case $(tc-arch) in 47 case $(tc-arch) in
48 x86) 48 x86)
49 # -march needed for #185404 49 # -march needed for #185404 #199334
50 if ! glibc_compile_test "" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n' ; then
50 local t=${CTARGET_OPT:-${CTARGET}} 51 local t=${CTARGET_OPT:-${CTARGET}}
51 t=${t%%-*} 52 t=${t%%-*}
52 if ! echo "" | $(tc-getCC) ${CFLAGS} -E -dD - | grep -qs __${t}__ ; then
53 filter-flags '-march=*' 53 filter-flags '-march=*'
54 export CFLAGS="-march=${t} ${CFLAGS}" 54 export CFLAGS="-march=${t} ${CFLAGS}"
55 fi 55 fi
56 ;; 56 ;;
57 amd64) 57 amd64)
58 # -march needed for #185404 58 # -march needed for #185404 #199334
59 if ! glibc_compile_test "${CFLAGS_x86}" 'void f(int i, void *p) {if (__sync_fetch_and_add(&i, 1)) f(i, p);}\nint main(){return 0;}\n' ; then
59 local t=${CTARGET_OPT:-${CTARGET}} 60 local t=${CTARGET_OPT:-${CTARGET}}
60 t=${t%%-*} 61 t=${t%%-*}
61 if ! echo "" | $(tc-getCC) ${CFLAGS} ${CFLAGS_x86} -m32 -E -dD - | grep -qs __${t}__ ; then
62 filter-flags '-march=*' 62 filter-flags '-march=*'
63 export CFLAGS_x86="${CFLAGS_x86} -march=${t}" 63 export CFLAGS_x86="${CFLAGS_x86} -march=${t}"
64 fi 64 fi
65 ;; 65 ;;
66 ppc) 66 ppc)

Legend:
Removed from v.1.19  
changed lines
  Added in v.1.20

  ViewVC Help
Powered by ViewVC 1.1.20