From owner-freebsd-hackers Fri Jun 23 03:27:56 1995 Return-Path: hackers-owner Received: (from majordom@localhost) by freefall.cdrom.com (8.6.10/8.6.6) id DAA02160 for hackers-outgoing; Fri, 23 Jun 1995 03:27:56 -0700 Received: from longvalley.dsg.cs.tcd.ie (longvalley.dsg.cs.tcd.ie [134.226.36.37]) by freefall.cdrom.com (8.6.10/8.6.6) with SMTP id DAA02153 for ; Fri, 23 Jun 1995 03:27:39 -0700 Received: from dedanann.dsg.cs.tcd.ie by longvalley.dsg.cs.tcd.ie id aa29671; 23 Jun 95 11:27 BST To: hackers@freebsd.org Subject: gcc 2.7.0 and FreeBSD 2.0.5 Date: Fri, 23 Jun 1995 11:27:29 +0100 From: Alan Judge Message-ID: <9506231127.aa29671@longvalley.dsg.cs.tcd.ie> Sender: hackers-owner@freebsd.org Precedence: bulk Hi, Poul-Henning Kamp suggested that I try mailing this problem to the hackers list. We're making heavy use of C++ on some FreeBSD boxes, so we're interested in getting gcc 2.7.0 up (or, more likely, 2.7.x :-) as the C++ support is improved substantially. I compiled up gcc on 2.0.5 without any problem and all the C stuff appears to work fine. However, when I try to compile a simple C++ program, the assembler complains about the use of the .weak pseudo-op. I thought this might just be a limitation in the assembler, so I hacked up a freebsd config for binutils-2.5.2 and compiled up the assembler there. This got me past the .weak problem and even works for simple programs. However, when I try with a more complex program (basically any multimodule program where a .weak symbol appears more than once, I think), I get errors of the form: ld: /var/tmp/cc0019921.o: unexpected multiple definitions of symbol `_f__1X', type 0xf :1: Definition of symbol `_f__1X' (multiply defined) I guess that the FreeBSD ld doesn't fully support weak symbols? I looked at trying to get the ld from binutils going, but this looks like a lot more work. I thought that I should ask before investing any more effort. Is my diagnosis of the problem correct? Any suggestions as to the best way to get around the problem. I'm willing to wait if an appropriate solution will eventually appear in FreeBSD-current or -2.1. -- Alan