Static linked GCC toolchain

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Hi,

I am trying to build gcc 3.4.5 on RedHat 7.1 so that I can use it on following different platforms:
RH 7.1, RH7.3, RH8, RH9, RHEL2.1 RHEL4.0, FC2, FC3,etc

My requirement is to use gcc without setting LD_LIBRARY_PATH to location of libgcc_s.so on different platform as mentioned above. I don't want application binaries which are generated/created as statically linked executables by these toolchain default.

To create statically linked gcc toolchain , I tried to build gcc by executing following commands: # LDFLAGS=-static ../gcc-3.4.5/configure --prefix=/home/praks/GCC345 --enable-languages=c,c++,java
#make LDFLAGS=-static bootstrap && make LDFLAGS=-static

But it creates gcc which is dependent on  libgcc_s.so
-----------------------------------------------------
(praks) bin> ./gcc
./gcc: error while loading shared libraries: libgcc_s.so.1: cannot load shared object file: No such file or directory
(praks) bin> ldd ./gcc
       libgcc_s.so.1 => not found
       libc.so.6 => /lib/i686/libc.so.6 (0x40023000)
       /lib/ld-linux.so.2 => /lib/ld-linux.so.2 (0x40000000)
(praks) bin>
-----------------------------------------------------

However, GCC configure script supports --enable-static && --enable-shared. With help of these flags we can build gcc toolchain statically linked. But binaries which are generated by these toolchain are statically linked executables. I want only statically gcc linked toolchain & I want to use this gcc toolchain on different platforms as mentioned earlier. It would be nice if anyone could give pointers.

Regards,
Prakash


DISCLAIMER
==========
This e-mail may contain privileged and confidential information which is the property of Persistent Systems Pvt. Ltd. It is intended only for the use of the individual or entity to which it is addressed. If you are not the intended recipient, you are not authorized to read, retain, copy, print, distribute or use this message. If you have received this communication in error, please notify the sender and delete all copies of this message. Persistent Systems Pvt. Ltd. does not accept any liability for virus infected mails.

[Index of Archives]     [Linux C Programming]     [Linux Kernel]     [eCos]     [Fedora Development]     [Fedora Announce]     [Autoconf]     [The DWARVES Debugging Tools]     [Yosemite Campsites]     [Yosemite News]     [Linux GCC]

  Powered by Linux