History log of /freebsd-10.0-release/share/mk/sys.mk
Revision Date Author Comments
(<<< Hide modified files)
(Show modified files >>>)
# 259065 07-Dec-2013 gjb

- Copy stable/10 (r259064) to releng/10.0 as part of the
10.0-RELEASE cycle.
- Update __FreeBSD_version [1]
- Set branch name to -RC1

[1] 10.0-CURRENT __FreeBSD_version value ended at '55', so
start releng/10.0 at '100' so the branch is started with
a value ending in zero.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation

# 256281 10-Oct-2013 gjb

Copy head (r256279) to stable/10 as part of the 10.0-RELEASE cycle.

Approved by: re (implicit)
Sponsored by: The FreeBSD Foundation


# 254980 27-Aug-2013 sjg

Use .SHELL to tell bmake to use 'set -e' when running scripts
since most FreeBSD makefiles it is in effect.

Move the other bmake compatability knobs out of the POSIX block.

Reviewed by: obrien


# 252127 23-Jun-2013 eadler

Remove variable added by ru@ in r94940 that is no longer used by source or ports in share/mk/sys.mk

PR: conf/155737
Reviewed by: ed (two years ago!)
Exp-Run by: bdrewery


# 251748 14-Jun-2013 sjg

We cannot remove the _+_ trick, until old make is completely deprecated.
But we don't want to set it to + for bmake since it breaks make -N
which is used to supress the normal handling of targets marked with .MAKE
(which seems broken in fmake and might be why _+_ was introduced).
Add some comments to explain what's gong on.

Reviewed by: obrien


# 251506 07-Jun-2013 sjg

Override bmake's default MAKEFILE_PREFERENCE


# 249057 03-Apr-2013 sjg

Tell bmake to use the FreeBSD preferred makefile preference list.

PR: 177593
Reviewed by: obrien


# 245269 10-Jan-2013 des

Remove all support for legacy NOFOO and NO_FOO build options.


# 244366 17-Dec-2012 emaste

Hide OBJCOPY and others in POSIX mode

Submitted by: Garrett Cooper


# 244236 14-Dec-2012 emaste

Put shared library debug info into separate .symbols file

Sponsored by: ADARA Networks


# 243934 05-Dec-2012 eadler

Change the default to 'cru' for speed reasons.

Submitted by: Erik Cederstrand <erik@cederstrand.dk>
Reviewed by: imp, toolchain@
Approved by: cperciva
MFC after: 2 weeks


# 241298 06-Oct-2012 marcel

Add support for bmake. This includes:
1. Don't do upgrade_checks when using bmake. As long as we have WITH_BMAKE,
there's a bootstrap complication in ths respect. Avoid it. Make the
necessary changes to have upgrade_checks work wth bmake anyway.
2. Remove the use of -E. It's not needed in our build because we use ?= for
the respective variables, which means that we'll take the environment
value (if any) anyway.
3. Properly declare phony targets as phony as bmake is a lot smarter (and
thus agressive) about build avoidance.
4. Make sure CLEANFILES is complete and use it on .NOPATH. bmake is a lot
smarter about build avoidance and should not find files we generate in
the source tree. We should not have files in the repository we want to
generate, but this is an easier way to cross this hurdle.
5. Have behavior under bmake the same as it is under make with respect to
halting when sub-commands fail. Add "set -e" to compound commands so
that bmake is informed when sub-commands fail.
6. Make sure crunchgen uses the same make as the rest of the build. This
is important when the make utility isn't called make (but bmake for
example).
7. While here, add support for using MAKEOBJDIR to set the object tree
location. It's the second alternative bmake looks for when determining
the actual object directory (= .OBJDIR).

Submitted by: Simon Gerraty <sjg@juniper.net>
Submitted by: John Van Horne <jvanhorne@juniper.net>


# 239272 15-Aug-2012 gonzo

Merging of projects/armv6, part 3

r238211:
Support TARGET_ARCH=armv6 and TARGET_ARCH=armv6eb

This adds a new TARGET_ARCH for building on ARM
processors that support the ARMv6K multiprocessor
extensions. In particular, these processors have
better support for TLS and mutex operations.

