From owner-freebsd-current Thu Oct 17 07:00:03 1996 Return-Path: owner-current Received: (from root@localhost) by freefall.freebsd.org (8.7.5/8.7.3) id HAA01560 for current-outgoing; Thu, 17 Oct 1996 07:00:03 -0700 (PDT) Received: from rocky.mt.sri.com (rocky.mt.sri.com [206.127.76.100]) by freefall.freebsd.org (8.7.5/8.7.3) with ESMTP id GAA01496 for ; Thu, 17 Oct 1996 06:59:55 -0700 (PDT) Received: (from nate@localhost) by rocky.mt.sri.com (8.7.5/8.7.3) id HAA17511; Thu, 17 Oct 1996 07:59:08 -0600 (MDT) Date: Thu, 17 Oct 1996 07:59:08 -0600 (MDT) Message-Id: <199610171359.HAA17511@rocky.mt.sri.com> From: Nate Williams To: Keith Mitchell CC: current@freebsd.org Subject: Re: Weirdness in current In-Reply-To: <199610170430.AAA01023@unix.guru.org> References: <199610170430.AAA01023@unix.guru.org> Sender: owner-current@freebsd.org X-Loop: FreeBSD.org Precedence: bulk >>> I have a C++ program I wrote, and it works fine as long as you don't try to >>> redirect the output. Doing so, causes it to core dump. Compiling the >>> same program on a 2.1.0R system works fine though. >> >> I have a little more insight on this one. It appears that the same libraries >> are not getting linked in on current as on stable (2.1.0 or 2.1.5). Note, gcc and libg++ have changed in -current vs. stable. >> For >> some reason the math library is getting linked in on stable even though >> I don't tell it to and my program doesn't use it directly. I don't know why. I just looked, and it's not being forced to... > Ok. Here's an update. I just did a make world from a 10-16 current. > The dynamic linking now appears to work correctly using the math library > by default. Are you saying the math library is brought in even if you don't explicitly ask for it? > Anyone know why this is even necessary? It still fails when > linking the program statically through the -Xlinker -Bstatic option. Note, there are known oustanding bugs (that will probably never get fixed with the current a.out toolchain) w/regards to different behavior in the linker when doing static/dynamic linking. I'm not sure if this is what you are seeing, but it does exist and is known about. The linker does *NOT* link the program the preference of the command line when mixing static/shared libraries, but instead 'preferes' shared libraries over their static counter-parts. Nate