Commit Graph

161 Commits

Author SHA1 Message Date
Max Khon
83cb5bae96 - CTF knob is now implemented using common scheme: MK_CTF=yes/no is
defined based on WITH/WITHOUT_CTF settings, default is WITHOUT_CTF,
NO_CTF overrides WITH_CTF (used by Makefile.inc1)
- CTFCONVERT_CMD/NORMAL_CTFCONVERT are now defined to empty string
if make(1) can handle empty commands
2011-11-30 18:11:49 +00:00
Max Khon
78e7e3ecb5 - fix WITH_CTF when specified in /etc/src.conf [1]
- CTFCONVERT_CMD=... is a hack (should be defined to empty string instead):
make(1) should be taught to ignore empty commands silently in compat mode
(as it does in !compat mode, GNU make also silently ignores empty commands)
and to skip printing empty commands in !compat mode
- config(8) should generate ${NORMAL_CTFCONVERT} invocation without '@':
this will allow to simplify kern.pre.mk even more and lessen the number
of shell invocations during kernel build when CTF is turned off
- WITH_CTF can now be converted to usual MK_CTF=yes/no infrastructure

Pointy hat to:	fjoe [1]
2011-11-29 16:34:44 +00:00
Max Khon
cd49c2e840 Conditionalize ctfconvert/ctfmerge runs on make level (.if/.endif) instead
of executing a shell on every object or executable/library file.

This shaves off more than 30,000 shell invocations during buildworld.
2011-11-29 08:38:47 +00:00
Dimitry Andric
6d67f69487 Remove libobjc and other Objective-C related components, as these are
extremely outdated, and not used by anything in the base system.

Silence from:	current@
2011-04-17 21:03:23 +00:00
Rui Paulo
9feea9c1f4 Fix typo in previous commit. 2010-09-10 17:00:48 +00:00
Rui Paulo
c2c48445ba Check the existence of a 'beforelinking' target and make the resulting
program or library depend on that before doing the final linking. This
will be needed by DTrace.

Sponsored by:	The FreeBSD Foundation
2010-09-10 16:21:09 +00:00
Rui Paulo
b4d22b2cb9 Add missing escape characthers.
Pointed out by:	b.f.
2010-07-30 15:25:57 +00:00
Rui Paulo
3a1134997b Fix previous commit: I forgot to include parenthesis.
Submitted by:	anonymous
2010-07-30 08:52:19 +00:00
Rui Paulo
8a5216d5d8 When building WITH_CTF=1, print the ctf executable that's going to be
run. This makes the 'ctfconvert' and 'ctfmerge' programs show up during
a build when compiling a kernel, a library or a program.

