Commit Graph

774 Commits

Author SHA1 Message Date
Dag-Erling Smørgrav
776a9ddc8c In all situations where we need to bootstrap yacc, we also need to
bootstrap liby.  This was not readily apparent, because a normal 'make
buildworld' or 'make toolchain' builds liby before building anything
that uses yacc.  However, 'make kernel-toolchain' does not build
headers or libraries, so it was not possible to build a kernel from
head on, say, stable/9 without first building the complete toolchain.

MFC after:	1 week
2013-02-25 22:25:56 +00:00
Hiroki Sato
0af99eef9e - Fix libmd dependency. It is needed in the bootstrap library list because
usr.bin/xinstall depends on it.
- Remove libutil from usr.bin/xinstall/Makefile.  No symbol was actually used.

Reviewed by:	brooks
2013-02-14 08:32:07 +00:00
Brooks Davis
3e3812572d Add nmtree to ITOOLS if it is installed on the host instead of keying off
the BOOTSTRAPPING variable.  The previous test was wrong because
BOOTSTRAPPING is 0 in most cases.

Tested by:	db
2013-02-09 23:17:28 +00:00
Andrew Turner
1dc56acdf0 Fix xdev by using the install shell script as it knows about the -l
argument thile the local version install may not.
2013-02-04 09:34:25 +00:00
Hiroki Sato
de17cbcc7e - Add CHECKSUM.* support in Makefile[1].
- Use ln -fs to create a symlink.
- Remove pkgadd for docports.
- Use WITHOUT_JADETEX=yes instead of WITH_JADETEX=no.
- Add {WORLD,KERNEL}_FLAGS to [BTWK]MAKE.
- Use makefs(8) and gpart(8) for sparc64 ISO image[2].
- Add publisher option to makefs(8)[2].

Based on work by:	gjb[1]
Discussed with:		marius, nwhitehorn[2]
2013-02-03 10:26:24 +00:00
Brooks Davis
64dc091fdd Log the addition of login.conf.db, passwd, pwd.db, and spwd.db via cat -l.
Make cat a bootstrap tool to facilitate this.
2013-01-29 22:17:58 +00:00
Brooks Davis
beb7ecad2b Fix installworld when nmtree is not on the host by only adding it to
ITOOLS when we will be using the host copy.

Fix installkernel when -DNO_ROOT is set.
2013-01-29 21:48:10 +00:00
Brooks Davis
1113cd31a6 Fix installworld when the host does not need to bootstrap nmtree.
Reported by:	lev, jmg
2013-01-29 20:28:11 +00:00
Glen Barber
6784ea8536 Fix update method (s/SUP/CVS) warning.
Submitted by:	Ryan Stone
MFC after:	1 day
2013-01-25 21:44:45 +00:00
Brooks Davis
40f0cb19b5 Strip any trailing slash off of the -D argument to install to support the
rather fragile destdir stripping in the metalog.
2013-01-24 17:12:02 +00:00
Brooks Davis
4a63ae1150 Introduce a new option -DNO_ROOT that allows install and distribution
targets to be run without root privilege.

Information about ownership, group, flags, and suid bits are stored in
the file specified by METALOG which defaults to ${DESTDIR}/METALOG.
This file can be used in conjunction with bsdtar or makefs to generate
archives or file system images with correct permissions.

The packageworld target has been altered to use this metadata allowing
non-root releases (subject to further changes in release/Makefile.)

Sponsored by:	DARPA, AFRL
Reviewed by:	ian, ray
2013-01-22 21:10:03 +00:00
David Chisnall
c3b739c72e Fix spurious leading / on dtc path in Makefile.inc1. Spotted by jhb. 2013-01-22 19:40:26 +00:00
David Chisnall
af0dd31fc4 Import new (BSDL) device tree compiler. Now built by default, so that it can't
be used on the host system (and not installed on the device, if required).  The
GPL'd one is still available if there are any devices that need it (make
universe passes with it, including kernels that use fdt, but there may be some
out-of-tree ones).  WITH_GPL_DTC can be used to select the old one, for now.

Probably won't be MFC'd, but we'll remove the GPL'd version in head after the
new one has had a lot more testing and ship it in 10.0.
2013-01-22 17:49:51 +00:00
Glen Barber
6a473a7d9e Chase r245756 of make.conf(5):
- If update method is SUP_UPDATE or CVS, warn that those
  update methods are deprecated.

- While here, remove bogus NO_WWWUPDATE.

MFC after:	3 days
X-MFC-with:	r245756
2013-01-22 01:18:49 +00:00
Brooks Davis
706b1b65ae Always bootstrap nmtree if it is not available on the host. It is fairly
small and it is quite annoying to get all the way through buildworld
only to discover that you forgot the DB_FROM_SRC (or soon NO_ROOT)
option.
2013-01-21 23:12:50 +00:00
Brooks Davis
00f793f854 Remove a harmless (somewhat to my surprise) bogon that crept into r245440. 2013-01-18 22:17:21 +00:00
Brooks Davis
75534bda19 Rework the mtree portion of etc/Makefile's distrib-dirs target to run
mtree in a shell loop so there is only one mtree commandline.  Move the
implementation of LOCAL_MTREE into etc/Makefile.

