Skip site navigation (1)Skip section navigation (2)
Date:      Mon, 15 Jan 1996 18:56:17 -0800
From:      John Polstra <jdp@polstra.com>
To:        "Jordan K. Hubbard" <jkh@time.cdrom.com>
Cc:        CVS-committers@freefall.freebsd.org, cvs-lib@freefall.freebsd.org
Subject:   Re: cvs commit: src/lib/csu/i386 c++rt0.c 
Message-ID:  <199601160256.SAA21898@austin.polstra.com>
In-Reply-To: Your message of "Mon, 15 Jan 1996 17:40:33 PST." <5359.821756433@time.cdrom.com> 

next in thread | previous in thread | raw e-mail | index | archive | help
> >   Modified:    lib/csu/i386  c++rt0.c
> >   Log:
> >   Check the count in the first word of __CTOR_LIST__ before executing
> >   the loop that invokes the static constructors.  That makes it safe
> >   to link c++rt0.o into any shared library, even one that does not
> >   have any static constructors.  Formerly, doing that would cause a
> 
> Does this mean that we can remove the CPLUSPLUSLIB declarations
> from the Makefiles of the C++ libraries we make?

That's one of the two goals of this change.  (The other one is to make
"gcc -shared ..." work, just the way it does everywhere else in the
world.)

You can remove the CPLUSPLUSLIB declarations from the Makefiles, as soon
as /usr/share/mk/bsd.lib.mk is changed like this:

*** bsd.lib.mk-	Mon Jan 15 18:46:43 1996
--- bsd.lib.mk	Mon Jan 15 18:47:30 1996
***************
*** 187,193 ****
  .endif
  
  .if !defined(NOPIC)
! .if defined(CPLUSPLUSLIB) && !make(clean) && !make(cleandir)
  SOBJS+= ${DESTDIR}/usr/lib/c++rt0.o
  .endif
  
--- 187,193 ----
  .endif
  
  .if !defined(NOPIC)
! .if !make(clean) && !make(cleandir)
  SOBJS+= ${DESTDIR}/usr/lib/c++rt0.o
  .endif
  

In other words, as soon as c++rt0.o is linked into every shared library,
regardless of whether CPLUSPLUSLIB is defined in its Makefile.

This change can be made any time now.  I'll be happy to do it myself,
but since /usr/share/mk isn't really my turf, I thought I'd better ask
permission first.

So: Can I change it??  Huh??  Pleeeeease??  Huh??

-- John



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