would have taken care of the possibility of buildkernel crossing over
from one binutils set to another. Back out the part about turning off
'make clean' if the 'make depend' is still active, but add a NO_KERNELCLEAN
target instead that works like NOCLEAN but just for the kernel.
to preceed a buildkernel.
The buildworld is still required when upgrading across major releases,
across binutil upgrades and when config changes version. If
buildkernel breaks, and you haven't done a buildworld, then do not
complain unless you do a buildworld and it still breaks.
already used by the kernel makefiles themselves, and this leads to a lot
of trouble when people put "KERNEL=MYKERNEL" in make.conf. Bite the bullet
and change it to KERNCONF instead, before it gets too far entrenched.
The kernel Makefiles use ${KERNEL} as the name of what to install the
kernel as, eg: /boot/${KERNEL}/kernel or /${KERNEL}. This leads to much
unhappiness with things like /LOCAL instead of /kernel. buildkernel is
severely limited as it is only useful directly after a buildworld.
Reviewed by: jhb
not right because rtermcap would be reading the *host* termcap, not
from the termcap in the src tree. Besides, /usr/sbin/sysinstall
(not the crunched one in /stand) should use the runtime termcap
not the precompiled set.
The distribute target is basicly the same as an install. For
perl, this means that miniperl is needed. Since miniperl is
only present in the object directory, we need to make sure
the path is set correctly. To do this, we have make release
use a new distribworld target that sets the path before doing
a make distribute.
o Move building libperl and miniperl from build-tools to
cross-tools. libperl uses MACHINE_ARCH to determine the
right configuration, which doesn't match the build
machine when cross-building if they are built as build-
tools.
o Since miniperl needs to be built as a cross-tool, it
needs to be installed under /usr/obj so that it can be
used (cross-tools have a special object directory to
avoid build conflicts. As a downside, you can't easily
run cross-tools from their object directory). Remove
the install and distribute override targets. To avoid
having miniperl installed by installworld, remove it
from SUBDIR.
o We can't pickup miniperl from the object directory but
since it's installed, depend on PATH. This is save,
because the makefiles are run with a known path.
o Build libperl again as part of the library target. A
_libperl variable existed, but it was never defined.
o Add chmod to the list of saved tools, because perl
conditionally uses it during install.
The bootstrap-tools and cross-tools targets are modified to
avoid building profiled and shared libraries. While here,
have these targets build static binaries instead of shared
binaries.
Approved by: markm
when using the egcs and gcc-devel ports, along with GCC built from stock
public FSF sources. With out this change, FreeBSD will be removed from
the list of systems GCC 3.0 must be evaluated on before release. With
the effort some of us put into getting FreeBSD on this list, we should
not turn this effort into a waste, else we might not be worth fighting
for in the future. (note that Alpha and IA-64 versions of crt{i,n}.S
are needed)
* Switch from our own crt{begin,in} to those created from GCC's crtstuff.c.
This will allow us to switch to DWARF2 exceptions in the future, along with
staying in sync with any future GCC requirements.
* Break out our ELF branding bits into a seperate file. Currently this
is now included by our crt1.c files (since this functionality was part of
our native crtbegin.c). Later crtbrand.o will be merged in the creation
of crti.o.
If a user decides to forego a make depend during "make buildkernel",
they should get what they deserve if no previous make depend has
been run for that kernel. Instead, the build process includes
special instructions to unconditionally rebuild aicasm. When aicasm
moved to its own directory, this hack broke.
Correct the hack until a get buy off on killing it.
SUPFLAGS when a 'make update' is run. This means that the supfile
doesn't need to be edited because the -h will override the
CHANGE_THIS.FreeBSD.org host.
if their SUPFILE variables are defined _and_ NO_PORTSUPDATE and
NO_DOCUPDATE respectively are not defined.
Previously, only ports was updated and there was no way to prevent
this without undefining its SUPFILE variable.
PR: 17514
Reported by: Udo Erdelhoff <ue@nathan.ruhr.de>
of the buildkernel and installkernel targets where the kernel
was called after the config name.
While here, fix the brokenness of the installkernel target. It
used to use ${IMAKEENV}, but since that has a very restricted
PATH, it couldn't find make(1). Use ${CROSSENV} instead.
binaries we just installed. This allows a future upgrade target to
install a new system without intermediate reboots and also
prevents conflicts for parallel make runs where we might exec a
binary that's being installed at the same time.
and costs us an extra 2% to build it for no reason. It may break
building cross compilation environments for fortran, but that isn't
officially supported at this time anyway (also, the % of our user base
that would use that is < .001% imho). This does't break fortran (it
is built again later anyway).
Reviewed by: obrien
Tested by: make buildworld and make buildworld -DNOCLEAN
users can more easily upgrade.
buildworld now makes usr.sbin/config in bootstrap-tools so that
when you first make buildworld, buildkernel will use config(8)
from the temp. world tree (and of course also the compiler).
Which kernel to built is determined by the KERNEL variable. You
can have as many kernels listed as you like. When a config file
exists for the given MACHINE it will be built. When KERNEL has
not been defined it will be set to "GENERIC GENERIC98".
The first valid kernel named in the list will be used by the
installkernel target.
When NOCLEAN is defined the kernel object directory is *not*
removed by config first. This is in line with normal buildworld
behaviour.
The buildkernel target makes aicasm in sys/dev/aic7xxx first and
unconditionally. This hack allows us to cross-build kernels and
can go away when the problem is solved in a structural way.
If one wishes to anchor the compiler toolchain tree somewhere other than /,
all one needs to do is set "TOOLS_PREFIX" to a different rooting.
Submitted by: marcel (in a different format and reworked by me)
reading all my mail.
I still don't understand why this was was committed on freefall before
the libcrypto and libssl subdirectories were imported on freefall though.
o Add genassym to the list of cross-tools
o Remove sh hashing work-around, we don't need it anymore
o Clean more directories in WORLDTMP when NOCLEAN is specified
The sh hashing work-around is not needed anymore, because we don't
trigger the bug anymore.
When NOCLEAN is not defined, we wipe out the complete WORLDTMP,
including the object directories of the tools we have built. When
NOCLEAN is defined, we remove anything that we install anyway, which
is usr/bin, usr/games, usr/include, usr/lib and usr/sbin.
property. This fixes the includes target when DESTDIR is empty.
o Do not make build-tools for f771 when NO_FORTRAN is defined.
o Add new build stage. See below.
o Change banners so that staging information is displayed.
The addition of the build-tools target broke the upgrade path because
we couldn't make use of previously built tools that were made for
compatibility reasons. Doing so would also result in the cross-compiler
being used and that is exactly what had to be avoided.
This is solved by designating the bootstrap-tools stage for building
anything that is needed for compatibility only and to create a new
stage (started after the build-tools stage) that handles cross-tools
building. We now have the following stages:
1. bootstrap-tools (for compatibility issues only)
2. build-tools
3. cross-tools (what it says)
4. world
5. install
Stages 1-4 (inclusive) are handled by buildworld.
Stage 5 is handled by installworld.
Any more stages and I'll join Nik in his quest for the
holy grail^W^Wworld :-)
buildworld doesn't break because the host doesn't have any
games installed,
o Add a new build stage: TMAKE. TMAKE builds all the build-tools
targets in the respective makefiles. Note that these targets
don't use the bootstrap tools,
o Add elf2exe to the bootstrap-tools when cross-building Alpha on
other platforms,
o Add ${WORLDTMP}/usr/games to TMPPATH,
o Remove ${WORLDTMP}/usr/bin even when NOCLEAN is defined. This
prevents using any bootstrap-tools previously installed. Most
importantly, it prevents using the cross-compiler when we still
need the native compiler.
The current stages are BMAKE, TMAKE, XMAKE and IMAKE in that order.
BMAKE builds bootstrap-tools that either solve compatibility problems
or are needed as cross-tools,
TMAKE builds the support tools necessary by some parts in the source
tree and also performs the cleandir and par-obj targets,
XMAKE builds the includes, libraries and everything (resp.), and
IMAKE installs the world. This stage needs further work if it's to be
used to install -current over -stable for example.
This is the last major update towards cross-building.
o Don't set CFLAGS in the bootstrap env. It is very likely to be
overridden my any CFLAGS setting in /etc/make.conf. Setting it
here is almost useless. So far, it doesn't seem necessary.
o Build tools before doing anything in or with the object tree.
o Tools don't use the object tree any more, but have there object
tree located in the temp. world.
o Use the proper make env. for cleaning and building the object tree.
o Don't create kernel include subdirectories in the temp. world. These
are removed later on and replaced by symlinks.
o Change the layout of the object tree:
The temp. world now is /usr/obj/${MACHINE_ARCH}${.CURDIR}/${BUILD_ARCH}.
/usr/obj can be set/changed by using MAKEOBJDIRPREFIX, and {.CURDIR}
obviously depends on where the source tree is located. MACHINE_ARCH
is the arch. for which the world is to be build and BUILD_ARCH is the
arch. on which we are building.
The object tree now is /usr/obj/${MACHINE_ARCH}${.CURDIR}.
This allows concurrent cross-builds and allows the object tree to be
shared on different archs., each doing the same cross-build. This of
course assumes that the output on Alpha (for example) is the same as
the output of an Alpha cross-build on i386 (for example).
The use of NOCLEAN is is still dangerous, but should be usable in many
more situations than before. It should now be possible to safely
restart an interrupted build with NOCLEAN without side-effects. Because
the tools don't share the object tree with the normal (cross-build), no
tools have to be rebuild.
non-root cross-building.
o Makefile.inc0 is not used anymore.
o The legacy aout build has been removed.
o Selectively build tools *before* building includes/libraries.
o Avoid using mtree to populate the obj tree.
pre-Aug 4.0-CURRENT worlds and those with pre-GCC 2.95.2 worlds.
The problem with pre-Aug worlds is the installed Byacc and Bison doesn't
have necessary changes to compile either GCC 2.95 or EGCS 1.1.x.
The problem with pre-GCC 2.95 worlds is libgcc is built with the wrong
compiler. See rev 1.17 of src/gnu/lib/libgcc/Makefile (which used to live
in src/gnu/usr.bin/cc/libgcc) + commit messge for details of the requirements.
o Send libmytinfo back to the afterlife. It was revived by mistake,
o Make gnu/lib/libgcc before making lib/libpam. This dependency has
been overlooked in constructing the list,
o make depend before make all. It's by using make depend that the
dependency was found in the first place and we need it to prevent
cleaning everything up before we start,
o Don't specify -DNOINFO -DNOMAN for the libraries target. Let the
target handle it. We can do away with a single run over the libs
if we make everything while we're there and only install the
libraries in the object tree.
build make(1) twice and merge the bootstrap-libraries and libraries
targets.
This change solves the bug where build-tools, compiled against the
includes and libraries built from the sources failed to run on the
host, as was the case with the sigset_t change. With this update, a
buildworld will fail if the tools won't compile on the host. This
is solved in further commits where backward compatibility of the
tools is enlarged.
The libraries target has been fixed. The libraries are now build in
the proper order, satisfying the dependencies. The comment is updated
to reflect this.
The linux module and netboot have been removed from the list of tools.
More to follow.
Reviewed by: bde, imp
All Makefiles now use MACHINE_ARCH for the target architecture.
Unification is required for cross-building.
Tags added to:
sys/boot/Makefile
sys/boot/arc/loader/Makefile
sys/kern/Makefile
usr.bin/cpp/Makefile
usr.bin/gcore/Makefile
usr.bin/truss/Makefile
usr.bin/gcore/Makefile:
fixed typo: MACHINDE -> MACHINE_ARCH
support. I've been building world with these changes for months w/o
ill effect. I've also managed to build the cross tool chain for MIPS
with these patches.
Please note that the extent to which these patches work is largely
dictated by how well our tool chains support the cross compilation.
Building alpha binaries on i386 doesn't work. Supposedly building
i386 binaries on alpha does work, but I've not verified it with these
patches, however.
in time to build inetd. (If you already have /usr/include/tcpd.h, the
build doesn't fail. This mainly affects upgrades and 'make world' from
systems more than a few weeks old)
Move was necessary as libgcc should be built with the freshly built
compiler and thus we must wait until the freshly built bits have been
installed somewhere so we can use them. libgcc presence in gnu/usr.bin/cc/
gets in the way of building the new compiler. We could have either
cd'ed to specific directories w/in gnu/usr.bin/cc/ and built and installed
individual bits, or move libgcc out of the way and let our normal subdir
building process work.
* Don't build libgcc in "bootstrap-libraries:" target it should not be
assumed the currently installed compiler can correctly build libgcc.
(as is the case for g++ 2.7.2 and EGCS' libgcc)
committers. A 'make aout-to-elf' is strongly encouraged. This isn't quite
the end of the line for people who have a real problem with updating yet,
but we've got to get this over and done with. Yes, it's bound to be a
couple of bumpy couple of days.
target (see the previous log message). This works for bootstrapping
from 2.2.7. It won't work for bootstrapping from 2.1.x, but that
fails due to include problems earlier.
probably other versions by spamming ${DESTDIR}/usr/include in much
the same way as `make includes'.
Details for 2.2.7: the bootstrap target has always done a weak spam
of ${DESTDIR}/usr/include; we depend on it not installing any
significant anachronisms (it probably shouldn't touch the headers
at all; however, we may be depending on it for things like the
renaming of ts_nsec to ts_sec in <sys/time.h>). Rev.1.49 strengthens
the spam to everything in src/include. For 2.2.7, this is not
immediately fatal. However, the `make all' step in src/includes
is not followed by a `make clean' step, so new rpc headers are not
generated after we've bootstrapped rpcgen. This causes a fatal
error much later when the old (generated) rpc headers are used with
the current headers (sys/types.h and/or the non-generated rpc
headers).
Details for 2.1.x: the bug is immediately fatal. It gives definition
of errno that is not supported by 2.1.x's libc. The weak spam in the
restored version avoids this problem by not installing errno.h.
(Bootstrapping from 2.1.5 actually breaks much earlier.)
I think the header problems supposedly fixed by rev.1.49 were caused
by using NOCLEAN and having the build fall over when the weakly
spammed headers are active. Minor differences in the layout will
then cause the .depend files to point to nonexistent headers. It
is a feature for symlinks like errno.h -> sys/errno.h to not exist
early.
The other change in rev.1.49 breaks building obj directories if NOCLEAN
is set. It is only safe for _re_building with NOCLEAN set.
try and recurse if the lkm dir exists for some reason but there isn't any
Makefile there. (eg: stray files prevented cvs update -P from removing the
empty dirs)
some tools requiring header files, such as errno.h, that are softlinks.
The mini installation of include files in Makefile.inc1 wasn't doing
the job, so it has been ripped out and replaced with a true make of the
/usr/src/include/ directory (make all and make beforeinstall). I think
the original idea was to save time by not installing unnecessary header
files, but it doesn't really save all that much time.
Also, I have moved a NOCLEAN conditional to cover rebuilding the object
tree 'Rebuilding the ${OBJFORMAT} obj tree' section. This may or may not
be correct but it appears to function properly. If it is not correct we
need to find another way to avoid scanning every single file in the
entire source hierarchy for make restarts.