Commit graph

152 commits

Author SHA1 Message Date
Peter Wemm eb7f25e17e Emergency backout of rev 1.152. This is a 100% guaranteed way to totally
hose your system.  You end up with just about everything statically linked
(except for libpam.so), which then causes all the pam users to fail.
eg: login, sshd, su etc all stop working because dlopen no longer works
because there is no libc.so in memory anymore.

gcc passes -L/usr/lib to ld.  The /usr/lib/libxxx.so symlink is *not* a
compatability link.  It is actually the primary link.  There should be no
symlinks in /lib at all.  Only /lib/libXX.so.Y.

peter@daintree[9:27pm]/usr/bin-104> file yppasswd
yppasswd: setuid ELF 32-bit LSB executable, Intel 80386, version 1 (FreeBSD), for FreeBSD 5.1.1, dynamically linked (uses shared libs), stripped
peter@daintree[9:27pm]/usr/bin-105> ldd yppasswd
yppasswd:
        libpam.so.2 => /usr/lib/libpam.so.2 (0x280d1000)
peter@daintree[9:28pm]/usr/bin-106>

Note no libc.so.5.  Hence libpam.so.2 has unresolved dependencies.

I believe this is also the cause of the recent buildworld failures when
pam_krb5.so references -lcrypto stuff etc and when librpcsvc.so references
des_setparity() etc.

This change could not possibly have worked, unless there are other missing
changes to the gcc configuration.  It won't work with ports versions of
gcc either.
2003-09-04 04:29:11 +00:00
Ruslan Ermilov 1c0b8fcbfe As ld(1) was taught to look into /lib, there's no longer a reason
for having compatibility .so symlinks.

Submitted by:	obrien
Reviewed by:	gordon
2003-09-03 06:31:50 +00:00
Ruslan Ermilov 41f8931571 Whitespace diff reduction between bsd.prog.mk and bsd.lib.mk outputs. 2003-08-31 15:20:17 +00:00
Gordon Tetlow b20654d416 When creating .so symlinks, use SHLIBDIR instead of LIBDIR so symlinks
are created in the correct location. Always make them. For libraries
that live in /lib, this causes a /lib/libfoo.so and a compatibility
/usr/lib/libfoo.so to be created. We may want to drop the
/usr/lib/libfoo.so symlink at some future point.
2003-08-17 23:56:29 +00:00
Gordon Tetlow 3d7f3b48c8 Handle the case where SHLIBDIR != LIBDIR. When creating links, we
need relative pathing to work correctly. This is s necessary step
for putting libraries in /lib while the .so symlinks still live
in /usr/lib.

This should be a big NOOP in the case where SHLIBDIR == LIBDIR.
2003-08-17 07:42:50 +00:00
Ruslan Ermilov d58e932f04 Don't trust sys.mk,v 1.61 commit log, and make .asm alias for .S. 2003-07-02 17:03:28 +00:00
Ruslan Ermilov f79d11b7ba Revert to using as(1) to compile plain assembler source files.
All .s files that need cpp(1) processing (see gcc(1) manpage's
DESCRIPTION section) have been repo-copied to .S files.  This
is mostly to bring bsd.lib.mk in agreement with sys.mk.

Desired by:	obrien
2003-07-02 12:41:04 +00:00
Ruslan Ermilov a51613b6da There's no reason to keep separate AINC knob anymore.
The only real use of it (lib/libc/Makefile) has been
fixed, and if necessary, the contents of AINC should
be added to CFLAGS.

Explained by:	bde
2003-07-01 15:15:45 +00:00
Ruslan Ermilov fdcdec572a Propagate the ${AINC} knob (assembler include) to sys.mk,
and remove the .S.o transformation rule from bsd.lib.mk.
2003-06-30 20:02:46 +00:00
Ruslan Ermilov 70d9bc066f Removed suffix-transformation rules that are duplicates
(or are subsets) of the corresponding rules in sys.mk.
2003-06-30 19:48:14 +00:00
Ruslan Ermilov ea90b1f55d The use of ld(1) to strip compiler local and non-global
symbols from object files has bitrotted over the last
thirteen years, and it now does more harm than good.

