Gentoo Archives: gentoo-alt

From: Francois Bissey <francois.bissey@×××××××××××××.nz>
To: "gentoo-alt@l.g.o" <gentoo-alt@l.g.o>
Subject: Re: [gentoo-alt] rap experiments
Date: Fri, 20 Jan 2017 08:24:08
Message-Id: F70C7278-0EA5-48C0-90E3-838BDCFA6A80@canterbury.ac.nz
In Reply to: Re: [gentoo-alt] rap experiments by Benda Xu
1 > On 20/01/2017, at 20:57, Benda Xu <heroxbd@g.o> wrote:
2 >
3 > Hi,
4 >
5 > Francois Bissey <francois.bissey@×××××××××××××.nz> writes:
6 >
7 >> Very much like the bootstrapping described in LFS and in line with
8 >> the way IBM does things for its “advanced toolchain” for power7/8.
9 >> I actually have an alternate toolchain provided by IBM the last one
10 >> for SLES11 provides glibc-2.17+gcc-4.8.5+. gcc is patched to find ld64.so.1
11 >> in the right place _and_ a rpath is added at the spec level also.
12 >> Anyway gcc/config/rs6000 is a bit more complicated than the i386 one
13 >> and for some reasons bits are missed by the sed line:
14 >> grep "_DYNAMIC_LINKER." gcc/config/rs6000/linux64.h
15 >> #define GLIBC_DYNAMIC_LINKER32 "/shared/work_no_backup/ppc64-prefix/lib/ld.so.1"
16 >> #define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv1:/lib64/ld64.so.1;:/lib64/ld64.so.2}” <==
17 >> #define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv2:/lib64/ld64.so.2;:/lib64/ld64.so.1}” <==
18 >> #define UCLIBC_DYNAMIC_LINKER32 "/shared/work_no_backup/ppc64-prefix/lib/ld-uClibc.so.0"
19 >> #define UCLIBC_DYNAMIC_LINKER64 "/shared/work_no_backup/ppc64-prefix/lib/ld64-uClibc.so.0"
20 >> #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}"
21 >> #define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}"
22 >> #define GNU_USER_DYNAMIC_LINKER32 \
23 >> CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32)
24 >> #define GNU_USER_DYNAMIC_LINKER64 \
25 >> CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64)
26 >> -dynamic-linker " GNU_USER_DYNAMIC_LINKER32 "}}"
27 >> -dynamic-linker " GNU_USER_DYNAMIC_LINKER64 "}}”
28 >> That explains a lot.
29 >
30 > Yeah, the present sed phrase
31 > "s,(_DYNAMIC_LINKER.*\")(/lib),\1${EPREFIX}\2," does not capture
32 >
33 > #define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv1:/lib64/ld64.so.1;:/lib64/ld64.so.2}”
34 >
35 > We should write it
36 >
37 > "/_DYNAMIC_LINKER/s,([\":])(/lib),\1${EPREFIX}\2,g"
38 >
39 > instead probably.
40 >
41
42 I am in favour of adding another phrase, I think the one you are suggesting
43 would only do
44 #define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv1:${EPREFIX}/lib64/ld64.so.1;:/lib64/ld64.so.2}”
45 and leave the second instance on the same line alone. Ideally the second phrase
46 would produce something like
47 #define GLIBC_DYNAMIC_LINKER64 "${EPREFIX}%{mabi=elfv1:/lib64/ld64.so.1;:/lib64/ld64.so.2}”
48 '%{mabi=elfv' only appears in that file so that’s a good candidate.
49
50 François

Replies

Subject Author
Re: [gentoo-alt] rap experiments "François Bissey" <francois.bissey@×××××××××××××.nz>