1 |
On 20/01/17 21:24, Francois Bissey wrote: |
2 |
> |
3 |
>> On 20/01/2017, at 20:57, Benda Xu <heroxbd@g.o> wrote: |
4 |
>> |
5 |
>> Hi, |
6 |
>> |
7 |
>> Francois Bissey <francois.bissey@×××××××××××××.nz> writes: |
8 |
>> |
9 |
>>> Very much like the bootstrapping described in LFS and in line with |
10 |
>>> the way IBM does things for its “advanced toolchain” for power7/8. |
11 |
>>> I actually have an alternate toolchain provided by IBM the last one |
12 |
>>> for SLES11 provides glibc-2.17+gcc-4.8.5+. gcc is patched to find ld64.so.1 |
13 |
>>> in the right place _and_ a rpath is added at the spec level also. |
14 |
>>> Anyway gcc/config/rs6000 is a bit more complicated than the i386 one |
15 |
>>> and for some reasons bits are missed by the sed line: |
16 |
>>> grep "_DYNAMIC_LINKER." gcc/config/rs6000/linux64.h |
17 |
>>> #define GLIBC_DYNAMIC_LINKER32 "/shared/work_no_backup/ppc64-prefix/lib/ld.so.1" |
18 |
>>> #define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv1:/lib64/ld64.so.1;:/lib64/ld64.so.2}” <== |
19 |
>>> #define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv2:/lib64/ld64.so.2;:/lib64/ld64.so.1}” <== |
20 |
>>> #define UCLIBC_DYNAMIC_LINKER32 "/shared/work_no_backup/ppc64-prefix/lib/ld-uClibc.so.0" |
21 |
>>> #define UCLIBC_DYNAMIC_LINKER64 "/shared/work_no_backup/ppc64-prefix/lib/ld64-uClibc.so.0" |
22 |
>>> #define CHOOSE_DYNAMIC_LINKER(G, U) "%{mglibc:" G ";:" U "}" |
23 |
>>> #define CHOOSE_DYNAMIC_LINKER(G, U) "%{muclibc:" U ";:" G "}" |
24 |
>>> #define GNU_USER_DYNAMIC_LINKER32 \ |
25 |
>>> CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER32, UCLIBC_DYNAMIC_LINKER32) |
26 |
>>> #define GNU_USER_DYNAMIC_LINKER64 \ |
27 |
>>> CHOOSE_DYNAMIC_LINKER (GLIBC_DYNAMIC_LINKER64, UCLIBC_DYNAMIC_LINKER64) |
28 |
>>> -dynamic-linker " GNU_USER_DYNAMIC_LINKER32 "}}" |
29 |
>>> -dynamic-linker " GNU_USER_DYNAMIC_LINKER64 "}}” |
30 |
>>> That explains a lot. |
31 |
>> |
32 |
>> Yeah, the present sed phrase |
33 |
>> "s,(_DYNAMIC_LINKER.*\")(/lib),\1${EPREFIX}\2," does not capture |
34 |
>> |
35 |
>> #define GLIBC_DYNAMIC_LINKER64 "%{mabi=elfv1:/lib64/ld64.so.1;:/lib64/ld64.so.2}” |
36 |
>> |
37 |
>> We should write it |
38 |
>> |
39 |
>> "/_DYNAMIC_LINKER/s,([\":])(/lib),\1${EPREFIX}\2,g" |
40 |
>> |
41 |
|
42 |
Your phrase works :) My feeble attempt with mine didn't. |
43 |
gcc is merged and emerge is still going. |
44 |
|
45 |
Francois |