Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 09 Apr 1997 13:54:56 -0700
From:      John Polstra <jdp@polstra.com>
To:        current@freebsd.org
Subject:   Heads up: building shared libraries
Message-ID:  <199704092054.NAA18435@austin.polstra.com>

next in thread | raw e-mail | index | archive | help
Later this week, I am going to commit a change to <bsd.lib.mk> that will
eliminate the need for the CPLUSPLUSLIB variable in the makefiles for
C++ shared libraries.  The change will cause /usr/lib/c++rt0.o to be
linked into all shared libraries, even non-C++ ones.  It is essential
that an up-to-date version of c++rt0.o be installed in /usr/lib before
building any shared libraries using the new method.  I have already
committed the new version of that (src/lib/csu/i386/c++rt0.c version 1.8).

The change won't cause any problems for normal "make world" runs.
The top-level Makefile takes care to install an up-to-date c++rt0.o
before building any shared libraries.

If you manually build a new shared library using the new <bsd.lib.mk>
but the old c++rt0.o, it will cause problems.  They are not
compile-time or link-time errors, but rather subtle run-time errors.
(Usually, messages from malloc saying that free() was called on an
already-freed block.)

So ... don't do that. :-)
--
   John Polstra                                       jdp@polstra.com
   John D. Polstra & Co., Inc.                Seattle, Washington USA
   "Self-knowledge is always bad news."                 -- John Barth



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?199704092054.NAA18435>