An attempt to work around the problems caused by using
ld(1) for stripping was to pass LDFLAGS to the ld(1)
command, but this was not right either as ${LDFLAGS}
should, by design, be used with cc(1) and not ld(1).

One of the proposed solutions was to use the objcopy(1)
utility to do the strip work, and the other would be to
use strip(1), but Bruce Evans suggested not stripping
any symbols at all.  This works by leaving the grunt
work to the final strip(1) command (when installing the
binary).

Submitted by:	bde
2003-06-30 19:03:56 +00:00
Gordon Tetlow 3c9b856357 Add ${CRUNCH_CFLAGS} support for adding compile options to crunch
components. This is generally considered a non-optimal solution but
it gets the job done for the /rescue case.

Submitted by:	Tim Kientzle <kientzle@acm.org>
2003-06-29 18:16:26 +00:00
Peter Wemm ef5c58a14c Be consistent about the use of ${LDFLAGS} for the internal rules. Some
were missing.  This made it difficult to add backend ABI overrides when
building shared libs.
2003-06-26 01:01:48 +00:00
David E. O'Brien a89bd62015 Remove NOSHLIBS, users can get by with NOPIC.
Desired by:	ru
2003-06-10 04:47:49 +00:00
David E. O'Brien 74a0458023 Add NOSHLIBS.
If one is using NOSHARED, why build the libs.
2003-04-27 21:44:52 +00:00
Mark Murray 5741a42f2f Extend the lint handling a bit.
o Make it possible to prevent parts of the tree from being linted
  (say) during a 'make world' by setting NOLINT in a leaf Makefile.

o Make "make lint" work (better) for executable programs.

o Clean up (nuke!) a syntax damaged pipeline.
2002-09-20 19:32:51 +00:00
Peter Wemm 66422f5b7a Initiate deorbit burn for the i386-only a.out related support. Moves are
under way to move the remnants of the a.out toolchain to ports.  As the
comment in src/Makefile said, this stuff is deprecated and one should not
expect this to remain beyond 4.0-REL.  It has already lasted WAY beyond
that.

Notable exceptions:
gcc - I have not touched the a.out generation stuff there.
ldd/ldconfig - still have some code to interface with a.out rtld.
old as/ld/etc - I have not removed these yet, pending their move to ports.
some includes - necessary for ldd/ldconfig for now.

Tested on: i386 (extensively), alpha
2002-09-17 01:49:00 +00:00
Ruslan Ermilov d2893b161b Drop support for COPY, -c has been the default mode of install(1)
for a long time now.

