Commit Graph

806 Commits

Author SHA1 Message Date
Dag-Erling Smørgrav
8e2a5aa10c Remove libpam from _prebuild_libs. This should unbreak the -jX build.
MFC after:	3 weeks
2011-11-22 21:18:14 +00:00
Dag-Erling Smørgrav
e03e3b699e Simplify the libpam build by removing the shared modules' dependency
on the shared library.  The modules are loaded by the library, so we
know it'll be there when we need it.

MFC after:	3 weeks
2011-11-21 16:40:39 +00:00
Andreas Tobler
6bac4c3e6a Rename the linker emulation name for powerpc and powerc64. This is needed that
we can also use the upstream binutils linker where we have to have a unique
name for the FreeBSD emulation.
2011-11-19 19:25:57 +00:00
Dimitry Andric
907eed1f50 Revert r227403 for now. Since the cross-tools stage purposefully
doesn't have ${WORLDTMP}/usr/bin in its PATH, if you build world with
CC=clang, tblgen tools from /usr/bin will be used instead of the ones
built under ${WORLDTMP}.  This can lead to various errors, especially if
you upgrade from an older clang.

Note that building world with gcc would not experience these problems,
because it only uses the tblgen tools in the world stage, where PATH
does contain ${WORLDTMP}/usr/bin.

Pointy hat to:	dim
2011-11-10 20:15:35 +00:00
Dimitry Andric
338f97fe8d Move building of clang's tblgen tools (and required libraries) from the
bootstrap-tools stage to the cross-tools stage.  These tools are only
needed for generating llvm/clang include files, and are not necessary
for bootstrapping the build itself.

This shaves off some build time, because the required libraries are now
just built twice (during the cross-tools and world stages), instead of
three times.

Also, if you build world using WITHOUT_CLANG= in src.conf(5), no llvm or
clang code will be compiled at all anymore.

MFC after:	1 week
2011-11-09 19:00:27 +00:00
Dimitry Andric
8dcbd43161 Make it possible to set CC and CXX (and optionally, AS and LD) in
make.conf(5), while allowing the build32 stage on 64-bit architectures
to still override them, so that stage can successfully build 32-bit
compatibility libraries.

Explanation:
1) The build32 stage sets environment variables CC, CXX, AS and LD for
   its sub-make, to add 32-bit specific flags (-m32 and such).
2) The sub-make reads sys.mk, encounters CC?= and CXX?= assignments, so
   does not alter them.
3) After some other stuff, sys.mk reads /etc/make.conf.  When you have
   "CC=xxx" and "CXX=yyy" statements in there, they will *override* the
   build32-supplied CC/CXX values, nullifying the 32-bit specific flags.
4) Thus all objects get built as 64-bit anyway, and since LD is usually
   not set in make.conf, it still has the 32-bit flags!
5) Now, whenever something is linked, you will get a "ld: Relocatable
   linking with relocations from format elf64-x86-64-freebsd (foo.o) to
   format elf32-i386-freebsd (bar.o) is not supported" error.

Fix this by adding "-ECC -ECXX -EAS -ELD" to the build32 sub-make
invocation, which forces those environment variables to always override
any assignment in makefiles.  Thus making it possible to simply set:

CC=my-cc
CXX=my-c++

in your make.conf, or specify a path, even:

CC=/usr/local/bin/other-cc
CXX=/usr/local/bin/other-c++

Note this was never a problem on i386, since it has no build32 stage.

Silence from:	current@
MFC after:	1 week
2011-11-05 21:16:39 +00:00
Ed Schouten
653eeb7f5e Attempt to fix build logic for gensnmptree.
There are two problems with the existing logic. It builds gensnmptree
on <700018, even if WITHOUT_BSNMP is set, but more importantly, we must
not forget to build gensnmptree on systems that have originally been
built without. This causes a buildworld on those systems to fail.

MFC after:	1 week
2011-10-26 07:49:47 +00:00
Dimitry Andric
6122f3e60d Upgrade our copy of llvm/clang to r142614, from upstream's release_30
branch.  This brings us very close to the 3.0 release, which is expected
in a week or two.

MFC after:	1 week
2011-10-22 14:08:43 +00:00
Nathan Whitehorn
e59e2d8ec7 Farewall, sysinstall! You served us well for many years, but 10.0 is one
digit beyond your time.

