Commit Graph

784 Commits

Author SHA1 Message Date
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
Oleksandr Tymoshenko
634f9253e8 Build CTF tools as a part of toolchain for cross-compilation case 2012-03-24 05:30:13 +00:00
Stanislav Sedov
0e46933c08 - Do not build libcom_err and compile_et when kerberos is disabled. They
depends on several heimdal libraries and not used by anything but kerberos
  tools.
2012-03-23 03:16:35 +00:00
Stanislav Sedov
ae77177087 - Update FreeBSD Heimdal distribution to version 1.5.1. This also brings
several new kerberos related libraries and applications to FreeBSD:
  o kgetcred(1) allows one to manually get a ticket for a particular service.
  o kf(1) securily forwards ticket to another host through an authenticated
    and encrypted stream.
  o kcc(1) is an umbrella program around klist(1), kswitch(1), kgetcred(1)
    and other user kerberos operations. klist and kswitch are just symlinks
    to kcc(1) now.
  o kswitch(1) allows you to easily switch between kerberos credentials if
    you're running KCM.
  o hxtool(1) is a certificate management tool to use with PKINIT.
  o string2key(1) maps a password into key.
  o kdigest(8) is a userland tool to access the KDC's digest interface.
  o kimpersonate(8) creates a "fake" ticket for a service.

  We also now install manpages for some lirbaries that were not installed
  before, libheimntlm and libhx509.

- The new HEIMDAL version no longer supports Kerberos 4.  All users are
  recommended to switch to Kerberos 5.

- Weak ciphers are now disabled by default.  To enable DES support (used
  by telnet(8)), use "allow_weak_crypto" option in krb5.conf.

- libtelnet, pam_ksu and pam_krb5 are now compiled with error on warnings
  disabled due to the function they use (krb5_get_err_text(3)) being
  deprecated.  I plan to work on this next.

- Heimdal's KDC now require sqlite to operate.  We use the bundled version
  and install it as libheimsqlite.  If some other FreeBSD components will
  require it in the future we can rename it to libbsdsqlite and use for these
  components as well.

- This is not a latest Heimdal version, the new one was released while I was
  working on the update.  I will update it to 1.5.2 soon, as it fixes some
  important bugs and security issues.
2012-03-22 08:48:42 +00:00
Peter Wemm
15d321c5aa Make sure libgcc_s is finished building in _startup_libs before
building libcxxrt with high -j levels.  The workaround in
libc++/Makefile isn't necessary once that race is solved.

Reviewed by:	theravin
2012-03-17 22:12:09 +00:00
Dimitry Andric
5e07d0314f Fix a thinko in r232322, where gcc (and its tools) are not built during
the cross-tools stage, if CC=clang and WITH_CLANG_IS_CC is not set.

This causes no 'cc' to be installed in the temporary cross-tools tree,
making lint fall over later in the build, because it ignores ${CC} and
attempts to run 'cc' anyway.

To fix this, only skip building gcc during cross-tools, if WITHOUT_GCC
is set, or if WITH_CLANG_IS_CC is set.

Pointy hat to:	dim
MFC after:	2 weeks
2012-03-04 21:36:18 +00:00
Dimitry Andric
dfbaea8347 Add a WITH_CLANG_IS_CC option for src.conf(5), disabled by default, that
installs clang as /usr/bin/cc, /usr/bin/c++ and /usr/bin/cpp.

Note this does *not* disable building and installing gcc, which will
still be available as /usr/bin/gcc, /usr/bin/g++ and /usr/bin/gcpp.  If
you want to disable gcc completely, you must use WITHOUT_GCC.

MFC after:	2 weeks
2012-02-29 22:58:51 +00:00
Warner Losh
5db254ad82 Allow specification of build shell for the buildenv target.
Submitted by:	ian lepore
2012-01-30 20:19:28 +00:00
Dimitry Andric
7fa955cd7a When the buildkernel stage 2.3 (build tools) runs, the PATH is still set
to the default from the top-level Makefile.  Therefore, invocations of
lex and yacc (used during building of aicasm) will use the executables
in /usr/bin, not those optionally built during the previous buildworld
or kernel-toolchain.  This makes kernel builds from older FreeBSD
releases more difficult than necessary.

Fix this by setting PATH to ${BPATH}:${PATH} in stage 2.3, so the
bootstrap tools directories are searched before the regular ones.

Silence from:	svn-src-{all,head}
MFC after:	1 week
2012-01-27 18:29:03 +00:00
Gleb Smirnoff
d6ba7d93ba Restore functionality to pack several kernels into release. All
kernels specified by KERNCONF are built and packed into release.
The first one is packed into kernel.txz, all others to
kernel.CONFIG.txz.

The first one is installed on bootables in /boot.
2012-01-15 08:36:25 +00:00
Adrian Chadd
0d9f40f219 Fix the broken non-cross compile build. Oops!
Another pointy hat to:	adrian, for stirring up more trouble.
2012-01-06 00:34:27 +00:00
Adrian Chadd
9b428cfab6 Allow extra directories to be added to the build-tools target.
Things such as "sh" require local tools to be built before
cross-compiling. This allows for extra software (that's
built via LOCAL_DIRS) to also have a build-tools target where
required.
2012-01-05 21:50:50 +00:00
Dimitry Andric
411246d3b7 Remove -mfancy-math from LIB32CPUFLAGS for amd64. It has been default
for our gcc since more than three years (see r181534, which is also in
stable/9 and stable/8).  This flag used to be for the benefit of the old
in-kernel math emulator, which was removed more than eight years ago.

Pointed out by:	arundel
MFC after:	1 week
2011-12-22 15:03:48 +00:00
Max Khon
83cb5bae96 - CTF knob is now implemented using common scheme: MK_CTF=yes/no is
defined based on WITH/WITHOUT_CTF settings, default is WITHOUT_CTF,
NO_CTF overrides WITH_CTF (used by Makefile.inc1)
- CTFCONVERT_CMD/NORMAL_CTFCONVERT are now defined to empty string
if make(1) can handle empty commands
2011-11-30 18:11:49 +00:00
Max Khon
d0ed1ea4b7 Turn off profiled libs build by default.
Can be enabled back using WITH_PROFILE=yes in /etc/src.conf
2011-11-29 19:46:17 +00:00
Dimitry Andric
49c8e5e77e Fix breakage after r227983; lib/libcxxrt still got built, because it was
not disabled in the usual way (by adding it to __DEFAULT_NO_OPTIONS in
share/mk/bsd.own.mk), and because the test for MK_LIBCPLUSPLUS in
Makefile.inc1 was incorrect.

Pointy hat to:	dim
2011-11-26 03:26:06 +00:00
Oleksandr Tymoshenko
bb61ba0892 Provide proper error message when trying to build xdev, xdev-build or
xdev-install targets without either XDEV or XDEV_ARCH defined.
2011-11-26 00:30:39 +00:00
David Chisnall
7a98470824 Import libc++ / libcxxrt into base. Not build by default yet (use
MK_LIBCPLUSPLUS=yes to enable).  This is a work-in-progress.  It works for
me, but is not guaranteed to work for anyone else and may eat your dog.

To build C++ using libc++, add -stdlib=libc++ to your CXX and LD flags.

Bug reports welcome, bug fixes even more welcome...

Approved by:	dim (mentor)
2011-11-25 20:59:04 +00:00
Dag-Erling Smørgrav
dcf83bf794 Revert r227841 and part of r227798. We still build libpam in two passes,
but we use STATIC_CFLAGS instead of our own private .c.o rule.

MFC after:	3 weeks
2011-11-24 13:18:58 +00:00
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