Approved by:	bde
2002-07-29 09:40:17 +00:00
Ruslan Ermilov 397304fe4f Moved `clean:' below, just before the inclusion of bsd.obj.mk,
so that CLEANFILES from bsd.man.mk and bsd.dep.mk are honored.
2002-07-21 21:22:45 +00:00
Ruslan Ermilov 5113446a35 Only define SHLIB_LINK if SHLIB_NAME matches the *.so.* pattern.
(Useful for RELENG_4's lib/libpam/modules.)
2002-07-19 18:40:13 +00:00
Ruslan Ermilov 42c0ad02c2 Correction to the previous revision: define SHLIB_LINK if SHLIB_NAME
is defined (whether or not LIB is defined).
2002-07-18 17:44:20 +00:00
Ruslan Ermilov 4d7d5e7c11 Make it possible (again) to build and install shared library only.
One needs to define SHLIB_NAME for this to work.

Prodded by:	mi
2002-07-03 16:22:43 +00:00
Ruslan Ermilov badb7c1c6b Try really hard to fix parallel installs. Add a bunch of .ORDER
directives to ensure that all realinstall sub-tasks are executed
after beforeinstall, similarly ensure that all afterinstall sub-
tasks are executed after realinstall.  Demonstration:

all: task1 task2
.ORDER: task1 task2

task2: task2_subtask
.ORDER: task1 task2_subtask

task1 task2 task2_subtask:
	@sleep `jot -r 1 0 1.0`
	@echo ${.TARGET}

Without the second .ORDER directive, task2_subtask can be run in
parallel with task1.

Spotted by:	Andrea Campi <andrea@webcom.it>
2002-07-03 12:28:03 +00:00
Ruslan Ermilov 84f94a79a0 Handle installation of hard and symbolic links via a seperate .mk file. 2002-07-02 12:16:54 +00:00
Juli Mallett dd247f7371 If CLEANFILES is nil or not defined, do not try to remove it. This happens
when SRCS is entirely files which produce only one compiled form, and when
NOMAN is defined.  This does not seem to happen in STABLE.

Approved by:	ru
2002-06-26 08:41:00 +00:00
Ruslan Ermilov af2dc86820 Reimplement FILES support using bsd.files.mk with the
same set of features as in recently added bsd.incs.mk
(FILESGROUPS, accessibility from both bsd.prog.mk and
bsd.lib.mk, de-pessimized typical installation path,
etc.)  New standard targets: buildfiles, installfiles,
and files (buildfiles + installfiles).
2002-06-03 14:49:34 +00:00
Ruslan Ermilov 79273cd77c Revision 1.39 made filtering of CFLAGS unnecessary. 2002-05-22 11:03:35 +00:00
Ruslan Ermilov 5d86203733 Rename includes' to buildincludes'.
Rename `incsinstall' to `installincludes'.
Make `includes' a -j safe shortcut for `buildincludes' + `installincludes'.
`buildincludes' and `installincludes' are SUBDIR friendly, if run directly.
2002-05-15 16:19:54 +00:00
Ruslan Ermilov 12e0852a7a CLEANFILES are too long for libc. 2002-05-13 15:23:56 +00:00
Ruslan Ermilov 2a53f3fb35 Major cleanup of bsd.lib.mk.
Get rid of the INTERNALSTATICLIB knob and just use plain INTERNALLIB.
INTERNALLIB now means to build static library only and don't install
anything.  Added a NOINSTALLLIB knob for libpam/modules.  To not
build any library at all, just do not set LIB.
2002-05-13 10:53:24 +00:00
Ruslan Ermilov c7b111cba8 Added new bsd.incs.mk which handles installing of header files
via INCS.  Implemented INCSLINKS (equivalent to SYMLINKS) to
handle symlinking include files.  Allow for multiple groups of
include files to be installed, with the powerful INCSGROUPS knob.
Documentation to follow.

