Fixed missing directories in the libraries target:

- in the elf case, csu must be built and installed before any shared
  libraries.  It wasn't, but we usually used a stale version that
  happened to work.  E.g., in the !NOTOOLS case we used the version
  built and installed by the bootstrap-libraries target.  Only cross
  building was completely broken.
- the shared libmd must be built and installed before any shared
  libraries that link to it.  It wasn't, but we sometimes used a stale
  version that happened to work, as above.  For elf, this caused
  bogus linkage of the target shared libatm and libopie with the host
  static libmd.  It isn't clear what this actually breaks, except for
  cross compiling.  For aout, the shared libmd is not built at all, so
  all shared libraries linked to libmd may be broken.  The linker
  reports them by spewing RRS warnings.

Note that building src/lib early and building subdirs of src/lib in
the correct order in src/lib/Makefile doesn't help, since the subdirs
are all built before any are installed.

Fixed bitrot in the comments about the ordering requirements.
This commit is contained in:
Bruce Evans 1998-10-16 14:22:54 +00:00
parent 6014c286d1
commit 59bec03685

View File

@ -1,5 +1,5 @@
#
# $Id: Makefile.inc1,v 1.33 1998/10/13 08:13:32 jkh Exp $
# $Id: Makefile.inc1,v 1.34 1998/10/13 10:01:32 rnordier Exp $
#
# Make command line options:
# -DCLOBBER will remove /usr/include
@ -642,10 +642,11 @@ lib-tools:
# To satisfy shared library linkage when only the libraries being built
# are visible:
#
# csu must be built before all shared libaries for ELF.
# libcom_err must be built before libss.
# libcrypt and libmd must be built before libskey.
# libm must be built before libf2c, libg++ and libstdc++
# libmd must be built before libatm and libopie
# libcrypt must be built before libskey.
# libm must be built before libf2c, libg++ and libstdc++.
# libmd must be built before libatm, libopie and libskey.
# libmytinfo must be built before libdialog and libncurses.
# libncurses must be built before libdialog.
# libtermcap must be built before libcurses, libedit and libreadline.
@ -714,8 +715,8 @@ bootstrap-libraries:
# alphabetical order.
#
libraries:
.for _lib in lib/libcom_err ${_libcrypt} ${_libm} lib/libmytinfo \
lib/libncurses lib/libtermcap \
.for _lib in ${_csu} lib/libcom_err ${_libcrypt} ${_libm} lib/libmd \
lib/libmytinfo lib/libncurses lib/libtermcap \
gnu/lib gnu/usr.bin/cc/libgcc ${_libperl} lib usr.bin/lex/lib \
usr.sbin/pcvt/keycap
.if exists(${.CURDIR}/${_lib})