Sponsored by:	DARPA, AFRL
Reviewed by:	mtree :)
2013-01-17 18:32:30 +00:00
Brooks Davis
c109162f52 Correct the distrib-dirs target in the -DDB_FROM_SRC case. 2013-01-17 18:26:56 +00:00
Brooks Davis
afd9b4631f Add a new LIBRARIES_ONLY make variable to disable the build and install
of files other than the actual libraries.

Use LIBRARIES_ONLY to supress the inclusion of files in the lib32
distribution that are duplicates of files in base.

Sponsored by:	DARPA, AFRL
Reviewed by:	emaste
2013-01-17 17:27:10 +00:00
Brooks Davis
41a8e2231d Add an option DB_FROM_SRC to use src/etc's user/group databases when
installing.  This allows things like running installworld for 10-CURRENT
on a 9.0-RELEASE system without adding extra users and groups to the
passwd and group files.

To prevent potentially risky uid/gid mismatches on systems with
non-standard local values, require that DESTDIR be set if DB_FROM_SRC is
set.

Sponsored by:	DARPA, AFRL
Reviewed by:	peter
2013-01-15 00:12:34 +00:00
Brooks Davis
0fc1aae5e2 Revert r245316. Systems with non-standard uids/gids are more prevalent
that I'd feared.  Discussion is ongoing about the scope of a safer
solution.
2013-01-11 23:44:35 +00:00
Brooks Davis
7ee2bf94f7 Use the -N option to install and nmtree to eliminate the need for the
checks for missing users and groups.

Sponsored by:	DARPA, AFRL
2013-01-11 23:08:19 +00:00
Brooks Davis
22c2069fc3 Use find -exec to install zoneinfo instead of requiring xargs to be an
install tool.

Suggested by:	delphij
2013-01-11 18:37:51 +00:00
Brooks Davis
3da2132e52 Add xargs to the set of install tools when zoneinfo is not disabled.
This fixes installworld which I had broken in r245265.

Reported by:	Nikolai Lifanov <lifanov@mail.lifanov.com>
2013-01-10 23:29:36 +00:00
Peter Wemm
248da532a4 Add auditdistd to the pre-install required uid check list. 2012-12-02 21:32:45 +00:00
Simon J. Gerraty
ddcc951f59 The build-tools step during build32 also needs the -legacy magic.
Approved by:	marcel (mentor)
2012-11-30 20:50:34 +00:00
Marcel Moolenaar
cff4243d09 Unbreak amd64 cross-build where amd64 is the target. While clang
may be installed as cc and we don't need to build gcc as a
cross-tools, we still build gcc and thus need cc_tools built
as a build tool. Not doing this results in building gengenrtl with
the target compiler while we need to run it on the build machine.
2012-11-20 03:21:26 +00:00
Dimitry Andric
0c704c35ef Work around pc98 tinderbox failures in sys/boot/pc98, by making sure a
cross gcc gets built during the cross-tools stage.

MFC after:	1 week
X-MFC-With:	242706
2012-11-10 16:08:21 +00:00
Marcel Moolenaar
c175365cec Add ATF to the build. This is may be a bit rought around the egdes,
but committing it helps to get everyone on the same page and makes
sure we make progress.

Tinderbox breakages that are the result of this commit are entirely
the committer's fault -- in other words: buildworld testing on amd64
only.

Credits follow:

Submitted by:	Garrett Cooper <yanegomi@gmail.com>
Sponsored by:	Isilon Systems
Based on work by:	keramida@
Thanks to:	gnn@, mdf@, mlaier@, sjg@
Special thanks to:	keramida@
2012-10-22 01:18:41 +00:00
Brooks Davis
29f5a35c4a Allow LOCAL_(DIRS,LIBS) to install files in directories not found in the
system mtree files via a LOCAL_MTREE variable which contains a list of
mtree files to be applyed along with the base mtree files to the tmp root
and DESTDIR.
2012-10-18 12:32:51 +00:00
Marcel Moolenaar
aae8db90ec Fix the showconfig target. bmake sends debug output to stderr.
Submitted by: Simon Garrety <sjg@juniper.net>
2012-10-07 17:48:38 +00:00
Marcel Moolenaar
8d6871f4a8 Fix 32-bit library builds after the removal of adding -E to make for AS,
CC, CXX and LD. This fix implements the intended as it should have been
implemented all along: by passing AS, CC, CXX and LD on the commandline
of the sub-make instead of in the environment of the sub-make.

Breakage pointed-out by: dim@
2012-10-07 16:45:38 +00:00
Marcel Moolenaar
0815243c39 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>
2012-10-06 20:01:05 +00:00
Brooks Davis
9215d178a4 Introduce a new make variable COMPILER_TYPE that specifies what
type of compiler is being used (currently clang or gcc).  COMPILER_TYPE
is set in the new bsd.compiler.mk file based on the value of the CC
variable or, should it prove informative, by running ${CC} --version
and examining the output.