Added standard `includes' and `incsinstall' targets, use them
in Makefile.inc1.  Headers from the following makefiles were
not installed before (during `includes' in Makefile.inc1):

	kerberos5/lib/libtelnet/Makefile
	lib/libbz2/Makefile
	lib/libdevinfo/Makefile
	lib/libform/Makefile
	lib/libisc/Makefile
	lib/libmenu/Makefile
	lib/libmilter/Makefile
	lib/libpanel/Makefile

Replaced all `beforeinstall' targets for installing includes
with the INCS stuff.

Renamed INCDIR to INCSDIR, for consistency with FILES and SCRIPTS,
and for compatibility with NetBSD.  Similarly for INCOWN, INCGRP,
and INCMODE.

Consistently use INCLUDEDIR instead of /usr/include.

gnu/lib/libstdc++/Makefile and gnu/lib/libsupc++/Makefile changes
were only lightly tested due to the missing contrib/libstdc++-v3.
I fully tested the pre-WIP_GCC31 version of this patch with the
contrib/libstdc++.295 stuff.

These changes have been tested on i386 with the -DNO_WERROR "make
world" and "make release".
2002-05-12 16:01:00 +00:00
David E. O'Brien 5aa237561f Back out rev 1.118. 2002-05-12 13:48:53 +00:00
David E. O'Brien e20b0b7333 [Ab]use LDFLAGS rather than CFLAGS.
BDE tells me POSIX pretends `ld' as a directly callable entity does not exist.
2002-05-10 09:32:39 +00:00
David E. O'Brien bea805383e Pass CFLAGS to {CC} when using it as an `ld' replacement. 2002-05-10 01:30:34 +00:00
David E. O'Brien d23aa1ef0f Pay attention to LDFLAGS when linking. 2002-05-09 16:43:07 +00:00
David E. O'Brien 8500d819cc Get rid of the INTERNALSTATICLIB knob and just use plain INTERNALLIB.
INTERNALLIB now implies NOPROFILE, NOMAN, and don't install anything.
Add a NOLIB knob.
2002-05-09 00:44:13 +00:00
Ruslan Ermilov afeaaa846c Added internal, non-recursive (SUBDIR) versions of the `all-man'
and `maninstall' targets.  This fixes the issue where each subdir
was descended into twice during "make all", and also resurrects
the standardization of `maninstall'.

Urged by:	bde
2002-05-07 15:42:56 +00:00
Ruslan Ermilov b90dab70f1 Install the manpages before descending into SUBDIRs. 2002-05-07 15:27:56 +00:00
Ruslan Ermilov c5234b56b6 Abuse bsd.obj.mk for defining default distribute target. 2002-04-24 13:29:34 +00:00
David E. O'Brien 01df2ec328 Change the name of the 'bin' distribution to 'base'.
This is done since it contains much more than /bin, and also gets in the
way when making a combined install+fixit CD.

OK'ed by:	jkh
2002-04-23 22:16:41 +00:00
Ruslan Ermilov b25a566d47 Merge bsd.obj.mk's version of the _SUBDIR target with bsd.subdir.mk.
Ensure all standard targets honor SUBDIR.  Now `make obj' descends into
SUBDIRs even if NOOBJ is set (some descendants may still need an object
directory, but we do not have such precedents).  Now `make install' in
non-bsd.subdir.mk makefiles runs `afterinstall' target _after_ `install'
in SUBDIRs, like we do in bsd.subdir.mk.  Nothing depended on the wrong
order anyway.

Fixed `distribute' targets (except for the bsd.subdir.mk version) so that
they do not depend on _SUBDIR; `distribute' calls `install' which already
depends on _SUBDIR.

De-standardize `maninstall', otherwise manpages would be installed twice.
(To be revised later.)
2002-04-23 09:03:56 +00:00
Ruslan Ermilov 72d5490744 Make .asm transformation rules synonyms to the .s rules. 2002-04-22 08:56:34 +00:00
Mark Murray 2738ffebcc Style. Fix long lines and a <tab> indent that should be 4 spaces. 2002-04-21 17:26:16 +00:00
David E. O'Brien 3b9a798ffc reorg a little. 2002-04-20 08:41:55 +00:00
David E. O'Brien e517d11e8d Add .asm as an alias for .s. .asm is common in contribed sources.
Helps with:	gcc31 build.
2002-04-19 18:01:03 +00:00
Ruslan Ermilov 2bdaf7e81c Don't include bsd.own.mk from sys.mk, this makes it impossible
to use ``.if defined()'' inside bsd.own.mk to test for defines
in individual makefiles.  For example, setting DEBUG_FLAGS in
Makefile didn't take the desired effect on the STRIP assignment.

Added bsd.init.mk (like in NetBSD) that handles the inclusion
of ../Makefile.inc and bsd.own.mk from all bsd.*.mk files that
"build something".

Back out bsd.own.mk,v 1.15: moved OBJFORMAT initialization back
to sys.mk (several source tree makefiles want to check it early)
and removed MACHINE_ARCH initialization (it's hard to see from
looking at the commitlogs what the problem was at the time, but
now it serves no purpose).

Prohibit the direct inclusion of bsd.man.mk and bsd.libnames.mk.

Protect bsd.obj.mk from repetitive inclusion.  Prohibiting the
direct inclusion of bsd.obj.mk might be a good idea too.
2002-04-17 13:49:29 +00:00
Ruslan Ermilov 88505e11bc Fixed the nasty bug where .depend file that exists somewhere in
the .PATH (but not in the ${.OBJDIR}) would result in a leak of
the ${OBJS}: ${SRCS:M*.h} dependency hint.

Spotted by:	fixing the broken gnu/usr.bin/cc/cc1obj build
MFC after:	1 day
2002-04-07 14:58:12 +00:00
Dag-Erling Smørgrav 8fd9852b57 Install static and profiled libraries with -C. 2002-03-22 20:28:16 +00:00
Ruslan Ermilov bbb467cd9a lint the previous lint commit.
Reviewed by:	markm
2002-03-18 09:35:45 +00:00
Mark Murray 766f7d6e03 Allow "make lint" to mostly work. Our sources are very unclean WRT
lint, so this is turned off by default. Setting WANT_LINT will turn
on generation of lint libraries for /usr/libdata/lint/*.ln.

Reviewd by:	silence in -audit.
2002-03-17 10:05:57 +00:00