This mostly touches a lot of Makefiles to extend
existing patterns for inferring CPUARCH from ARCH.
It also configures:
* GCC to default to arm1176jz-s
* GCC to predefine __FreeBSD_ARCH_armv6__
* gas to default to ARM_ARCH_V6K
* uname -p to return 'armv6'
* make so that MACHINE_ARCH defaults to 'armv6'
It also changes a number of headers to use
the compiler __ARM_ARCH_XXX__ macros to configure
processor-specific support routines.

Submitted by: Tim Kientzle <kientzle@freebsd.org>


# 234575 22-Apr-2012 imp

Sort nm in order.

Submitted by: bde


# 234549 21-Apr-2012 imp

Fix partially merged patch from my external compiler tree in r234546.
Define NM except when we're in strict POSIX mode.


# 233644 29-Mar-2012 jmallett

Assume a big-endian default on MIPS and drop the "eb" suffix from MACHINE_ARCH.
This makes our naming scheme more closely match other systems and the
expectations of much third-party software. MIPS builds which are little-endian
should require and exhibit no changes. Big-endian TARGET_ARCHes must be
changed:
From: To:
mipseb mips
mipsn32eb mipsn32
mips64eb mips64

An entry has been added to UPDATING and some foot-shooting protection (complete
with warnings which should become errors in the near future) to the top-level
base system Makefile.


# 228137 29-Nov-2011 fjoe

- 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]


# 228124 29-Nov-2011 fjoe

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.


# 217123 07-Jan-2011 imp

Retire TARGET_ABI.

Implement MACHINE_ARCH=mips64e[lb] to build N64 images. This replaces
MACHINE_ARCH=mipse[lb] TARGET_ABI=n64.

MACHINE_ARCH=mipsn32e[lb] has been added, but currently requires
WITHOUT_CDDL due to atomic issues in libzfs. I've not investigated
this much, but implemented this to preserve as much of the TARGET_ABI
functionality that I could. Since its presence doesn't affect the
working cases, I've kept it in for now.

Added mips64e[lb] to make universe, so more kernels build.

And I think this (finally) closes the curtain on the tbemd tree.


# 217100 07-Jan-2011 kib

Introduce make variable ACFLAGS used to supply additional flags to
cc driver when compiling assembler source file that is preprocessed.


# 215149 11-Nov-2010 dim

Fix typo, and re-wrap paragraph.


# 212422 10-Sep-2010 rpaulo

Add the DTRACE variable that points to the executable.

Sponsored by: The FreeBSD Foundation


# 211243 12-Aug-2010 will

Fix buildworld -DNO_CLEAN when using with Perforce, which marks files as
read-only by default, meaning files copied can't be overwritten next time.

Reviewed by: imp
Approved by: ken (mentor)


# 210636 30-Jul-2010 rpaulo

Fix previous commit: I forgot to include parenthesis.

Submitted by: anonymous


# 210612 29-Jul-2010 rpaulo

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


# 209868 10-Jul-2010 nwhitehorn

Minor modifications to know what to do with powerpc64.


# 209024 11-Jun-2010 imp

Merge from tbemd branch:

Introduce MACHINE_CPUARCH. Many different MACHINE_ARCHs will be built
from one MACHINE_CPUARCH. This will allow us to move to a more
standard MACHINE_ARCH for mips and arm which exist in many different
endian variants, and for powerpc where both 32 and 64 bit binaries are
generated from the same sources.

Reviewed by: arch@ (mostly silence though)


# 206082 02-Apr-2010 netchild

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@


# 204024 17-Feb-2010 marcel

Unbreak WARNS=6 builds for C++ code: -Wold-style-definition is not accepted
by the C++ compiler. Filter it out.


# 202807 22-Jan-2010 sepotvin

Introduce two new flags PO_CFLAGS and PO_CXXFLAGS to make it possible
to have different flags when building profiled objects.

MFC after: 1 month


# 179184 21-May-2008 jb

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.


# 177925 04-Apr-2008 imp