To avoid negative performance impacts in the default case and correct
value for COMPILER_TYPE type is determined and passed in the environment
of submake instances while building world.

Replace adhoc attempts at determining the compiler type by examining
CC or MK_CLANG_IS_CC with checks of COMPILER_TYPE.  This eliminates
bootstrapping complications when first setting WITH_CLANG_IS_CC.

Sponsored by:	DARPA, AFRL
Reviewed by:	Yamaya Takashi <yamayan@kbh.biglobe.ne.jp>, imp, linimon
		(with some modifications post review)
MFC after:	2 weeks
2012-09-13 16:00:46 +00:00
David E. O'Brien
f59c1f67db Not all Pmake derivatives silently handle empty shell output, so ensure there
is something for make(1) to consume.  Bmake gives output such as:
   "warning: Couldn't read shell's output for "/bin/sh -c true"
Note we parted from traditional Pmake behavior in r18864 / r18255.
2012-09-12 14:44:25 +00:00
Glen Barber
10d2255f3b Fix 'distributeworld' target when WITHOUT_GAMES is set.
Reviewed by:	des
Approved by:	des
MFC after:	3 days
X-MFC-To:	9-only
2012-09-03 18:17:21 +00:00
Oleksandr Tymoshenko
4da573d910 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>
2012-08-15 03:21:56 +00:00
Martin Matuska
e9832bb1da Partial MFV (illumos-gate 13753:2aba784c276b)
2762 zpool command should have better support for feature flags

References:
https://www.illumos.org/issues/2762

MFC after:	2 weeks
2012-07-30 23:14:24 +00:00
David E. O'Brien
e324b4bc3d Add "hier" as an alternate spelling of "hierarchy" to match hier(9). 2012-07-03 06:41:00 +00:00
Brooks Davis
5814131a44 Minor wording change. The previous commit message should have included:
Sponsored by:	DARPA, AFRL
2012-06-15 19:42:49 +00:00
Brooks Davis
6e4ee6dd47 MFP4: 212854, 212854
Add a LOCAL_LIB_DIRS variable to complement the existing LOCAL_DIRS
and LOCAL_TOOL_DIRS variables.  Directories in LOCAL_LIB_DIRS are
built at the end of the _generic_libs target.

Reviewed by:	imp (212854)
2012-06-15 19:40:59 +00:00
Dimitry Andric
883e0f87a4 During buildworld and buildkernel, define EARLY_BUILD in the earlier
stages (build-tools, cross-tools, etc) of the build, so we can detect in
bsd.*.mk whether to pass compiler-specific flags to ${CC}.

In particular, this commit will allow using WITH_CLANG_IS_CC when the
base compiler is still gcc, and when ${CC}, ${CXX} and ${CPP} are left
at their defaults.  The early stages will then be built using gcc, and
no clang-specific flags will be passed to it.  The later stages will be
built as usual.

The EARLY_BUILD define can also serve other uses, such as building the
world stage C++ executables with libc++ instead of libstdc++: during the
early build stages, we cannot assume libc++ is already available, so we
must still build with libstdc++ at that time.

MFC after:	1 week
2012-06-03 20:35:41 +00:00
Dag-Erling Smørgrav
5bfe3851cf Bump __FreeBSD_version for the byacc import, and update _bootstrap_tools. 2012-05-22 15:59:07 +00:00
Marcel Moolenaar
727d8c8134 Fix bootstrapping from FreeBSD 7.x: we also need to build ar. 2012-05-19 02:08:52 +00:00
Warner Losh
9e460a98e6 By request, add back support from 7.0 and newer, since the changes for
that are so minimal.
2012-05-16 04:21:21 +00:00
Warner Losh
0446f88183 Do a bit of house cleaning and remove the old, obsolete upgrade from
6.0 support and bump the minimum version to 8.0.  These versions have
not been tested and are believed to be broken.
2012-05-10 11:06:19 +00:00
Jeremie Le Hen
51a65f35df Introduce the ${SHLIB_LDSCRIPT} variable to have an ld(1) script
instead of a symlink for .so files.

Reviewed by:    kib, kan (previous version), dim
Approved by:    kib (mentor)
Silence from:   -hackers@
MFC after:	1 week
2012-05-07 09:00:30 +00:00
Warner Losh
ae8662c7ed Fix ordering issue. 'make xdev' can fail with -jN because it tries to run the
xdev-install step while xdev-build is still running.

Submitted by:	Ian Lepore
2012-04-26 23:12:52 +00:00
Juli Mallett
f8e8c8faed o) Fix mips/mips -> mips for Makefile.inc1.
o) Rebuild src.conf.5.
2012-03-29 03:04:59 +00:00
Juli Mallett
84db023ec1 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.
2012-03-29 02:54:35 +00:00