Date: Fri, 23 Jun 1995 11:27:29 +0100 From: Alan Judge <amjudge@dsg.cs.tcd.ie> To: hackers@freebsd.org Subject: gcc 2.7.0 and FreeBSD 2.0.5 Message-ID: <9506231127.aa29671@longvalley.dsg.cs.tcd.ie>
next in thread | raw e-mail | index | archive | help
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
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi? <9506231127.aa29671>