MFp4 (mips2-jnpr):
o Default to -O on mips as well as arm. -O2 has been strongly implicated
in many problems in the past, so we're taking a conservative approach
until the problems are well understood.


# 177865 02-Apr-2008 obrien

PR ports/121363 (& ports/73797) has been committed, so we can now go back
to JB's revision 1.96 change to remove -fno-strict-aliasing from CFLAGS.

This makes the default CFLAGS to match the simple defaults that the
tinderboxes use. By using -fno-strict-aliasing by default we are
choosing to ignore problems in code which had the potential to
shoot ourselves in the foot.


# 176806 04-Mar-2008 obrien

Temporarily back out revision 1.98 to give Portmgr some time to
address PR ports/121363 (current day re-opening of PR ports/73797)
to make ports CFLAGS more independent of src/'s CFLAGS WRT aliasing.

Discussed with: brooks


# 176804 04-Mar-2008 obrien

Back out revision 1.97, which backed out part of revision 1.96.
Change the default CFLAGS to match the simple defaults that the
tinderboxes use. By using -fno-strict-aliasing by default we are
choosing to ignore problems in code which had the potential to
shoot ourselves in the foot.


# 173959 26-Nov-2007 jb

Although the entire src tree builds cleanly now without -fno-strict-aliasing
in the default CFLAGS, we're in the middle of a ports freeze, so we can't
really go making the corresponding change to the ports mk files.

I'll take -fno-strict-aliasing out again when the ports freeze ends.


# 173850 22-Nov-2007 jb

Re-enable -Werror again.

This time, change the default CFLAGS to match the simple defaults that
the tinderboxes use. That is, don't use -fno-strict-aliasing by default.

My last attempt to re-anable -Werror gave me a lesson in what strict
aliasing is all about. There was code in libthr that wasn't 64-bit clean.
The default use of -fno-strict-aliasing hid that.

By using -fno-strict-aliasing by default we were choosing to ignore
problems in code which had the potential to shoot ourselves in the
foot. Sometimes it would be the 64-bit foot. I have both feet. The left
ones are 32 bits and the right ones are 64 bits. Don't ask about my
endian orientation. :-)

The -fno-strict-aliasing compiler arg can still be used if NO_STRING_ALIASING
is define in make.

We are early in the FreeBSD 8 development, so we have the opportunity to
wait and see if this works for us. I am sure that people will complain.
We can easily revert this. All I ask is that we take sides: clean code or
not. YMMV.

Note that by using -fno-strict-aliasing the build won't actually break.
Only where WARNS is set (and -Werror is used) will a compiler warning break
the build. The use of WARNS levels implies (to me at least) that the
developer has taken some care to make the code pass basic checks. This
commit makes those checks just a little bit more strict.


# 173747 19-Nov-2007 jb

Weed out a warning argument that isn't applicable to C++ code.


# 173375 05-Nov-2007 cognet

Switch arm to -O until the -O2 issues are resolved.

MFC After: 3 days


# 173075 27-Oct-2007 yar

Allow the shell used by make(1) to be changed early via the
__MAKE_SHELL variable. This feature isn't supposed to be in wide
use, but it's needed now to make `installworld' independent of the
stock binaries and libs so that radical ABI changes can go in safely.

Reviewed by: ru


# 171837 14-Aug-2007 delphij

Restore -O2 optimization after gcc 4.2.1 import, which has
fixed the issue raised by gcc 4.2.0.

Tested with: test case found in gcc bug 32500
Approved by: re (kensmith), ache, kan


# 171134 01-Jul-2007 ache

Switch to "-O1 -pipe" as cross-build compatible gcc workaround.

"Looks like Alexander chimed in with "I'm comfortable with that until we
can import a fixed GCC"."

Approved by: re (kensmith)


# 171077 28-Jun-2007 ache

Back out gcc workaround per re@ request. Details:
"There seems to be some continuing discussion about how this is best fixed,
and we'd like to get Alexander (as our gcc guru) to opine on a final
solution before picking one. In the mean time, could you back out the
original commit (sys.mk:1.89)?"

