1 |
On Fri, 2015-11-13 at 13:16 +0100, Peter Stuge wrote: |
2 |
> Joakim Tjernlund wrote: |
3 |
> > > cross toolchains cannot use ASAN today: |
4 |
> > > powerpc-g2.20-linux-gnu-gcc -fsanitize=address mmap.c |
5 |
> > > /usr/libexec/gcc/powerpc-g2.20-linux-gnu/ld: warning: libstdc++.so.6, needed by /usr/lib/gcc/powerpc- |
6 |
> > > g2.20- |
7 |
> > > linux-gnu/4.9.3/libasan.so, not found (try using -rpath or -rpath-link) |
8 |
> > |
9 |
> > hmm, there is a libstdc++.so.6 which will work to link with under: |
10 |
> > /usr/lib64/gcc/powerpc-g2.20-linux-gnu/4.9.3/libstdc++.so.6 |
11 |
> > But powerpc-g2.20-linux-gnu-gcc cannot find it there, stracing gcc |
12 |
> > one can see: |
13 |
> > |
14 |
> > [pid 3860] open("/usr/powerpc-g2.20-linux-gnu/... |
15 |
> |
16 |
> Is /usr/powerpc-g2.20-linux-gnu the sysroot? |
17 |
Yes |
18 |
|
19 |
> If yes, why is libstdc++.so.6 not in there? |
20 |
|
21 |
I think it is because cross-powerpc-g2.20-linux-gnu/glibc is special, it is not |
22 |
the real/whole glibc, just the stuff needed x-compile. |
23 |
But as there is and /usr/lib64/gcc/powerpc-g2.20-linux-gnu/4.9.3/libstdc++.so.6 gcc |
24 |
shoudl look there? libasan.so.1 lives there also. |
25 |
|
26 |
Speaking of libasan.so, it has an odd runpath: |
27 |
0x0000001d (RUNPATH) Library runpath: [/usr/powerpc-g2.20-linux-gnu/lib/../lib] |
28 |
|
29 |
My host has(amd64): |
30 |
0x000000000000001d (RUNPATH) Library runpath: [/usr/lib/../lib64] |
31 |
|
32 |
Jocke |
33 |
|
34 |
> If no, why is gcc looking there? |
35 |
> |
36 |
> |
37 |
> //Peter |
38 |
> |