Reputation: 1
I want to build my cross compile tool chain, I build it successful. It can use normally, but when I move it, it cannot work!!
It print error while loading shared libraries: libcloog-isl.so.3
, libcloog-isl
is not install in my host.
I configure the gcc with --disable-shared, but when I run ldd to the cc1 in my cross compile tool chain, I found that ppl, gmp, moc, libgcc_s and some other link to my host library. why it cannot static link into cc1 when I use --disable-shared. I found that Sourcery CodeBench's tool chain can run anywhere, its cc1 not link my host library.
What should I do to static link in cc1 instead of dynamic link host library?
Upvotes: 0
Views: 1549
Reputation: 1819
You may already be aware that the ld command (as well as gcc) will accept the -static option, but you may also need to use -static-libgcc and/or -static-libstdc++ to make sure you are linking statically to all libraries.
Upvotes: 0