Approved by: re (rwatson)


# 171049 26-Jun-2007 ache

This is temp workaround of nasty gcc 4.2.0 -O2 bug which may skip the rest
of the loop when arrays used inside.
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=32500

Approved by: re (kensmith)


# 163064 06-Oct-2006 lesi

Remove X11BASE from here so the one from bsd.port.mk has a chance to set
default. Grepping through src shows only gnu/usr.bin/groff which doesn't
use it in src build and OpenSSH for which this was a NOOP.

Discussed with: des, ru
Approved by: ru


# 150674 28-Sep-2005 ru

We bootstrap make(1) if necessary during an upgrade, so checking
if MACHINE_ARCH is defined is no longer needed.


# 145681 29-Apr-2005 harti

Toggle on warnings. This resolves the problem with building old releases
(getting zillions of warnings). Building an old release uses that release's
sys.mk which does not switch on these warnings, so make will be silent.
They can be switch on on the command line with the -x option to make.
This has been tested by building RELENG_5_4 on CURRENT.


# 145644 28-Apr-2005 darrenr

IPFIlter problems that prevented building should all now be resolved so
remove this temporary measure.


# 145597 27-Apr-2005 scottl

Disable the IPFILTER bits until they compile again. This can be overriden
by adding WANT_IPFILTER to /etc/make.conf. Note that this is only a partial
hack and only works when building the world and kernel the 'sanctioned' way.
I hope that this hack is only temporary and can be reverted soon.


# 139232 23-Dec-2004 ru

Include bsd.compat.mk early from sys.mk, enough for makefiles
using conditional statements to see the new spellings of NO_*
knobs (in case user still uses old spellings).

Reported by: kris


# 137562 10-Nov-2004 obrien

Compiling with 'strict-aliasing' optimization breaks some [notable] ports.
GCC turns on 'strict-aliasing' optimization at all levels above -O[1], so
explicitly turn it off when using compiling with the -O2 optimization level.


# 136954 25-Oct-2004 des

Switch the default CFLAGS to -O2 -pipe.

Submitted by: obrien


# 133369 09-Aug-2004 harti

Use the '+' flag to make make recurse into sub-directories even when
given -n. For POLA reasons this behaviour is switched on only when
at least two -n flags are given to make. One -n flag keeps the old behaviour
of showing the shell command that would recurse into the sub-directories.

Discussed with: ru


# 129163 12-May-2004 bde

Moved FreeBSD build pollution (/etc/make.conf) and zombie aout support
(OBJFORMAT) into a non-POSIX section.


# 129162 12-May-2004 bde

Removed conditional include of /etc/make.conf.local and the error for the
existence of this file. This stopped working more than 4 years ago when
the generation of the error was added in rev.1.44. The .error directive
gives fatal errors, so stale /etc/make.conf.local files must have been
gone away more than 4 years on systems where make(1) works.


# 129086 10-May-2004 des

-W{missing,strict}-prototypes do not make sense for C++, and gcc34 will
complain about them, so remove them from CXXFLAGS.


# 128480 20-Apr-2004 ru

g++(1) is unhappy with -Wnested-externs.

Prodded by: des


# 125445 04-Feb-2004 bde

Fixed breakage of POSIX support in rev.1.31. -pipe was added to
CFLAGS in all cases, but POSIX requires a default of -O. Adding
-pipe unconditionally still is still broken for non-gcc compilers
in the non-POSIX case.


# 125382 03-Feb-2004 ru

A shorter version of keeping all -std= options out of CXXFLAGS.


# 125119 27-Jan-2004 ru

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.


# 120713 03-Oct-2003 ru

Removed the ancient .LIBS setting that causes non-existent
libraries to be reported as up-to-date.

Before:

