From owner-freebsd-hackers Wed Sep 11 13:55:02 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id NAA29584 for hackers-outgoing; Wed, 11 Sep 1996 13:55:02 -0700 (PDT) Received: from mail.cs.utexas.edu (root@mail.cs.utexas.edu [128.83.139.10]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id NAA29572 for ; Wed, 11 Sep 1996 13:54:55 -0700 (PDT) Received: from opus.cs.utexas.edu (miker@opus.cs.utexas.edu [128.83.143.208]) by mail.cs.utexas.edu (8.7.1/8.7.1) with ESMTP id PAA19531; Wed, 11 Sep 1996 15:54:53 -0500 (CDT) From: Hung Michael Nguyen Received: by opus.cs.utexas.edu (8.7.1/Client-1.4) id PAA57036; Wed, 11 Sep 1996 15:54:52 -0500 Message-Id: <199609112054.PAA57036@opus.cs.utexas.edu> Subject: Re: shared libg++2.7.2 To: ajones@ctron.com (Alexander Seth Jones) Date: Wed, 11 Sep 1996 15:54:52 -0500 (CDT) Cc: terry@lambert.org, hackers@freefall.freebsd.org In-Reply-To: <32371A09.451E@ctron.com> from "Alexander Seth Jones" at Sep 11, 96 03:59:05 pm X-Mailer: ELM [version 2.4 PL25] MIME-Version: 1.0 Content-Type: text/plain; charset=US-ASCII Content-Transfer-Encoding: 7bit Sender: owner-hackers@FreeBSD.ORG X-Loop: FreeBSD.org Precedence: bulk > Well, I'm getting a little further along... > > It does seem as though there's a problem with the GCC distribution of > 2.7.2.1. It won't make shared libs for libg++2.7.2 out of the box. I > end up doing: > > ld -Bshareable -o libxxx.so.2.7.2 /usr/lib/c++rt0.o `cat piclist` > > and this works fine; the ld error goes away. You must have run libg++'s or g++'s configure wrong, I ran it with no options and it worked. See below. > > But, there seems to be another problem. When compiling exceptioni.cc > from the stdc++ lib, I get the following warning from the assembler: > > /var/tmp/cc000339.s: Assembler messages: > /var/tmp/cc000339.s:603: Warning: GOT relocation burb: > `___EXCEPTION_TABLE__' should be global > > and I then create the shared lib as above. But linking just a little > program that cout's "hi", core dumps in __register_exceptions before > main is called. I know the exception handling code is sketchy right > now, but ... > > Any compiler gurus care to offer some insight? Is this a compiler > problem, an assembler problem, or has anyone actually gotten the libs > built shared and I'm doing something outlandishly dumb? > > I'd like to see if other people are running into this problem before I > report it to the GNU people. Well, it just so happens that I built gcc 2.7.2.1 and libg++ 2.7.2 on my 2.1.5 based system. All I did for gcc was #./configure #make LANGUAGE=c #make stage1 #make CC="stage1/xgcc -Bstage1/" CFLAGS="-g -O2" #make install Before doing libg++, I renamed gcc, g++, and c++ in /usr/bin to gcc-2.6.3, g++-2.6.3, and c++-2.6.3, respectively, so that I was sure the new compiler was used. For libg++: #./configure #make #make install Worked like a charm. Note that passing --enable-shared to configure will fail. It built the ppc601 simulator which I worked on for a class this summer, written in c++ with lots of iostream stuff. Also, I haven't gotten the latest pgcc (which seems to be based on a pre-release 2.8.0 now, at least it seems so looking at the release notes) to build itself (it emits an instruction as doesn't grok), much less libg++. Anybody have insights on that? Mike.