Baking linker flags into generated cross-ld

CT-NG crosstoolng@mrblade.de
Sun Feb 10 15:01:00 GMT 2013


 Hi,

I built a tool-chain for a ARM device with kernel 2.6.32.12 on a x86_x64 linux
machine.
Because the target's glibc is quite old (2.5) and I want the newest g++ I
decided to use a newer glibc when building the cross gcc and use that also on
the target system for all binaries I built with the cross-toolchain.
After building everything and copying the sysroot and debugroot folders to the
target I am only able to run i.e. gdb if I chroot it...this make sense, since it
is compiled against the newer glibc and does use some features from it.
Also if I now build programs with this toolchain I have to run them chroot'ed or
I can add the --rpath=... and --dynamic-linker=... options to the ld.
This works but has two disadvantages:
- I have to modify all builds to add those two arguments
- The gdb built by crosstool-ng still has to be run chroot'ed.

My idea now is to "bake" those two arguments (--rpath & --dynamic-linker)
somehow into the cross-ld so they are active automatically without specifying
them.
This would ease everything dramatically.

Is this possible?

I tried setting ct-ng menuconfig -> Target options -> Target LDFLAGS but this
leads to
checking dynamic linker characteristics... configure: error: Link tests are not
allowed after GCC_NO_EXECUTABLES.

Any suggestions?

Regards,

Rüdiger

--
For unsubscribe information see http://sourceware.org/lists.html#faq



More information about the crossgcc mailing list