# make -f /dev/null nonexistent.a
`nonexistent.a' is up to date.

After:

# make -f /dev/null nonexistent.a
make: don't know how to make nonexistent.a. Stop

PR: bin/44137 (part of)


# 120485 26-Sep-2003 markm

Separate out userland linting and kernel linting a bit more. This
make things a bit easier for folks using lints other than the
"base" lint.


# 117173 02-Jul-2003 ru

Don't trust sys.mk,v 1.61 commit log, and make .asm alias for .S.


# 117122 01-Jul-2003 ru

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


# 117084 30-Jun-2003 ru

Propagate the ${AINC} knob (assembler include) to sys.mk,
and remove the .S.o transformation rule from bsd.lib.mk.


# 115645 01-Jun-2003 obrien

Use a bigger hammer -- keep all -std= out of CXXFLAGS.
Also allow for "CSTD=" in a Makefile.


# 113851 22-Apr-2003 ru

Axe CXXINCLUDES from CXXFLAGS, it serves no useful purpose anymore.

Reviewed by: bde


# 105327 17-Oct-2002 ru

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


# 103713 20-Sep-2002 markm

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.


# 103436 16-Sep-2002 peter

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


# 95251 22-Apr-2002 ru

Make .asm transformation rules synonyms to the .s rules.


# 95064 19-Apr-2002 obrien

Add .asm as an alias for .s. .asm is common in contribed sources.

Helps with: gcc31 build.


# 94940 17-Apr-2002 ru

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.


# 92813 20-Mar-2002 ru

Make lint(1) a cross-tool.

(See commit log for usr.bin/xlint/Makefile,v 1.11 for what was wrong
with enabling build of lint libraries in rev. 1.12.)

This fixes cross-arch compiles (running binaries for a different arch
when generating lint.7 and lint libraries) and cross-branch compiles
(4.x -> 5.0 buildworld should be working again).


# 92546 18-Mar-2002 imp

__MAKE_CONF?=/etc/make.conf
Use this where we are now using /etc/make.conf.

This allows people to override the current default of always including
/etc/make.conf. Setting __MAKE_CONF to /dev/null disables it
completely, while setting it to something else allows one to override
what is on the system. This can be desirable in situations where a
machine has many users and some of them want different defaults, or
defaults appropriate to cross building to be different than those for
normal building.

Not objected to by: arch@


# 92491 17-Mar-2002 markm

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.


# 82650 31-Aug-2001 alex

Final way: Don't include /etc/defaults/make.conf at all. It wasn't
supposed to be edited by the user and didn't define important things,
thus we can just skip it (that's where it differs from the make.conf.local
change).

Submitted by: ru


# 82648 31-Aug-2001 alex

Don't .error, if /etc/defaults/make.conf exists. This breaks -CURRENT
buildworlds on a -STABLE machine.

Reminded by: ru


# 82604 30-Aug-2001 alex

Move /etc/defaults/make.conf to /usr/share/examples/etc/make.conf as
discussed on the arch@ mailinglist (after repo-copy).

sys.mk will .error if it finds /etc/defaults/make.conf but include
it anyways (this is the same behaviour as with the make.conf.local
removal).

/usr/share/examples/etc/make.conf has BDEFLAGS commented out now,
since it's only an example file.

Adjust all textes that talk about make.conf or defaults/make.conf to
match the new situation.


# 78347 16-Jun-2001 obrien

Add the ".FreeBSD" symbol so we can do things like ".if define(.FreeBSD)"
in Makefile's shared with NetBSD.


# 77818 06-Jun-2001 obrien

Add the single suffix rules for FORTRAN.


# 77817 06-Jun-2001 obrien

Add the single suffix rules for C++.
(While there, I also moved the single suffix C rules beside the double
suffix ones so they are easier to find)

PR: 24438
Submitted by: Georg-W. Koltermann <gwk@sgi.com>


# 72878 22-Feb-2001 kris

Overhaul the MACHINE_CPU behaviour:

* Rip out MACHINE_CPU stuff from sys.mk and include a new <bsd.cpu.mk>
after we pull in /etc/make.conf. We need to do it afterwards so we can
react to the user setting of the:

* CPUTYPE variable, which contains the CPU type which the user wants to
optimize for. For example, if you want your binaries to only run on an
i686-class machine (or higher), set this to i686. If you want to support
running binaries on a variety of CPU generations, set this to the lowest
common denominator. Supported values are listed in make.conf.

* bsd.cpu.mk does the expansion of CPUTYPE into MACHINE_CPU using the
(hopefully) correct unordered list of CPU types which should be used on
that CPU. For example, an AMD k6 CPU wants any of the following:
k6 k5 i586 i486 i386
This is still an unordered list so the client makefile logic is simple -
client makefiles need to test for the various elements of the set in
decreasing order of priority using ${MACHINE_CPU:M<foo>}, as before.
The various MACHINE_CPU lists are believed to be correct, but should be
checked.

* If NO_CPU_CFLAGS is not defined, add relevant gcc compiler optimization
settings by default (e.g. -karch=k6 for CPUTYPE=k6, etc). Release
builders and developers of third-party software need to make sure not to
enable CPU-specific optimization when generating code intended to be
portable. We probably need to move to an /etc/world.conf to allow the
optimization stuff to be applied separately to world/kernel and external
compilations, but it's not any worse a problem than it was before.

* Add coverage for the ia64/itanium MACHINE_ARCH/CPUTYPE.

* Add CPUTYPE support for all of the CPU types supported by FreeBSD and gcc
(only i386, alpha and ia64 first, since those are the minimally-working
ports. Other architecture porters, please feel free to add the relevant
gunk for your platform).

Reviewed by: jhb, obrien


# 72751 20-Feb-2001 kris

Turns out we do need to do bootstrapping of MACHINE_CPU here: make(1) won't
set the variable until you rebuild it, and the alternative is to be stuck
playing games with ``.if defined(MACHINE_CPU) && ... '' for all eternity.
We now set up the reasonable default for i386 and alpha here -- given this
it probably makes sense to remove the corresponding code from make(1).


# 72719 19-Feb-2001 kris

Remove bogus setting of MACHINE_CPU here. There is no need for it.

Submitted by: bde


# 72679 19-Feb-2001 kris

Introduce support for using OpenSSL ASM optimizations. This is done
through the use of a new build directive, MACHINE_CPU, which contains a
list of the CPU generations/features for which optimizations are desired.
This feature will be extended to cover the ports tree in the future.

Currently OpenSSL provides optimizations for i386, i586 and i686-class
CPUs. Currently it has not been tested on an i386 or i486.

Teach make(1) to provide sensible defaults for MACHINE_CPU if it is not
defined (namely, the lowest common denominator CPU we support for each
architecture). Currently this is i386 for the i386 architecture and ev4
for the alpha. sys.mk also sets the variable as a last resort for
consistency with MACHINE_ARCH and bootstrapping from very old versions of
make.

Benchmarks show a significant speed increase even in the i386 case, with
additional improvements for i586 and i686 systems. For maximum performance
define MACHINE_CPU=i686 i586 i386 in /etc/make.conf.

Based on a patch submitted by: Mike Silbersack <silby@silby.com>
Reviewed by: current


# 59474 21-Apr-2000 kris

Correct a typo


# 52572 27-Oct-1999 dillon

make.conf is being made to conform to the /etc/defaults/ standard that
was settled on a few months ago.

Approved by: "Jordan K. Hubbard" <jkh@zippy.cdrom.com>


# 50476 27-Aug-1999 peter

$Id$ -> $FreeBSD$


# 39208 15-Sep-1998 obrien

Revert to rev 1.41.
Some didn't like it.


# 39163 14-Sep-1998 obrien

Add ${RM} for compatability with SunOS.
Many use ${RM} in their ``clean'' targets.


# 38614 28-Aug-1998 dillon

add support for /etc/make.conf.local


# 38177 08-Aug-1998 jb

Remove the alpha specific __NETBSD_SYSCALLS from CFLAGS. This can still
be added in /etc/make.conf. Yes folks, the alpha kernel is coming to
a screen (and hopefully a disk) near you. Thanks to Doug.


# 38042 03-Aug-1998 bde

Fixed building -current under 2.2.6 using `make world'. Moved some
recently added definitions from sys.mk to bsd.own.mk. Include the
src-relative bsd.own.mk in src/Makefile to pick up all new definitions.
Don't check that MACHINE_ARCH is defined in src/Makefile, since it is
(and should have been) guaranteed to be defined.


