From owner-freebsd-current Tue Jan 27 18:52:28 1998 Return-Path: Received: (from majordom@localhost) by hub.freebsd.org (8.8.8/8.8.8) id SAA20303 for current-outgoing; Tue, 27 Jan 1998 18:52:28 -0800 (PST) (envelope-from owner-freebsd-current@FreeBSD.ORG) Received: from austin.polstra.com (austin.polstra.com [206.213.73.10]) by hub.freebsd.org (8.8.8/8.8.8) with ESMTP id SAA20298 for ; Tue, 27 Jan 1998 18:52:25 -0800 (PST) (envelope-from jdp@austin.polstra.com) Received: from austin.polstra.com (jdp@localhost) by austin.polstra.com (8.8.8/8.8.8) with ESMTP id SAA27219; Tue, 27 Jan 1998 18:52:17 -0800 (PST) (envelope-from jdp) Message-Id: <199801280252.SAA27219@austin.polstra.com> To: roberto@keltia.freenix.fr Subject: Re: Building EGCS. What am I missing? In-Reply-To: <19980127084505.42012@keltia.freenix.fr> References: <19980127002052.38606@keltia.freenix.fr> <19980127084505.42012@keltia.freenix.fr> Organization: Polstra & Co., Seattle, WA Cc: current@FreeBSD.ORG Date: Tue, 27 Jan 1998 18:52:17 -0800 From: John Polstra Sender: owner-freebsd-current@FreeBSD.ORG Precedence: bulk In article <19980127084505.42012@keltia.freenix.fr>, Ollivier Robert 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