Path: utzoo!utgpu!watserv1!watmath!att!linac!pacific.mps.ohio-state.edu!zaphod.mps.ohio-state.edu!rpi!uupsi!sunic!dkuug!iesd!iesd.auc.dk!fischer From: fischer@iesd.auc.dk (Lars P. Fischer) Newsgroups: comp.sources.wanted Subject: Re: gcc with shared libraries support on suns ? Message-ID: Date: 28 Feb 91 20:00:48 GMT References: <1991Feb26.085859.3812@0B833ZA> Sender: news@iesd.auc.dk Organization: Mathematics and Computer Science, University of Aalborg Lines: 39 In-reply-to: axel@guug.de's message of 26 Feb 91 08:58:59 GMT Axel> is there a version of gcc and g++ with shared library support available Axel> for suns ? For GCC, do the following: cd ...../gnu/lib # where you keep gnu-ld and friends ln -s /bin/ld gcc-dynld Now, call gcc with gcc -bdyn file.c -o file The trick here is that -bxxx makes gcc search for lib files (cpp, ld, etc) with names gcc-xxxXX before gcc-XX. For G++ you are, as yet, out of luck, as Sun's linker does not grok the binaries produced by G++. If you do not use G++, you can install Sun's linker as gcc-ld. If you wan't to use G++ and still avoid the -bdyn stuff, you can make G++ look for file with prefix "g++-" instead of "gcc-". To do this, look for lines like -DSTANDARD_EXEC_PREFIX=\"$(libdir)/gcc-\" in the Makefile and change to -DSTANDARD_EXEC_PREFIX=\"$(libdir)/g++-\" This way, changing the linker for GCC will not affect G++. Note that you will the have to store files like gcc-cpp twice or make g++-cpp a link to gcc-cpp. Currently, I am considering changing the setup, so that the linker for gcc-1.39 is stored in .../gnu/lib/gcc-1.39/ld and so on. This would allow me to have several versions of GCC and, especially, G++, installed at a time. Unfortunately, you have to change the Makefile in quite a number of places for this to work. /Lars -- Lars Fischer, fischer@iesd.auc.dk | Beauty is a French phonetic corruption CS Dept., Univ. of Aalborg, DENMARK. | - FZ