From owner-freebsd-hackers Mon Feb 12 15:55:19 1996 Return-Path: owner-hackers Received: (from root@localhost) by freefall.freebsd.org (8.7.3/8.7.3) id PAA14514 for hackers-outgoing; Mon, 12 Feb 1996 15:55:19 -0800 (PST) Received: from hda.com (hda.com [199.232.40.182]) by freefall.freebsd.org (8.7.3/8.7.3) with SMTP id PAA14505 for ; Mon, 12 Feb 1996 15:55:15 -0800 (PST) Received: (from dufault@localhost) by hda.com (8.6.11/8.6.9) id TAA17734; Mon, 12 Feb 1996 19:01:35 -0500 From: Peter Dufault Message-Id: <199602130001.TAA17734@hda.com> Subject: Re: g++ 2.7.2 / libg++ 2.7.1 and ld To: jdp@polstra.com (John Polstra) Date: Mon, 12 Feb 1996 19:01:35 -0500 (EST) Cc: freebsd-hackers@freebsd.org In-Reply-To: <199602122345.PAA14193@austin.polstra.com> from "John Polstra" at Feb 12, 96 03:45:19 pm X-Mailer: ELM [version 2.4 PL24] Content-Type: text Sender: owner-hackers@freebsd.org Precedence: bulk > > 1. Start with pgcc in -ports; > > ... > > As suggested in the list archives, I tried adding "#define > > SUPPORTS_WEAK 0" to config/xm-freebsd.h in the compiler, however, > > it still generates weak symbols. > > I was working on ports of gcc-2.7.2 and libg++-2.7.1 for a while. I got > interrupted and put it down, unfortunately. But maybe I can put you on > the right track. (Note: I haven't looked at the pgcc stuff.) > > The way to get rid of the weak symbols is to delete these lines from > "config/i386/freebsd.h": > > #define ASM_WEAKEN_LABEL(FILE,NAME) \ > do { fputs ("\t.weak\t", FILE); assemble_name (FILE, NAME); \ > fputc ('\n', FILE); } while (0) > > Just delete them; that's all you have to do. After that, everything > should work fine with our standard assembler and linker. Yes, John is right (Thanks to Thomas Graichen who also suggested this solution). Those of you who told me things work just fine after moving to a new assembler and using the existing linker: No they aren't - you just haven't had problems yet. The problems only come up occasionally with name collisions in C++ output that the new .weak code apparently expects the linker to resolve. -- Peter Dufault Real-Time Machine Control and Simulation HD Associates, Inc. Voice: 508 433 6936 dufault@hda.com Fax: 508 433 5267