Sponsored by:	The FreeBSD Foundation
2010-07-29 16:30:27 +00:00
Alexander Leidinger
21edb039c6 WITH_CTF can now be specified in src.conf (not recommended, there
are some problems with static executables), make.conf (would also
affect ports which do not use GNU make and do not override the
compile targets) or in the kernel config (via "makeoptions
WITH_CTF=yes").

Additional (related) changes:
 - propagate WITH_CTF to module builds
 - do not add -g to the linker flags, it's a noop there anyway
   (at least according to the man page of ld)
 - do not add -g to CFLAGS unconditionally
   we need to have a look if it is really needed (IMO not) or if there
   is a way to add it only when WITH_CTF is used

Note: ctfconvert / ctfmerge lines will not appear in the build output,
to protect the innocent (those which do not build with WITH_CTF would
see the shell-test and may think WITH_CTF is used).

Reviewed by:	imp, jhb, scottl (earlier version)
Discussed on:	arch@
2010-04-02 06:55:31 +00:00
Marcel Moolenaar
8eba8cd863 Also add DEBUG_FLAGS to CXXFLAGS if defined. 2010-02-18 03:32:51 +00:00
John Birrell
770ac3b21f Add support for the Compact C Type (CTF) conversions throughout FreeBSD's
system makefiles.

Note that the CTF conversion defaults to off. We may choose to change this
default later if DTrace proves popular and people are prepared to wear
the compilation performance impact of compiling with debug symbols all the
time.

Setting NO_CTF in the make args or user environment turns off CTF conversion.
Even if we choose to default CTF generation to on later, we still need
NO_CTF so that the buildworld process can bootstrap the tools without
needlessly generating CTF data for temporary tools.

Setting WITH_CTF in the make args or user environment (and _NOT_ in
/etc/make.conf) is the only way to enable CTF data conversion. Nore that
this can't be implemented the same way that the WITH_ and WITHOUT_ stuff
is implemented throughout the buildworld because the CTF conversion needs
to work when building a simple object without a Makefile, using the
default rules in sys.mk.

Typing 'make test.o' with no makefile and just a source file test.c
should work. Also, typing 'make WITH_CTF=1 test.o without a makefile and
just a source file test.c should work and produce an object with a CTF
elf section. Typing 'make WITH_CTF=1 CFLAGS=-g test.o' without a makefile
and just a source file test.c should produce an object with both a CTF
elf section and the debug elf sections.

In the FreeBSD build where more .mk files are used than just sys.mk
which is included my make by default, the use of DEBUG_FLAGS is the
correct way to enable a debug build. The important thing to note here
is that it is the DEBUG_FLAGS setting that prevents libraries and
programs from being stripped on installation. So, for the addition of
CTF data conversion, setting DEBUG_FLAGS to contain -g, without NO_CTF,
will cause the ctfconvert and ctfmerge build programs to be executed
also with the -g arg so that debug symbols are retained rather than
being removed after the CTF data elf section has been added.

Add DTrace libraries to the list of libnames.
2008-05-22 01:14:43 +00:00
Ruslan Ermilov
71ce49ae8d Fixed "make checkdpadd" (missing library dependencies).
Approved by:	re (kensmith)
2007-10-01 18:15:11 +00:00
David E. O'Brien
e2e1ab1c94 When building WITHOUT_ASSERT_DEBUG, we need to disable -Werror as its easy
to see "warning: unused variable `foo'".
2006-09-13 23:27:21 +00:00
Warner Losh
4df1f59e8f Add a knob for compiling the tree -DNDEBUG. This turns off all the
asserts and makes binaries smaller.  The binaries also become
repeatable again.  As it was, without this md5's of binaries built
with different paths differed.

# Where do I document this?
2006-09-11 05:35:57 +00:00
Ruslan Ermilov
e1fe3dba5c Reimplementation of world/kernel build options. For details, see:
http://lists.freebsd.org/pipermail/freebsd-current/2006-March/061725.html

The src.conf(5) manpage is to follow in a few days.

Brought to you by:	imp, jhb, kris, phk, ru (all bugs are mine)
2006-03-17 18:54:44 +00:00
Ruslan Ermilov
b8435aa88d Handle NO_INCS solely inside bsd.incs.mk. 2006-02-03 16:50:32 +00:00
Ruslan Ermilov
be174d0cbd Add the NO_INCS knob to bsd.prog.mk and bsd.lib.mk to not include
bsd.incs.mk, and use it when installing 32-bit compat libraries
on amd64.  This causes it to *not* overwrite native headers with
i386 versions, which was the case with <fenv.h> and <vgl.h>.

PR:		amd64/83806
Prodded by:	bde
MFC after:	1 week
2005-11-19 06:45:44 +00:00
Hartmut Brandt
84aac27381 Make sure the only thing that follows .endif or .else is a comment. 2005-04-11 07:13:29 +00:00
Juli Mallett
372ef8405c Linkage with -lobjc requires -lpthread nowadays. 2005-01-26 00:17:03 +00:00
Ruslan Ermilov
83c7ade90a NOSHARED -> NO_SHARED 2004-12-21 09:59:45 +00:00
Ruslan Ermilov
00fbd40770 NOFSCHG -> NO_FSCHG 2004-12-21 09:53:14 +00:00
Ruslan Ermilov
e653b48c80 Start the dreaded NOFOO -> NO_FOO conversion.
OK'ed by:	core
2004-12-21 08:47:35 +00:00
Paul Richards
57e3ff643a If PORTNAME is set in a system Makefile then hook into the ports
mechanisms to allow a package to be created. This paves the way
for packaging the main tree.
2004-12-20 15:46:56 +00:00
Ruslan Ermilov
212acbef3a Install precious programs with -S. 2004-11-12 13:24:34 +00:00
Ruslan Ermilov
dee651eb15 Introduce the PRECIOUSPROG knob in bsd.prog.mk, similar
to PRECIOUSLIB from bsd.lib.mk.  The side effect of this
is making installing the world under jail(8) possible by
using another knob, NOFSCHG.

Reviewed by:	oliver
2004-11-03 18:01:21 +00:00
Ruslan Ermilov
48aea4da66 Removed COPTS support from kmod.mk and kern.pre.mk.
COPTS support in bsd.prog.mk is preserved but discouraged.
2004-08-13 14:30:26 +00:00
Ruslan Ermilov
51fa76c495 Two changes to aid in cleaning up sys/boot/ makefiles:
- Don't put libc.a as a dependency if program is linked with -nostdlib.

- Added INTERNALPROG (by analogy to INTERNALLIB) for programs which are
  built only for its side effect and shold not be installed.
2004-02-09 14:05:17 +00:00
Ruslan Ermilov
f258f151cd make(1) can now handle spaces surrounding parenthesis correctly. 2004-02-05 08:44:43 +00:00
Ruslan Ermilov
65d2bdc62c Fixed bogus ${FOO:Mbar} tests where the actual intent is to check
if the result set is empty.  While here, replaced non-bogus empty
string comparisons with equivalent empty() checks.
2004-01-27 23:22:15 +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
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
Mark Murray
04b151d66a Remove some games/ cruft that is no longer of relevance. 2003-05-03 15:48:12 +00:00
Ruslan Ermilov
ccc4bab104 Added the new variable CTAGS which, if set to "ctags", reverts
to creating the tags file using ctags(1).  Defaults to "gtags".
Made GTAGSFLAGS and HTAGSFLAGS overrideable, added CTAGSFLAGS.
Folded bsd.prog.mk version of `tags' into bsd.dep.mk.

PR:		bin/42852
2002-10-17 13:48:13 +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
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
8479adc1d3 Reimplemented bsd.nls.mk using bsd.files.mk and bsd.links.mk.
Provided the (previously missing) dependency on source files
for intermediate .msg files.

Provided the default for NLSSRCDIR (defaults to .CURDIR).

Slightly changed the API: NLS should now list plain locale
names, without the .msg suffix.

When included from bsd.prog.mk, NLSNAME defaults to PROG.
2002-07-02 12:37:09 +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
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
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
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
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
8782938772 Install PROG before SCRIPTS and FILES, but make sure
LINKS are still processed last.  This backs out part
of the backout in previous revision.

Install the manpages before descending into SUBDIRs.
2002-05-07 15:30:49 +00:00
Ruslan Ermilov
9e84c09c36 Splitting "realinstall" into parts was a (failed) part of the work
in progress, and should not have been committed in revision 1.114.
This broke gnu/usr.bin/binutils/strip and usr.bin/strip makefiles;
they were now attempting to install and strip "strip" from objdir.

Pointed out by:	bde

This has nothing to do with PR misc/37516.
2002-04-29 16:00:30 +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
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