1 |
On Tuesday, January 04, 2011 17:12:58 Patrice Tisserand wrote: |
2 |
> On 01/04/2011 07:59 PM, Mike Frysinger wrote: |
3 |
> > On Tuesday, January 04, 2011 04:02:59 Patrice Tisserand wrote: |
4 |
> >> Does adding -L /tmp/target_root/lib -L /tmp/target_root/usr/lib |
5 |
> >> -Wl,-rpath-link,/tmp/target_root/lib |
6 |
> >> -Wl,-rpath-link,/tmp/target_root/usr/lib to LDFLAGS could not be an |
7 |
> >> alternative ? |
8 |
> > |
9 |
> > no. that's broken by design. |
10 |
> |
11 |
> Thanks for your answer, I have found the following sentence in gentoo |
12 |
> embedded handbook: |
13 |
> """The common convention is to use your /usr/CTARGET/ tree as your |
14 |
> sysroot as the include/library directories in this tree are already |
15 |
> encoded into the gcc cross-compiler for searching. You could use another |
16 |
> directory and then add custom -I/-L paths to your CPPFLAGS/LDFLAGS, but |
17 |
> this has historically proven to be problematic. Yes, it works most of |
18 |
> the time, but the corner cases are why this method is discouraged. In |
19 |
> the embedded handbook, we'll assume you're using the sysroot as your |
20 |
> development ROOT. |
21 |
> """ |
22 |
> Do you know where I can find references about these corner cases ? |
23 |
|
24 |
perhaps ive cited examples on this list in the past, but i dont recall. i'll |
25 |
just refer to Bug 347489 and mention the same issue with like |
26 |
curses/bash/screen off the top of my head. |
27 |
|
28 |
> Also how can I handle creating 2 different target rootfs with different |
29 |
> libraries versions but using the same cross-compilation toolchain? |
30 |
> Do I need to duplicate environment or is there some tips ? |
31 |
|
32 |
i dont know why you'd do this, but the cleanest approach today would be to |
33 |
create a new cross-compiler toolchain with a slightly different vendor so you |
34 |
get unique paths. i imagine it'd be possible to also take the default gcc |
35 |
specs, tweak the sysroot arg in it, and export the GCC_SPECS env var, but it |
36 |
could get messy as you'd have to remember what you have your env set to. |
37 |
-mike |