Various sysinstall dependencies (e.g. libftpio, libdisk, libodialog, etc.)
will be cleaned up in coming days. Some will take longer than others due to
a few other consumers (tzsetup and sade).
2011-10-03 15:13:09 +00:00
Stanislav Sedov
611ff617cf - Add missing interdependencies to kerberos libraries. Some of the
kerberos libraries were not linked properly (missing dependencies),
  which causes 3rd party applications linking to fail when --as-needed
  ld flag is used.  I also added the --no-undefined ld(1) flag to make
  sure that there're no missing dependencies.

MFC after:	3 days
2011-09-27 07:14:12 +00:00
Ruslan Ermilov
aa0da2e494 - Merged awk upstream that includes a fix for a bug exposed by kmod_syms.mk.
- Provide a build aid for those who already have a buggy awk(1) installed.

Approved by:	re (kib)
2011-08-11 10:29:10 +00:00
Ruslan Ermilov
69c488cdc6 It's a bit odd, but "make update" in src/ can also update the ports/,
doc/, and now www/ trees, but only using the "cvsup" transport.

When "make update" is run using a tree's makefile, it can also use
"cvs" (except for www/) and "svn" (only src/).

Clean up documentation and code regarding "make update":

- Increase oddness by adding support for WWWSUPFILE and NO_WWWUPDATE to
  Makefile.inc1 (analogous to PORTSSUPFILE/NO_PORTSUPDATE and
  DOCSUPFILE/NO_DOCUPDATE; WWWSUPFILE already supported by www/Makefile).

- Document all trees that support CVS_UPDATE.

- Document all trees that support SUP_UPDATE.

- Document SVN_UPDATE.

- Document NO_WWWUPDATE.

- make.conf(5) mistakenly said that *SUPFILE* had defaults.

- Add an example entry for WWWSUPFILE.
2011-06-16 12:28:37 +00:00
Warner Losh
0163af2360 Implement WITH{,OUT}_{GCC,BINUTILS} to provide finer-grained control
over building gcc and binutils.  They default to true, unless
MK_TOOLCHAIN is no.

Reviewed by:	ru@
2011-05-19 05:13:25 +00:00
Warner Losh
4b7e611675 Clean up a loose end from the conversion from gnu ar/ranlib to the BSD
one.  Without this, we don't have ar or randlib in the tool path,
leading to much pain for some users.  This pain is exposed by the
external toolchain enhancements that I'm working on.

Submitted by:	John Hein (ages ago, and dropped on the floor by me: sorry)
2011-05-18 17:06:11 +00:00
Florent Thoumie
2eb4b00cbb Backout libinstall.a -> libpkg commit.
Discussed with:	erwin, brooks, bapt
2011-05-17 19:11:47 +00:00
Attilio Rao
4b547324c0 Disconnect sun4v architecture from the three.
Some files keep the SUN4V tags as a code reference, for the future,
if any rewamped sun4v support wants to be added again.

Reviewed by:	marius
Tested by:	sbruno
Approved by:	re
2011-05-14 01:53:38 +00:00
David E. O'Brien
c79f2d97be + DTrace as a bootstrap tool is only needed on certain older systems.
+ Be more consistent between BMAKE and TMAKE.
+ Add NO_CTF to crosstools as is done for bootstrap and build tools.

Reviewed by: marcel
2011-05-11 17:50:19 +00:00
David E. O'Brien
cb10fc9df3 Correct the kernel config name printed out during install.
PR:		156579
Submitted by:	dhw
2011-05-05 00:43:55 +00:00
David E. O'Brien
3afb517748 Note which of the built kernels is being installed.
PR:		156579
Submitted by:	dhw
2011-04-22 17:10:51 +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
Ulrich Spörlein
b3eb927f6e Complete WITHOUT_CXX support. It implies WITHOUT_GROFF and
WITHOUT_CLANG.

Don't build clang bootstrap/build-tools depending on this flag. We also
keep gperf, devd and libstdc++ around to prevent foot-shooting and to
make this a two-way street.
2011-04-06 20:08:23 +00:00
Warner Losh
1b59591956 Make clang default on x86 and powerpc, but not on other architectures.
Make fdt default on arm and powerpc.

This now includes cross compiled targets, where before we tried to
make it host-based.

Also, move the lists of default yes and no options to a variable.

In general, only build tools should get this treatment in bsd.own.mk.
Also, the use of TARGET* in the bsd.*mk files is discouraged, but
necessary here due to the ordering of things in buildworld.  We make
the native case work by testing MACHINE_ARCH after TARGET_ARCH.
2011-04-05 08:49:47 +00:00
Ulrich Spörlein
86be754604 Fix the delete-old/check-old targets to work with arbitrarily long
OLD_FILES/OLD_DIRS/OLD_LIBS lists.