# 36911 12-Jun-1998 peter

Move bsd.own.mk after make.conf, this allows BINFORMAT to be set in
/etc/make.conf - it changes LIBDIR in bsd.own.mk. Note that there are
still problems with this, individual Makefiles cannot override BINFORMAT.


# 36673 05-Jun-1998 dt

Recognize ".cpp" as a C++ suffix.

PR: 3476


# 36618 03-Jun-1998 jb

Fix my last commit which got caught in the cvs/cvsup cycle.
I'm told that I botched the tabs too. I'm not sure they are fixed now
because I find that rather tedious.


# 36609 03-Jun-1998 jb

Uh, the NetBSD syscall define spam for alpha has to go after /etc/make.conf
so that it works all the time.


# 36606 03-Jun-1998 jb

In the case of alpha (only), more than just libc needs to know that
NetBSD syscalls are being used, so spam all compiles with the define
that indicates this.


# 36055 15-May-1998 bde

Oops, forgot references in previous commit.

Submitted by: Brian Cully <shmit@erols.com>
PR: 6178


# 36054 15-May-1998 bde

Support Objective C almost as well as C++.

Notes:
- We no longer use -fgnu-runtime in bsd.lib.mk, since it is the default
and bsd.lib.mk is the wrong place to override it.
- Gnu C doesn't have a special compiler driver for Objective C like it
does for C++. The defaults are suitable for Gnu C. Use `OBJCLIBS='
in /etc/make.conf for POC.


# 35578 01-May-1998 jkh

Add -pipe to default CFLAGS. The optimization it provides is cheap
and does not require any special action on the part of the user to
take advantage of it. And no, it probably won't work with c89. Cry me
a river!


# 34829 23-Mar-1998 eivind

Support new version of global.

Submitted by: Shigio Yamaguchi <shigio@wafu.netgate.net>
Tested by: make buildworld


# 33685 20-Feb-1998 bde

Don't pass the undocumented flags `-se' to gtags (gtags ignores them for
compatibility).


