Gentoo Archives: gentoo-commits

From: "Mike Frysinger (vapier)" <vapier@g.o>
To: gentoo-commits@l.g.o
Subject: [gentoo-commits] gentoo-x86 commit in sys-libs/glibc/files/eblits: common.eblit
Date: Sat, 30 May 2015 04:31:03
Message-Id: 20150530043058.747F6A07@oystercatcher.gentoo.org
1 vapier 15/05/30 04:30:58
2
3 Modified: common.eblit
4 Log:
5 Fix -march setting when building x86 multilib on x86_64 #528708 by devsk. Also note some future work related to bootstrapping here.
6
7 (Portage version: 2.2.20/cvs/Linux x86_64, signed Manifest commit with key D2E96200)
8
9 Revision Changes Path
10 1.46 sys-libs/glibc/files/eblits/common.eblit
11
12 file : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/glibc/files/eblits/common.eblit?rev=1.46&view=markup
13 plain: http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/glibc/files/eblits/common.eblit?rev=1.46&content-type=text/plain
14 diff : http://sources.gentoo.org/viewvc.cgi/gentoo-x86/sys-libs/glibc/files/eblits/common.eblit?r1=1.45&r2=1.46
15
16 Index: common.eblit
17 ===================================================================
18 RCS file: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/common.eblit,v
19 retrieving revision 1.45
20 retrieving revision 1.46
21 diff -u -r1.45 -r1.46
22 --- common.eblit 18 Oct 2014 23:09:51 -0000 1.45
23 +++ common.eblit 30 May 2015 04:30:58 -0000 1.46
24 @@ -1,6 +1,6 @@
25 -# Copyright 1999-2014 Gentoo Foundation
26 +# Copyright 1999-2015 Gentoo Foundation
27 # Distributed under the terms of the GNU General Public License v2
28 -# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/common.eblit,v 1.45 2014/10/18 23:09:51 vapier Exp $
29 +# $Header: /var/cvsroot/gentoo-x86/sys-libs/glibc/files/eblits/common.eblit,v 1.46 2015/05/30 04:30:58 vapier Exp $
30
31 alt_prefix() {
32 is_crosscompile && echo /usr/${CTARGET}
33 @@ -58,6 +58,13 @@
34 case $(tc-arch) in
35 x86)
36 # -march needed for #185404 #199334
37 + # TODO: When creating the first glibc cross-compile, this test will
38 + # always fail as it does a full link which in turn requires glibc.
39 + # Probably also applies when changing multilib profile settings (e.g.
40 + # enabling x86 when the profile was amd64-only previously).
41 + # We could change main to _start and pass -nostdlib here so that we
42 + # only test the gcc code compilation. Or we could do a compile and
43 + # then look for the symbol via scanelf.
44 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' 2>/dev/null ; then
45 local t=${CTARGET_OPT:-${CTARGET}}
46 t=${t%%-*}
47 @@ -68,9 +75,15 @@
48 ;;
49 amd64)
50 # -march needed for #185404 #199334
51 + # Note: This test only matters when the x86 ABI is enabled, so we could
52 + # optimize a bit and elide it.
53 + # TODO: See cross-compile issues listed above for x86.
54 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' 2>/dev/null ; then
55 local t=${CTARGET_OPT:-${CTARGET}}
56 t=${t%%-*}
57 + # Normally the target is x86_64-xxx, so turn that into the -march that
58 + # gcc actually accepts. #528708
59 + [[ ${t} == "x86_64" ]] && t="x86-64"
60 filter-flags '-march=*'
61 # ugly, ugly, ugly. ugly.
62 CFLAGS_x86=$(CFLAGS=${CFLAGS_x86} filter-flags '-march=*'; echo "${CFLAGS}")