If you specify enough WITHOUT_FOO flags, the argument list passed to the
shell will be too long. Using .for/.endfor make(1) "loop" will make the
parser of the Makefile explode. Hack around this with good old pipes.

No objections:	netchild
Reported by:	b.f.
2011-04-01 20:59:23 +00:00
Jeff Roberson
aa0a1e58f0 - Merge in OFED 1.5.3 from projects/ofed/head 2011-03-21 09:58:24 +00:00
Nathan Whitehorn
99ad39c822 Improve the distributeworld target in Makefile.inc1 and update the release
infrastructure to use it. make distributeworld can now be used without
preparing its environment first and installs games into its distribution
using the regular make distribute logic instead of post-processing with
a script.

Also add two new targets, packageworld and packagekernel, that tar up the
results of distributeworld and distributekernel (also new), respectively.
2011-03-02 14:39:26 +00:00
John Baldwin
9c216a50c0 Use a suitable DIRPRFX for each invocation of make in the build32 and
install32 targets so that the full path to each program or library is
displayed in the make output.

MFC after:	1 week
2011-03-01 14:53:36 +00:00
Pawel Jakub Dawidek
6be04ba681 Commit two more files missed in r219089.
MFC after:	1 month
2011-02-27 19:44:10 +00:00
Gabor Kovesdan
ad30f8e79b Add the BSD-licensed Citrus iconv to the base system with default off
setting. It can be built by setting the WITH_ICONV knob. While this
knob is unset, the library part, the binaries, the header file and
the metadata files will not be built or installed so it makes no impact
on the system if left turned off.

This work is based on the iconv implementation in NetBSD but a great
number of improvements and feature additions have been included:

- Some utilities have been added. There is a conversion table generator,
  which can compare conversion tables to reference data generated by
  GNU libiconv. This helps ensuring conversion compatibility.
- UTF-16 surrogate support and some endianness issues have been fixed.
- The rather chaotic Makefiles to build metadata have been refactored
  and cleaned up, now it is easy to read and it is also easier to add
  support for new encodings.
- A bunch of new encodings and encoding aliases have been added.
- Support for 1->2, 1->3 and 1->4 mappings, which is needed for
  transliterating with flying accents as GNU does, like "u.
- Lots of warnings have been fixed, the major part of the code is
  now WARNS=6 clean.
- New section 1 and section 5 manual pages have been added.
- Some GNU-specific calls have been implemented:
  iconvlist(), iconvctl(), iconv_canonicalize(), iconv_open_into()
- Support for GNU's //IGNORE suffix has been added.
- The "-" argument for stdin is now recognized in iconv(1) as per POSIX.
- The Big5 conversion module has been fixed.
- The iconv.h header files is supposed to be compatible with the
  GNU version, i.e. sources should build with base iconv.h and
  GNU libiconv. It also includes a macro magic to deal with the
  char ** and const char ** incompatibility.
- GNU compatibility: "" or "char" means the current local
  encoding in use
- Various cleanups and style(9) fixes.

Approved by:	delphij (mentor)
Obtained from:	The NetBSD Project
Sponsored by:	Google Summer of Code 2009
2011-02-25 00:04:39 +00:00
Ulrich Spörlein
423102c6fa Flesh out WITHOUT_GROFF support to DTRT.
A full featured groff is required during buildworld, so build it always
and don't rely on it being present on the host system.

vgrind(1) is tightly coupled to a roff processor and will not be
built/installed when groff is disabled. Also much of the roff'ed
documentation under share/doc will not be built/installed when
WITHOUT_GROFF is defined.

Reviewed by:	ru (partial)
2011-02-22 08:13:49 +00:00
Warner Losh
d51726b0b3 Back out 218933 and 281934. The easy cases still worked, but some
hard cases broke in worse ways than the status quo.  Back them out
until that can be resolved.
2011-02-22 04:49:57 +00:00
Warner Losh
acd26693c9 Select building CLANG based on ${TARGET_ARCH} and existence of
WITH{,OUT}_CLANG.  We default to yes on some archs, no on others,
unless WITHOUT_CLANG or WITH_CLANG is defined respectively.
2011-02-22 04:07:15 +00:00
Dimitry Andric
2754fe609d Upgrade our copy of llvm/clang to r126079, from upstream's trunk.
This contains many improvements, primarily better C++ support, an
integrated assembler for x86 and support for -pg.
2011-02-20 19:33:47 +00:00
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