# 32661 20-Jan-1998 jb

FreeBSD's make knows about the MACHINE, but not the MACHINE_ARCH unless
it is built with this defined (which it isn't by default). This change
to sys.mk treats the absence of MACHINE_ARCH as i386 on the assumption
that it will be appropriately defined (as something else) on any other
architecture. When building FreeBSD's make with NetBSD tools, both
MACHINE and MACHINE_ARCH are correctly set (e.g. when bootstrapping
FreeBSD's make on NetBSD/mvme68k, MACHINE=mvme68k and
MACHINE_ARCH=m68k). This isn't really needed for the alpha which
has both defined as 'alpha', but I thought it was worth getting the
distinction between a MACHINE and a MACHINE_ARCH correct now.

Now, shouldn't PC98 have MACHINE=pc98 and MACHINE_ARCH=i386 ??!!


# 32495 13-Jan-1998 jb

Choose the default binary format based on machine type.
Alpha is elf, not aout.


# 29141 05-Sep-1997 peter

Restore the BINFORMAT?= in sys.mk, or it's painfully difficult to use
.if in Makefiles. bsd.prog.mk and bsd.lib.mk do not depend on it however.

Allow overriding of the -soname arg when building the lib*crypt.so* libs
since libdescrypt.so and libscrupt.so both need a -soname of libcrypt.so
so that the symlink is obeyed at runtime rather than at compile time.


# 29129 05-Sep-1997 peter

Change the BINFORMAT definitions so that they do not depend on sys.mk,
since 2.1.x make(1) apparently does not have the -m switch to set both
the the bsd.*.mk and sys.mk location, and this breaks 'make world' from a
2.1.x system.


# 28945 30-Aug-1997 peter

A first cut at some rules for building elf shared libs. Of particular
note, using "-Wl,-f" to generate a library objects list doesn't work
anymore since the hack to ld hasn't been incorporated into binutils-2.8.
(and the -f switch is used for something else already)

This is disabled by default, don't panic! :-)


# 24861 13-Apr-1997 jkh

Support GLOBAL style tags.


# 22988 22-Feb-1997 peter

Revert $FreeBSD$ to $Id$


# 21673 14-Jan-1997 jkh

Make the long-awaited change from $Id$ to $FreeBSD$

This will make a number of things easier in the future, as well as (finally!)
avoiding the Id-smashing problem which has plagued developers for so long.

Boy, I'm glad we're not using sup anymore. This update would have been
insane otherwise.


# 21582 12-Jan-1997 steve

Revert changes to make the .y.c rule 'make -j n' safe.


# 21354 06-Jan-1997 steve

Make the .y.c rule 'make -j n' friendly.

Inspired by: bde and brian@mediacity.com


# 19481 06-Nov-1996 alex

Style changes: $(...) --> ${...}, consistent placement of -c.

Suggested by: bde (via steve)


# 19343 03-Nov-1996 steve

Add in POSIX 1003.2 mandated rules. NOTE: these
will only be enabled when the first non-comment line
of the Makefile contains the .POSIX directive.

Submitted by: Joerg Wunsch <joerg@freebsd.org>


# 16068 02-Jun-1996 phk

Back out yacc change.


# 16011 30-May-1996 phk

Make the yacc rules reentrant
Suggested by: peter


# 15959 28-May-1996 phk

Avoid a ton of "mv" when making libs by using -O to ld.
Make lex rules reentrant.


# 15697 09-May-1996 phk

Make some rules reentrant, and mark the onces that cannot be.


# 14777 23-Mar-1996 wosch

delete ``.if ${MACHINE} == "sparc"''


# 11613 21-Oct-1995 bde

Add `.sh' suffix and rule.

Enable `.c' rule. (Null suffix rules were disabled because of bugs in old
versions of make.)

