Compilation using non-primary libc (e.g. eglibc, uClibc)
I am working in an embedded environment. I have a cross-compiler for the ARM architecture with
as the primary library (i.e. the default
that comes with the toolchain). Now I want some of the apps to link to
. So I compiled
with this toolchain. Now, trying to compile and link the application with
, an error occurs. It has to do with the default library in the toolchain. I think there could be two different libcs on the same computer (e.g. libc, uClibc).
I searched the net and came up with the following
As I said, I did the following
$arm-unknown-linux-gnueabi-gcc -c test.c -o TEST $arm-linux-gnueabi-gcc TEST -o dynamic_test_with_new_opts -Wl,rpath=/home/user/UCLIBC/uClibc-0.9.32.1/INSTALL-DIR/usr/arm-linux-uclibc/lib -Wl,-dynamic-linker=/home/user/UCLIBC/uClibc-0.9.32.1/INSTALL-DIR/usr/arm-linux-uclibc/lib/ld-uClibc.so.0
In this case, it binds to the default
As stated above, I even tried the following:
$arm-unknown-linux-gnueabi-gcc -Xlinker -rpath=/home/user/UCLIBC/uClibc-0.9.32.1/INSTALL-DIR/usr/arm-linux-uclibc/lib -Xlinker -I/home/user/UCLIBC/uClibc-0.9.32.1/INSTALL-DIR/usr/arm-linux-uclibc/lib/ld-uClibc-0.9.32.1.so test.c -o dynamic_test_with_linker_options
In this case it is also associated with the default
Where am I going wrong? I am really stuck with this. Can someone shed some light?
source to share