Date: Tue, 27 Jan 1998 18:52:17 -0800 From: John Polstra <jdp@polstra.com> To: roberto@keltia.freenix.fr Cc: current@FreeBSD.ORG Subject: Re: Building EGCS. What am I missing? Message-ID: <199801280252.SAA27219@austin.polstra.com> In-Reply-To: <19980127084505.42012@keltia.freenix.fr> References: <19980127002052.38606@keltia.freenix.fr> <Pine.BSF.3.96.980126173228.235P-100000@zippy.dyn.ml.org> <19980127084505.42012@keltia.freenix.fr>
next in thread | previous in thread | raw e-mail | index | archive | help
In article <19980127084505.42012@keltia.freenix.fr>, Ollivier Robert <roberto@keltia.freenix.fr> wrote: > According to Alex: > > I tried that, and it built just fine. However, I can't seem to get it to > > make shared libraries at all :/ I've mucked around with switching to ELF, > > You probably get the same error as I do: > > /opt/egcs/bin/gcc -fpic -DPIC -O -pipe -DLIBC_SCCS -I/usr/src/lib/libkvm/../../sys -c /src/src/lib/libkvm/kvm_proc.c -o kvm_proc.so > building shared kvm library (version 2.0) > ld: No reference to __DYNAMIC > collect2: ld returned 1 exit status > *** Error code 1 You folks are having problems building shared libraries with egcs for the simple reason that it is broken currently. As I wrote when I committed the port, it is just a beginning. There are a lot of FreeBSD related patches that need to be put in. For this particular case, it's most likely a problem with the LINKER_SPEC or whatever it's called. This didn't used to work for our native gcc, either, until I fixed it. Probably building shared libraries by hand with "ld -Bshareable /usr/lib/c++rt0.o *.so ..." will work OK. The problem just affects "gcc -shared". John -- John Polstra jdp@polstra.com John D. Polstra & Co., Inc. Seattle, Washington USA "Self-knowledge is always bad news." -- John Barth
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199801280252.SAA27219>