Commit Graph

774 Commits

Author SHA1 Message Date
Warner Losh
9b3d99149a Hmmm, specifying TARGET and TARGET_ARCH in the environment doesn't
seem to work when building xdev anymore (most likely my changes lately
moving the TARGET guessing stuff to Makefile from Makefile.inc1, but I
really don't grok why).  Fix make xdev by putting them on the command
line.  This will work either way while I try to figure it out.
2011-02-11 04:03:39 +00:00
Warner Losh
f263e792e9 CPUTYPE is now a required define for calling Makefile.inc1 diretly, so
make sure we define it for the xdev stuff.

Move xdev stuff to be last again in this file.

# xdev-build works now, but xdev-install appears to be broken though.
2011-02-11 02:37:47 +00:00
Warner Losh
fbd0c28059 You are now *REQUIRED* to pass both TARGET and TARGET_ARCH to any
invocations of Makefile.inc1 (since that's supposed to be an internal
interface for world and related targets).  Document this with a .error
message.  For a transition period, support passing in just TARGET, but
give a .warning for that case: I plan on removing it in 9.0...
2011-02-10 19:58:21 +00:00
Warner Losh
fda074e41d Move the architecture guessing from Makefile.inc1 to Makefile. We
need to do this because variables specified on the command line
override those specified in the Makefile.  This is why we also moved
from TARGET to _TARGET in Makefile, and then set TARGET on the command
line when we fork a submake with Makefile.inc1.

This makes mips/mips work again, even without the workaround committed to
lib/libc/Makefile.
2011-01-31 15:17:47 +00:00
Warner Losh
cd2ae2532f 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.
2011-01-07 20:26:33 +00:00
Mark Murray
f0a0ad3b58 Do not lint code beyond necessity (with apologies to Wiliam of Ockham).
Don't lint externally maintained CDDL code, or relint the 32-bit libraries
in amd64 mode.
2010-11-18 16:32:52 +00:00
Warner Losh
80595f8a8f add / to the translation of TARGET_ARCH to TARGET 2010-11-14 05:01:40 +00:00
Warner Losh
6451dd5ebb The fixes for mips/mips arm/arm compat hacks broke if TARGET or
TARGET_ARCH wasn't defined.  Fix it for that case.

Submitted by:	Garrett Cooper
2010-11-13 20:41:47 +00:00
Warner Losh
f10ff4abcd Add legacy names for mips:mips and arm with TARGET_BIG_ENDIAN, for the moment. 2010-11-13 18:39:24 +00:00
Ed Schouten
39cd938c39 Replace libgcc.a by libcompiler_rt.a.
libcompiler_rt.a is a BSD licensed C language runtime, which implements
many routines which are linked into binaries on architectures where
certain functionality is missing (e.g. 64 bits mul/div on i386).

Unfortunately, libcompiler_rt cannot replace libgcc entirely. Certain
features, such as an unwinder for exception handling, are missing.
That's why only libgcc.a is replaced for now, because this one does seem
to be complete.

Tested by:	rene (amd64), nwhitehorn (powerpc), droso (i386 exprun)
		and many others. Thanks!
Obtained from:	user/ed/compiler-rt
2010-11-11 15:48:27 +00:00
Warner Losh
bf4724fa19 Merge from tbemd:
o TARGET=mips --> little endian 32-bit mips build
o mipsel and mipseb TARGET_ARCH are both mips TARGETs
o Add some more architecture combinations
2010-11-09 22:32:09 +00:00
Nathan Whitehorn
87ff4bceb6 Check TARGET_ARCH as well as TARGET to determine if we are doing a cross
build. This is necessary to be able to cross-build 32-bit PowerPC from
a 64-bit PowerPC host.

Reviewed by:	imp
2010-09-08 19:53:16 +00:00
Nathan Whitehorn
b12277d1d4 Repair some build breakage introduced in r211725 and garbage collect some
code made obsolete in the same commit.
2010-08-28 15:03:11 +00:00
Warner Losh
dda89c7303 The order was correct before. I'd talked to Nathan about this before,
so this must have been mismerged into tbemd before I merged it back to
head.  This unbreaks this on powerpc64

Submitted by:	nathanw@
2010-08-24 16:29:09 +00:00
Warner Losh
25faff346c MFtbemd:
Prefer MACHNE_CPUARCH to MACHINE_ARCH in most contexts where you want
to test of all the CPUs of a given family conform.
2010-08-23 22:24:11 +00:00
Warner Losh
767bb8496a Minor tweak from tbemd 2010-08-23 01:07:07 +00:00
Rui Paulo
029a737371 Don't link drti.o with libelf_pic.a. This means that all software with
userland SDT probes must be linked with libelf explicitly.

Requested by:	kib
Sponsored by:	The FreeBSD Foundation
2010-08-21 17:29:59 +00:00
Rui Paulo
ad8a0e422c Add clang to the cross-tools build stage.
Submitted by:	Dimitry Andric <dimitry at andric.com>
2010-08-21 15:39:06 +00:00
Rui Paulo
9510083e01 Add libelf to the prebuild libs.
This is needed for the DTrace instrumentation object.

Sponsored by:	The FreeBSD Foundation
2010-08-21 13:42:12 +00:00
Dag-Erling Smørgrav
50e2303d92 Revert r211436; it was a good idea, but not fully thought out. 2010-08-18 09:18:37 +00:00
Dag-Erling Smørgrav
d350d2cd94 Split kernel stage 3.2 (build everything) into 3.2 (build the kernel)
and 3.3 (build the modules).  IMHO, this makes it a little easier to
track the progress of a kernel build using whereintheworld et al.

MFC after:	3 weeks
2010-08-17 20:26:17 +00:00
Rafal Jaworowski
c606b778d1 Relax FDT_DTS_FILE validation (and unbreak world build).
Pointed out by:	kib
2010-07-15 13:21:25 +00:00
Rafal Jaworowski
24c00a9054 Fix FDT_DTS_FILE parsing to properly retrieve its value. This unbreaks the
'builddtb' target.

Make the processing more robust against non-existent kernel config files
(pointed out by imp@).
2010-07-15 10:49:07 +00:00
Nathan Whitehorn
8bb2397180 Connect powerpc64 to the build. It is not presently part of make universe,
which will be added soon.

Reviewed by:	imp
2010-07-13 21:19:59 +00:00
Warner Losh
d587260195 Merge from tbemd:
use MACHINE_CPUARCH instead of MACHINE_CPU since the sources for the
CSU is based on MACHINE_CPUARCH

Reviewed by:	arch@ (twice)
2010-06-24 17:53:25 +00:00
Warner Losh
4a5faa676e Merge from tbemd:
change the name of the object tree from ${TARGET} to
${TARGET}.${TARGET_ARCH} so we can do both big and little endian
builds in the same tree.

Reviewed by:	arch@ (twice)
2010-06-24 16:32:20 +00:00
Warner Losh
9998d0c0f0 Merge from TBEMD:
Rather than having arch specific code in Makefile.inc1, generalize so
that we can control the settings of different options on a per
architecutre basis.

Reviewed by:	arch@ (twice)
2010-06-24 16:28:52 +00:00
Rafal Jaworowski
df06a5758b Use awk alone for extracting FDT_DTS_FILE instead of grep/cut, which is
simpler and more robust.

Submitted by:	Andrzej Tobola
2010-06-16 16:52:35 +00:00
Rafal Jaworowski
3c5326bf4a Connect FDT infrastructure to the build system.
Reviewed by:	imp
Sponsored by:	The FreeBSD Foundation
2010-06-13 13:02:43 +00:00
Roman Divacky
6513cfc82f Hook clang into the build on i386/amd64/powerpc.
Approved by:	ed (mentor)
2010-06-09 19:57:20 +00:00
Jung-uk Kim
5ba4657c49 Revert r208353. It did not work as I expected because WITHOUT_MAN is set
for bootstrap-tools target and WITHOUT_MAN_UTILS was implied by default.

Pointy hat:	jkim
2010-05-20 20:15:56 +00:00
Jung-uk Kim
8a4b934bfe We do not have to build makewhatis as a bootstrap tool when it is disabled
by WITHOUT_MAN_UTILS.
2010-05-20 16:24:12 +00:00
Jung-uk Kim
b05756ac5e Revert r208324. We still need it for installworld as $PATH is overriden. 2010-05-20 06:51:01 +00:00
Jung-uk Kim
727b493396 Remove makewhatis(1) from bootstrap tools. We no longer support source
upgrades from versions prior to 6.0 on head.
2010-05-20 00:13:01 +00:00
Martin Matuska
7fbeb03eb7 Enable liblzma support in libarchive
Adjust dependencies for programs using libarchive
Add xz and linkage against liblzma to rescue system

Approved by:	kientzle, delphij (mentor)
MFC after:	2 weeks
2010-05-10 15:28:44 +00:00
Florent Thoumie
762c7db2e8 - Take libinstall.a out of pkg_install and make it a proper shared library.
- Rework the wrapper support to check libpkg version as well as pkg_install
version.
- Add libfetch to _prebuild_libs.
- There are no new features introduced.

Notes: the API is not stable, so basically, do not use libpkg in your
projects for now. Also there's no manpage for libpkg yet, because the API
will change drastically. I repeat, do not use libpkg for now.
2010-04-23 11:07:43 +00:00
Alexander Leidinger
096924c9b7 Remove explicit setting of NO_CTF in WMAKEENV and in the make call for
the buildkernel. This way makeoptions WITH_CTF=yes not only works when
compiling the tradtitional way, but also when using buildkernel. This
does not enable the CTF part of the world, it still defaults to without
CTF info.

The cross/build-tools/bootstrap targets are not affected by this, they
still have and should keep the explicit NO_CTF.

Notified by:	np
2010-04-22 09:30:02 +00:00
Warner Losh
f672e5fbe2 Add note about TARGET_ARCH 2010-04-14 18:56:07 +00:00
Xin LI
e56900fc9f Expose MACHINE_CPU while building lib32 target. 2010-03-24 18:40:57 +00:00
Antoine Brodin
460f173dad Remove old documents when they are not compressed.
(NO_INFOCOMPRESS, NO_DOCCOMPRESS or NO_MANCOMPRESS)

MFC after:	1 month
2010-03-07 14:55:43 +00:00
Ruslan Ermilov
0f49f7eb41 Regen the list of prebuild libraries using tools/make_libdeps.sh. 2010-01-26 10:00:26 +00:00
Antoine Brodin
c1f5e7308a Unbreak world:
- WITHOUT_OPENSSH (and WITH_KERBEROS)
- WITHOUT_KERBEROS and WITH_GSSAPI

PR:		137483
Submitted by:	bf
MFC after:	2 weeks

Note: this breaks harder world WITHOUT_GSSAPI (and WITH_KERBEROS), but well
2010-01-23 19:29:42 +00:00
Ed Schouten
84bee0d7fb Remove libulog from the bootstrap again.
libulog now only provides functions that are used by various packages
from the ports tree, namely the libutempter ones. There is no reason to
link it into the crunch/fixit binaries anymore.
2010-01-21 16:56:27 +00:00
Jilles Tjoelker
6f7be14a9a In 'make delete-old', use 'exec' to redirect an fd persistently.
That is, write 'exec 3<&0' instead of '3<&0'. Due to an sh(1) bug fixed in
r199953, the latter also persisted, provided that fd 3 was not open before.
With newer sh or fd 3 open, it would not delete orphaned catpages.

MFC after:	2 weeks
2010-01-14 23:27:23 +00:00
Ed Schouten
03bc68ca09 Disable K&R style function definitions for WARNS=6.
Unfortunately there are two slight problems with that:

- Yacc and lex might generate code that generates warnings because of
  this. Require yacc and lex to be rebuilt during bootstrap. I'm not
  incrementing __FreeBSD_version here, because I assume someone else
  will do this eventually.

- When running `make buildkernel', it uses share/mk from the source
  treeo to build aicasm. Because aicasm also depends on lex, this would
  break. Lower WARNS to 5 for now. We should just increment it to 6
  again somewhere in the very far future.
2009-12-31 00:07:26 +00:00
Warner Losh
6201282247 Add NO_KERNELOBJ flag, similar to NO_KERNEL{CONFIG,DEPEND,CLEAN},
which disables doing a make obj.  Use it when you know it will work
only.  KERNFAST now implies NO_KERNELOBJ, since you don't need to keep
doing obj when doing incremental kernel builds.
2009-12-16 02:54:34 +00:00
Ed Schouten
17c79ad08c Convert pam_lastlog(8) to libulog.
The information used by the "Last login:"-line is obtained by using
ulog_setutxfile(3) to switch to the lastlog database. Login and logout
are performed using the utility functions ulog_login(3) and
ulog_logout(3).

This also means we must build libulog during bootstrap.

Approved by:	des
2009-12-11 14:15:55 +00:00
Roman Divacky
98c98d78d4 Replace -iprefix with -isystem. We only need alternative header
files search path and thus -isystem is sufficient. -iprefix is
meant to do something entirely different.

Approved by:	ed (mentor)
OKed by:	ru, kan
Tested by:	make universe
2009-11-01 08:20:30 +00:00
Edwin Groothuis
8d5ed6e717 Now that the zoneinfo data is automatically updated when a new world
is installed, we should at least have the tzsetup tool available!

Suggested by:	Andriy Gapon <avg@freebsd.org>
Noticed by:	Ben Kaduk <minimarmot@gmail.com>
MFC after:	1 week
2009-10-28 07:05:32 +00:00
Ruslan Ermilov
e5367da3b7 Move sed(1) from cross-tools to bootstrap-tools. 2009-10-21 19:39:34 +00:00
Alexander Nedotsukov
b6d632e4e8 Chase dependency changes in libgssapi_krb5 module introruced by
revision r197995.
2009-10-13 05:38:08 +00:00
Dag-Erling Smørgrav
767a0b2dc9 Fix comment about KERNFAST. 2009-09-10 07:37:36 +00:00
Alexander Kabaev
2286fe7635 Second attempt at eliminating .text relocations in shared libraries
compiled with stack protector.

Use libssp_nonshared library to pull __stack_chk_fail_local symbol into
each library that needs it instead of pulling it from libc. GCC
generates local calls to this function which result in absolute
relocations put into position-independent code segment, making dynamic
loader do extra work every time given shared library is being relocated
and making affected text pages non-shareable.

Reviewed by:        kib
Approved by:        re (kib)
2009-07-14 21:19:13 +00:00
Alexander Kabaev
d48890cfb8 Back out previous revision until better tested fix is ready.
Approved by: re (impliciti, by approving previos check-in)
2009-06-29 01:33:59 +00:00
Alexander Kabaev
a162c9ae9c Eliminate .text relocations in shared libraries compiled with stack protector.
Use libssp_nonshared library to pull __stack_chk_fail_local symbol into
each library that needs it instead of pulling it from libc. GCC generates
local calls to this function which result in absolute relocations put into
position-independent code segment, making dynamic loader do extra work everys
time given shared library is being relocated and making affected text pages
non-shareable.

Reviewed by:        kib
Approved by:        re (kensmith)
2009-06-28 23:51:39 +00:00
Mark Murray
51a8ff0c9c Allow "make update" work with SVN, if you take the time to set up your
/etc/make.conf properly.

Only one SCM?
I do not think this is right.
Now I have fixed it.
2009-06-14 15:16:24 +00:00
Warner Losh
d0c7c27238 Revert c190007 at the request of Ruslan. It was not correct because
ar had been moved from cross tools to bootstrap tools when bsd ar was
introduced.

Submitted by:	ru@
2009-04-05 00:24:49 +00:00
Warner Losh
5c2ca8d027 Add usr.bin/ar to the list of cross tools. Before, when we had gnu
ar, it was built in the gnu/usr.bin/binutils tree.  Now it isn't.

Submitted by:	John Hein
2009-03-19 00:44:22 +00:00
Warner Losh
badf7d2584 Restore missing OSREL definition that accidetnally dropped from an
earlier version of this patch.
2009-03-15 23:52:13 +00:00
Gabor Kovesdan
8a6a076cb4 - Create the buildworld object directories with mtree instead of various
mkdir calls
- Remove the ugly workaroung from libc NLS, which was to create some of
  these directories
2009-03-15 13:14:06 +00:00
Gabor Kovesdan
fe73c506a4 - Reenable Native Language Support in libc. This feature was disabled due
to possible breakages in the catalog handling code.  Since then, that
  code has been replaced by the secure code from NetBSD but NLS in libc
  remained turned off.  Tests have shown that the feature is stable and
  working so we can now turn it on again.

- Add several new catalog files:
  - ca_ES.ISO8859-1
  - de_DE.ISO8859-1
  - el_GR.ISO8859-7  (by manolis@ and keramida@)
  - es_ES.ISO8859-1  (kern/123179, by carvay@)
  - fi_FI.ISO8859-1
  - fr_FR.ISO8859-1  (kern/78756, by thierry@)
  - hu_HU.ISO8859-2  (by gabor@)
  - it_IT.ISO8859-15
  - nl_NL.ISO8859-1  (corrections by rene@)
  - no_NO.ISO8859-1
  - mn_MN.UTF-8      (by ganbold@)
  - sk_SK.ISO8859-2
  - sv_SE.ISO8859-1
  (The catalogs without explicit source has been obtained from NetBSD.)

Approved by:	attilio
2009-03-13 10:40:38 +00:00
Ruslan Ermilov
555aaddf22 Don't put "install-info" to the list of install-tools if we're
installing with -DWITHOUT_INFO, otherwise one can experience a
failure trying to installworld on a system that is built with
-DWITHOUT_INFO (i.e., without /usr/bin/install-info).

Reported by:	bland
MFC after:	3 days
2009-03-13 10:09:08 +00:00
Warner Losh
25bacc7818 Implement the xdev target. When you define XDEV=arch XDEV_ARCH=arch,
you can build the cross development tools and install them as
$XDEV-freebsd-xxx for each tool.  This allows one to use autoconf to
find the tools for cross building scenarios.
2009-03-13 07:23:58 +00:00
Ruslan Ermilov
d9ca85fca7 Fix build when WITH_SSP is set explicitly.
Submitted by:	Jeremie Le Hen
2009-02-21 15:04:31 +00:00
Warner Losh
b61a9dcf3f Implement an idea from Sam Leffler:
make KERNFAST=blah buildkernel
is now a short cut for
	make KERNCONF=blah -DKERNFAST buildkernel

This change works for all kernel config files not named "1".  I did
that to make sure that
	make -DKERNFAST buildkernel
remains the same as
	make -DKERNFAST KERNCONF=GENERIC buildkernel
rather than trying to build and configure "1".  I've never seen a
kernel config file named "1," so I think this is a good compromise.
2009-01-23 18:23:16 +00:00
Warner Losh
791777753c Add KERNFAST define. When defined, it skips all the config, depends
and clean steps.  KERNFAST was selected to complement KERNCONF which
is typically used in these scenarios (especially with cross building).

Reviewed by:	arch@
2009-01-15 04:19:03 +00:00
David E. O'Brien
85cb1ccbba Add the kerberos5 libs to the install32 target.
(we've been building the all along, but never installing them)
2008-11-12 04:43:55 +00:00
Dag-Erling Smørgrav
a9bff23c45 Back out testing aid that was inadvertantly committed as part of r184205.
Noticed by:	rdivacky
2008-10-23 16:06:49 +00:00
Dag-Erling Smørgrav
1ede983cc9 Retire the MALLOC and FREE macros. They are an abomination unto style(9).
MFC after:	3 months
2008-10-23 15:53:51 +00:00
David E. O'Brien
bcffa9358d Rescue is "not yet" for MIPS. 2008-09-19 16:14:42 +00:00
John Baldwin
c7f23b871f If a CPUTYPE isn't specified, then don't use -march=k8 when compiling
32-bit compat libs on amd64 since -march=k8 may generate instructions
that are not implemented on Intel EM64T processors.  Instead, use
a simpler set of default flags that should work on all amd64-capable
CPUs.

PR:		amd64/113111
Submitted by:	NIIMI Satoshi  sa2c of sa2c.net
MFC after:	1 week
2008-08-19 14:23:26 +00:00
John Baldwin
03d013bc75 Various style fixes in the build32 rules.
Submitted by:	bde (mostly)
2008-08-02 12:14:22 +00:00
John Baldwin
e68ed79390 Tweak the support for using ldd on 32-bit objects a bit further.
Specifically, build a 32-bit /usr/bin/ldd32 on amd64 which handles 32-bit
objects.  Since it is a 32-bit binary, it can fork a child process which
can dlopen() a 32-bit shared library.  The current 32-bit support in ldd
can't do this because it does the dlopen() from a 64-bit process.  In order
to preserve an intuitive interface for users, the ldd binary automatically
execs /usr/bin/ldd32 for 32-bit objects.  The end result is that ldd on
amd64 now transparently handles 32-bit shared libraries in addition to
32-bit binaries.

Submitted by:	ps (indirectly)
2008-08-01 21:52:41 +00:00
Ruslan Ermilov
042df2e2da Enable GCC stack protection (aka Propolice) for userland:
- It is opt-out for now so as to give it maximum testing, but it may be
  turned opt-in for stable branches depending on the consensus.  You
  can turn it off with WITHOUT_SSP.
- WITHOUT_SSP was previously used to disable the build of GNU libssp.
  It is harmless to steal the knob as SSP symbols have been provided
  by libc for a long time, GNU libssp should not have been much used.
- SSP is disabled in a few corners such as system bootstrap programs
  (sys/boot), process bootstrap code (rtld, csu) and SSP symbols themselves.
- It should be safe to use -fstack-protector-all to build world, however
  libc will be automatically downgraded to -fstack-protector because it
  breaks rtld otherwise.
- This option is unavailable on ia64.

Enable GCC stack protection (aka Propolice) for kernel:
- It is opt-out for now so as to give it maximum testing.
- Do not compile your kernel with -fstack-protector-all, it won't work.

Submitted by:	Jeremie Le Hen <jeremie@le-hen.org>
2008-06-25 21:33:28 +00:00
David E. O'Brien
643d58f9c0 Add MIPS to the list of known arches. 2008-06-18 13:52:58 +00:00
John Birrell
51062e592a Add the DTrace build tools to the list of tools and pass NO_CTF to all
the stages of the build which don't require CTF conversion.
2008-05-23 04:22:14 +00:00
Doug Rabson
33f1219925 Fix conflicts after heimdal-1.1 import and add build infrastructure. Import
all non-style changes made by heimdal to our own libgssapi.
2008-05-07 13:53:12 +00:00
Ruslan Ermilov
3d42ee261c Bootstrap the build of btxld. 2008-04-15 05:14:42 +00:00
Ruslan Ermilov
dbdb679c6f Remove options MK_LIBKSE and DEFAULT_THREAD_LIB now that we no longer
build libkse.  This should fix WITHOUT_LIBTHR builds as a side effect.
2008-03-29 17:44:40 +00:00
Ruslan Ermilov
b18c84b4db Set AR=gnu-ar and RANLIB=gnu-ranlib on systems where we are forced
to use GNU tools.  Remove the _WITH_GNUAR knob.

Prodded by:	obrien
2008-03-02 11:10:46 +00:00
Ruslan Ermilov
0be8836d91 Sort.
Prodded by:	obrien
2008-02-25 16:29:54 +00:00
Ruslan Ermilov
d0ca999980 Make again BSD ar(1) the default system ar(1), now properly handling
source upgrades by falling back to GNU ar(1) as necessary.  Option
WITH_BSDAR is gone.  Option _WITH_GNUAR to aid in upgrades is *not*
supposed to be set by the user.

Stop bootstrapping BSD ar(1) on the next __FreeBSD_version bump, as
there are no known bugs in it.  Bump __FreeBSD_version to anticipate
this and to flag the switch to BSD ar(1), should it be needed for
something.

Input from:	obrien, des, kaiw
2008-02-25 16:16:17 +00:00
Dag-Erling Smørgrav
646df9535e Satisfy a particularly obstinate nit-picker :) 2008-02-05 15:41:58 +00:00
Dag-Erling Smørgrav
bcb20d7b06 Give usr.bin/kdump/kdump_subr.c the same treatment as usr.bin/kdump/ioctl.c
and usr.bin/truss/ioctl.c.  This is the correct way to address the problem
that arises when doing an incremental build after a header used by kdump
has been removed (cf. i4b disconnect a while ago)

Explained by:	ru
MFC after:	2 weeks
2008-02-05 08:56:18 +00:00
Ruslan Ermilov
51dc1e12ac Support source upgrades from at least 6.0-RELEASE.
Reviewed by:	imp, obrien
2008-01-23 22:21:36 +00:00
Andrey A. Chernov
50df6ee330 Conditionally add mklocale to bootstrap-tools 2008-01-23 00:16:37 +00:00
Ruslan Ermilov
68c5515fe8 Cleanup after last commit (remove undefined variables). 2008-01-22 15:57:57 +00:00
David E. O'Brien
57087c935c Remove 5.x and 6.x cruft - source upgrades to RELENG_8 from versions prior
to RELENG_7 are not supported.
2008-01-21 18:44:55 +00:00
Christian Brueffer
9074b90047 Remove WITHOUT_FORTRAN from the XMAKE target, it doesn't exist anymore.
Reviewed by:	imp, kan
Approved by:	rwatson (mentor)
MFC after:	3 days
2008-01-16 15:05:49 +00:00
Yaroslav Tykhiy
c93073c260 - Explicitly verify if all needed libs were found by ldd(1). Do so
through scanning its output as ldd(1) returns a non-zero status only
  for really abnormal conditions such as an improper file format.
  Now cp(1) won't get bogus "not" and "found" arguments if a lib
  is missing. [1]

- Don't guess if an element of a complex pipeline is assigned to the main
  shell or a sub-shell.  Namely use stdio, not vars, to pass lists out from
  loops.  If using vars, there's the risk that a loop will run in a sub-shell
  and the list won't make it to the main shell.  It appears that braces and
  parens give only limited control over the issue while stdio always works
  as intended.  Apply this solution to both $progs and $libs for consistency,
  although I've failed to go without it only in the $libs part.

Requested by:	emaste [1]
2007-12-04 12:55:27 +00:00
Yaroslav Tykhiy
519bc416ca Decouple the install tools from the main system as much as possible.
I.e., not only copy them to a scratch dir, but also make them use saved
copies of libraries and locale files.  That gives us several benefits:

1) ABI breakages should no longer affect installworld over the live system.

2) It becomes safe to run installworld while still running the old kernel.
   However, it can be reasonable to save the old /rescue before that to be
   able to run the old reboot(8), as the new binaries are rather likely to
   fail with the old kernel.  Anyhow, it's now possible to upgrade a system
   in a single reboot _reliably_.

3) With a bit of hackery around rtld(8), it becomes possible to do destructive
   cross-installs, e.g., i386->amd64 over the live system.

The only shared item left between the old and new systems is rtld(8),
which cannot be run from a saved copy easily because its full
pathname is stored in the respective field of each ELF executable.
(In theory, that field could be overridden, e.g., from the environment,
but this can lead to security issues.)  That's why a destructive
cross-install isn't possible w/o hackery yet.

Fruitful ideas by:	ru
Reviewed by:		ru
Tested with:		audit(4)
2007-10-31 09:26:42 +00:00
Ed Maste
1602894ecf If a required install tool is missing, provide a more friendly error
message (instead of cp's usage info).
2007-10-15 13:50:46 +00:00
David E. O'Brien
946367b8e2 Tweak the handling of "WITHOUT_LIBPTHREAD". Also remove the accidental
treatment of 'LIBKSE' as an "old style" knob.

Submitted by:	ru
Approved by:	re(kensmith)
2007-10-09 23:31:11 +00:00
David E. O'Brien
65c045e964 Repo copy libpthreads to libkse.
This introduces the WITHOUT_LIBKSE nob,
and changes WITHOUT_LIBPTHREADS to mean with neither threading libs.
Approved by:	re(kensmith)
2007-10-09 13:42:34 +00:00
Ruslan Ermilov
2d79741969 Revise the list of directories we manually create under
${WORLDTMP} and ${LIB32TMP}; some of them are no longer
needed, and some were never needed.

Approved by:	re (kensmith)
2007-10-01 18:24:46 +00:00
Ruslan Ermilov
152f2a4a96 Always install libpthread.* symlinks if at least one of
the threading libraries is built.  This simplifies the
logic in makefiles that need to check if the pthreads
support is present.  It also fixes a bug where we would
build a threading library that we shouldn't have built:
for example, building with WITHOUT_LIBTHR and the default
value of DEFAULT_THREADING_LIB (libthr) would mistakenly
build the libthr library, but not install it.

Approved by:	re (kensmith)
2007-10-01 18:22:32 +00:00
Xin LI
5224b41a98 Add sed(1) to cross tools. We do want newly built version during
buildworld.

Approved by:	re (rwatson)
2007-07-10 10:17:32 +00:00
Ruslan Ermilov
a1cdbf3265 lex(1) no longer installs headers into GCC-internal dirs
(since src/usr.bin/lex/Makefile,v 1.20).
2007-05-26 20:17:19 +00:00
Dag-Erling Smørgrav
98a0900ab4 Revision 1.576 removed too much. I didn't notice because my /usr is on
ZFS, which doesn't support flags...
2007-05-19 20:34:29 +00:00
Alexander Kabaev
25a362d725 GCC will now properly link libc with all shared objects in order to record
their dependency on libc and its versioned symbols. For that to work,
libc needs to be built before any other shared library that might depend
on it. Add necessary glue to make that happen.
2007-05-19 03:34:59 +00:00
Dag-Erling Smørgrav
f27f825839 Don't use a subshell where it isn't needed.
Noticed by:	John E Hein <jhein@timing.com>
2007-05-16 20:16:06 +00:00
Dag-Erling Smørgrav
32cd239bbd Expose all of {check,delete}-old{,-dirs,-files,-libs}.
MFC after:	3 weeks
2007-05-16 08:46:35 +00:00
Dag-Erling Smørgrav
84478d58d1 Remove stray comment which broke delete-old-dirs. 2007-05-16 08:39:46 +00:00
Dag-Erling Smørgrav
d1e75b81e3 Partially revert the check-old / delete-old modifications to clarify the
logic.

Apply similar modifications to {check,delete}-old-dirs, which I had
overlooked.
2007-05-16 08:37:40 +00:00
Dag-Erling Smørgrav
ca224410bc Restore previous behaviour of aborting delete-old* if rm failed.
Pointed out by:	netchild
MFC after:	3 weeks
2007-05-14 14:41:52 +00:00
Dag-Erling Smørgrav
61305271cd Greatly speed up {check,delete}-old* by replacing make loops with sh loops.
MFC after:	3 weeks
2007-05-13 18:15:50 +00:00
Daniel Eischen
00fb440c1a Enable symbol versioning by default. Use WITHOUT_SYMVER to disable it.
Warning, after symbol versioning is enabled, going back is not easy
(use WITHOUT_SYMVER at your own risk).

Change the default thread library to libthr.

There most likely still needs to be a version bump for at least the
thread libraries.  If necessary, this will happen later.
2007-05-13 14:12:40 +00:00
Pawel Jakub Dawidek
1c22c47c35 Link libzpool, ztest and zdb against libpthread.
Requested by:	ru
2007-04-17 15:52:37 +00:00
Pawel Jakub Dawidek
ceef0c312c Connect ZFS to the build. 2007-04-06 02:13:30 +00:00
Rong-En Fan
31b4134f7b Enable ncurses wide character support
Approved by:	delphij (mentor)
Tested by:	kris on pointyhat (early version), current@
2007-03-09 12:11:58 +00:00
Ruslan Ermilov
857be7a47c Bump the bootstrapping requirements for gensnmptree(1) and remove
a note in UPDATING that tried to work around the build breakage.

Tested by:	jhb
OK'ed by:	njl
2007-03-01 15:42:23 +00:00
Ruslan Ermilov
51804c7973 Resurrect one of the patches from attic and refine the
lib32 build somewhat.  Specifically, instead of spamming
${CC} et al with -I${LIB32TMP}/usr/include which can be
harmful (as has been demonstrated by the ncursesw WIP),
use slightly different approach to achieve the same goal.
This also simplifies things a bit.

Prodded by:	rafan
2007-02-28 20:06:21 +00:00
Dag-Erling Smørgrav
9c827cecbd Clean the lib32 object directory with cleandir rather than rm -rf.
Discussed with:	ru
MFC after:	2 weeks
2007-02-27 13:02:29 +00:00
Rong-En Fan
af5b5a0f15 Switch to new ncurses build glue
Approved by:	delphij
2007-01-20 07:48:10 +00:00
Ruslan Ermilov
638b0a3e1a There was a timeframe where crunchgen(1) was broken; force
an upgrade during the build so those who are affected can
build world again.
2006-11-27 19:38:28 +00:00
Ruslan Ermilov
87b8c12df5 There doesn't seem to be a real reason for include/ to be installed
so early.
2006-11-13 05:52:11 +00:00
John Birrell
61517751a7 Add sun4v to the TARGET_ARCH when just TARGET is set (like pc98 is done).
This is required for 'make universe'.
2006-10-16 22:18:13 +00:00
Kip Macy
ddd5342909 buildworld fixes for sun4v
not sure why pmap.c is included as it is unchanged

Approved by: rwatson (mentor)
Reviewed by: jmg
2006-10-09 04:58:45 +00:00
Ruslan Ermilov
49e62f1cb3 Shuffle _*_libs assigments (no functional changes). 2006-10-07 19:26:46 +00:00
Ruslan Ermilov
b193556269 - Prebuild libgssapi only if building with Kerberos support.
- Remove libnetgraph from the list of prebuilt libraries as
  no other library depends on it (snmp_netgraph.so does not
  count as we don't build it in the "libraries" target).

- Restore libssh dependencies when compiling with Kerberos
  support.
2006-10-07 18:34:08 +00:00
Ruslan Ermilov
89edd7e555 Previous revision wasn't enough for "make TARGET=<machine> build*"
to work.  Some build-tools that are part of cross-tools (cc_tools)
also need to know the proper values of TARGET_ARCH and TARGET, so
tell them.
2006-09-08 10:09:02 +00:00
Ruslan Ermilov
0f31538c9d While experimenting with cross-building by specifying just TARGET,
I found one bug.  Pass our idea of TARGET_ARCH and TARGET down to
XMAKE, the cross-tools make.  Previously it worked because usually
TARGET_ARCH was specified on the initial make's command line.
This should also allow us to simplify the "universe" target, which
I'm currently testing.
2006-09-07 20:27:56 +00:00
Ruslan Ermilov
d2f03ebb1a Added timestamping to buildworld, similar to buildkernel. 2006-09-07 19:36:16 +00:00
Ruslan Ermilov
e6cb78fbd4 - Rewrite logic to guess TARGET_ARCH/TARGET to be more readable,
but without changes in behavior.

- Add sanity checking for TARGET_ARCH/TARGET.
2006-09-07 16:41:30 +00:00
Warner Losh
ffbebdce7f make "make TARGET=foo" work correctly. Before, it would fail to set
TARGET_ARCH correctly.  Now it does, even for pc98.  We should suggest
TARGET=foo in preference to TARGET_ARCH because the former is
unambiguous and the latter isn't, so update the docs.

This means that a long standing gripe I've had with this comes to a
close.  I can build pc98 w/o specify both things.  make TARGET=arm
works (rather than trying to build a arm:amd64 image and dying badly
in the attempt).

If you specify only TARGET_ARCH, then you get the old behavior.

# we can likely simplify the UNIVERSE target now to use this, but I'm not
# up for breaking that tonight :-).

# We should consider adding some kind of sanity check for TARGET_ARCH
# and TARGET.
2006-09-07 07:37:16 +00:00
Warner Losh
1bb2049ec1 Always make obj when building the libraries. This never hurts, and
helps some cross-architecture building tool installation patches that
I'm developing.
2006-08-24 17:02:26 +00:00
Ruslan Ermilov
2b46c64c9c Remove alpha left-overs. 2006-08-22 08:03:01 +00:00
Alexander Leidinger
c49d3a7d07 Remove sade from build-tools, the tinderbox problem should be fixed now. 2006-08-09 11:03:06 +00:00
Yoshihiro Takahashi
2d0fba0551 Add the sade to build-tools list. This fixes a tinderbox. 2006-08-09 02:27:31 +00:00
Alexander Leidinger
dad9051355 Fix doxygen target.
Submitted by:	"Alexander Mogilny" <sg@astral.ntu-kpi.kiev.ua>
Pointy hat to:	netchild
2006-08-02 15:26:15 +00:00
Warner Losh
6f13c7adde Also need to quote values so they can be passed on correctly. 2006-06-06 18:07:58 +00:00
Warner Losh
621e4ae168 Create a new target 'buildenvvars'. This target reports the build
environment for cross building (the same one you'd get interactively
in make buildenv).  This cannot be a simple

        make -f Makefile.inc1 -V WMAKEENV

because in PATH is not set correctly unless one takes a trip through
the Makefile/Makefile.inc1 indirection, the logic of which is too
large to reproduce outside of Makefiles.
2006-06-06 16:24:54 +00:00
Alexander Leidinger
becc5c626d Connect the kernel subsystem API documentation generation framework to
the build infrastructure: "make doxygen"

Changes to the man pages will be made when some defaults are revisited.

Requested by:	gnn
2006-05-26 18:10:06 +00:00
Poul-Henning Kamp
f6ce2a64f7 Send the pcvt(4) driver off to retirement. 2006-05-17 09:33:15 +00:00
Ruslan Ermilov
d6acfaf5e6 Sort bootstrap-tools entries. 2006-03-31 14:10:35 +00:00
Ruslan Ermilov
03e21a94e4 Rebuild gensnmptree(1) on 700014 systems too. While 700014 corresponds
to post January 26 systems where gensnmptree(1) code was already fixed,
there was a timeframe between February 14 and February 27 when
usr.sbin/bsnmpd/ including gensnmptree was disconnected from build, so
if you upgraded in this timeframe, you ended up with the 700014 system
but still with a buggy gensnmptree binary.  This also means not being
able to buildworld now.

Reported by:	jhb
Attention:	harti, keramida
2006-03-30 13:50:48 +00:00
Ruslan Ermilov
cea557add0 Extend coverage of the MK_IPX build option to the following:
- <netipx> headers [1]
- IPX library (libipx)
- IPX support in ifconfig(8)
- IPXrouted(8)
- new MK_NCP option

New MK_NCP build option controls:

- <netncp> and <fs/nwfs> headers
- NCP library (libncp)
- ncplist(1) and ncplogin(1)
- mount_nwfs(8)
- ncp and nwfs kernel modules

User knobs: WITHOUT_IPX, WITHOUT_IPX_SUPPORT, WITHOUT_NCP.

[1] <netsmb/netbios.h> unconditionally uses <netipx> headers
so they are still installed.  This needs to be dealt with.
2006-03-20 14:24:58 +00:00
Maxime Henrion
ca404c7dca Change the default SUP command to use csup instead of CVSup for
"make update" when SUP_UPDATE is defined.
2006-03-19 15:36:56 +00:00
Ruslan Ermilov
5740a2b62d Convert NO_PROFILE and NO_LIB32 to new style. 2006-03-18 21:37:05 +00:00
Ruslan Ermilov
c3ed02cf4f Add the new "showconfig" target that displays build configuration.
Suggested by:	phk
2006-03-18 14:30:23 +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
6cb9d90a51 When building for pc98, don't create stray objects in the
usr.sbin/pcvt/keycap source directory.

Found by:	phk
MFC after:	3 days
2006-03-16 07:31:50 +00:00
Giorgos Keramidas
00602d0926 After revision 1.4 of `src/usr.sbin/bsnmpd/bsnmpd/Makefile' the
gensnmptree utility is required at "make depend" time, because it
is used to generate `oid.h' for bsnmpd.

This means that all versions of HEAD before 2004/01/23 16:22:49 need
gensnmptree as a bootstrap util when it's not already installed as
part of the base system.  The first __FreeBSD_version that we can
assume this can work is 700014 which happened after the gensnmptree
change (in -r 1.263 of `src/sys/sys/param.h', at 2006/02/17 14:14:15).

For __FreeBSD_version values before 700014 add gensnmptree to the
bootstrap tools, to allow upgrades from versions of FreeBSD before
that date.

Approved by:	ru, harti
2006-03-09 12:55:02 +00:00
Ruslan Ermilov
e8a71dcc2f Detect that the "audit" group is missing earlier during install. 2006-02-27 09:17:39 +00:00
Alexander Leidinger
8a32134cdd A file can also be a link, so check not only for a file, but also for a link
in the delete-old and check-old targets.

We don't install a lib (libXY.so.Z) as a link, but an user may have created
something like this. This is dangerous if this link points to a different
version of the lib. So check for a link also in the *-lib targets (an
annoyed user which absolutely wants this redirection of a lib should use
libmap.conf instead of a link).

A directory can also be a link, but in this case just echo a message to
remove it by hand.
2006-02-18 16:58:21 +00:00
Doug Rabson
38311499cc Revert the previous change - the lib32 build should work now. 2006-01-02 17:52:16 +00:00
Doug Rabson
29af427b83 Temporarily disable the kerberos5 lib32 build while I try to fix it
properly.
2006-01-02 10:03:35 +00:00
Doug Rabson
c0b9f4fe65 Add a new extensible GSS-API layer which can support GSS-API plugins,
similar the the Solaris implementation. Repackage the krb5 GSS mechanism
as a plugin library for the new implementation. This also includes a
comprehensive set of manpages for the GSS-API functions with text mostly
taken from the RFC.

Reviewed by: Love Hörnquist Åstrand <lha@it.su.se>, ru (build system), des (openssh parts)
2005-12-29 14:40:22 +00:00
David E. O'Brien
667d8d10c7 Use cross-compile friendly spelling of CPUTYPE.
Submitted by:	ru
2005-12-07 22:55:29 +00:00
Ruslan Ermilov
620b3a0c1d Style, no functional changes. 2005-12-07 20:01:12 +00:00