Add ${LDFLAGS} to all rules that involve linking.


# 10028 11-Aug-1995 dg

Changed default optimization from -O2 back to -O...gcc 2.6.* has serious
bugs when using -O2.


# 5257 28-Dec-1994 ache

Move INSTALL?=install line duplicated into each .mk to sys.mk
instead


# 4224 07-Nov-1994 phk

Update make.conf and sys.mk to reflect the most recent advances in
civilization: Use -O2 and MSUN as default, and X11 is in /usr/X11R6


# 3292 02-Oct-1994 rgrimes

Add .S to SUFFIXES and add .S.o: rule.
Submitted by: bde


# 2535 07-Sep-1994 rgrimes

The .c: rule added by Bruce, but as yet unused, causes serious problems
for the 1.1.5 FreeBSD make. For now just comment it out until a fix for
make can be found.

Reviewed by: bde
Submitted by: rgrimes


# 2488 04-Sep-1994 jkh

Add an X11BASE variable that currently points to /usr/X386 but will
be easy to change to /usr/X11R6 if and when the time comes. This is
to deal with things like xditview which otherwise had hardcoded assumptions
about where X lived. Yuck.
Submitted by: jkh


# 2419 31-Aug-1994 paul

Changed g++ to c++
Reviewed by:
Submitted by:


# 2340 28-Aug-1994 bde

Recover improvements in 4.4lite version that were clobbered by the
previous commit:
+ Everything is initialized using ?= instead of =.
+ Nicer formatting (more white space).
+ .c: rule.

Add macros ECHO and ECHODIR. Both are normally `echo', but when
the make flags include -s, ECHO is set to `true' and when the make
flags include two or more -s's ECHODIR is set to `true'. @${ECHO}
should be used instead of @echo in most cases. ${ECHODIR} is
intended to be used mainly for messages about directory names.


# 1844 04-Aug-1994 wollman

Spplat our 1.1.5 `mk' ifiles over the top of the 4.4 ones. So far
as I can tell, this is ts the right thing to do.


# 1639 30-May-1994 rgrimes

This commit was generated by cvs2svn to compensate for changes in r1638,
which included commits to RCS files with non-trunk default branches.


# 1638 30-May-1994 rgrimes

BSD 4.4 Lite Share Sources