related error messages can be printed before build.sh builds
a new version of make.
Also make some sanity tests unconditional, instead of conditional on
${do_build} || ${do_distribution} || ${do_release} || ${do_install}.
do-sys-modules target was removed from src/Makefile in rev 1.299.
Fixes PR/46994.
Also remove a redundant bomb message which is already handled by
make_in_dir().
Make evbearm-e[bl] a shortcut for evbarm and earmeb or earm.
Allow cats, iyonic, netwiner, shark, zaurus to specify earm though they
still default to arm.
(which require mtree spec files built with MKUNPRIVED=yes)
to avoid unexpected makefs(8) error during image builds:
- if release op is specified with live-image or install-image
at the same time, make sure -U is also specified for the image builds
- before perform live-image and install-image ops check METALOG file
in DESTDIR to see if the build have been performed with MKUNPRIVED
XXX: Probably toolchain should create consistent spec files in
XXX: DESTDIR/etc/mtree dir regardless of MKUNPRIVED settings.
synchronize the options list from `Usage' with its own summary,
and re-outline that list;
two corrections in the order of the options in (parseoptions) list;
a small punctuation change;
remove trailing whitespace in one line.
From Snader_LB.
NetBSD/emips port runs on Xilinx and Beecube FPGA systems and the
Giano system simulator.
eMIPS is a platform developed at Microsoft Research for researching
reconfigurable computing. eMIPS allows dynamic loading and scheduling
of application-specific circuits for the purpose of accelerating
computations based on the current workload.
NetBSD eMIPS support for NetBSD 4.x was written at Microsoft Research
by Alessandro Forin and Neil Pittman. Microsoft Corporation has
donated full copyright to The NetBSD Foundation.
Platform support for eMIPS is the first part of Microsoft's
contribution. The second part includes the hardware accelerator
framework and will be proposed on tech-kern soon.
the default being ./a.out. If we run build.sh rumptest from a r/o
fs, linking fails before it gets to the parts that interest us and
the whole test silently fails.
So:
1) use -o /tmp/rumptest.$$ (objdir might be better, but I couldn't
determine with a high confidence how to obtain the definite one
in build.sh)
2) catch "cannot open output file" error from ld
This fixes the problem 'nbconfig: cannot create /GENERIC'
when KERNOBJDIR has a relative path and is defined as env variable.
Problem reported and fix proposed on tech-toolchain@.
'commit it then' christos@
which does much of the same work but prints a result instead of
setting a global variable. Adjust the rebuildmake function to suit.
Improve the comments describing how we try to figure out whether
the existing tooldir make needs to be rebuilt.
Use getmakevar to expand MAKEOBJDIRPREFIX or MAKEOBJDIR, or (if
neither of those variables is set) use a non-recursive "make obj" in
the top level source directory.
* Do not let TOP_objdir default to ${TOP}. It's now set only by the
-M or -O command line options, or after using getmakevar to expand
MAKEOBJDIRPREFIX or MAKEOBJDIR.
* Make try_set_TOOLDIR handle MAKEOBJDIRPERFIX passed from the
environment. It runs too early to use getmakevar, so it will not work
if the value contains embedded '${...}' variable references.
* Use '$TOOLDIR' (with a literal '$') instead of 'nonexistent' in
a message when rebuilding make when TOOLDIR is not yet known.
is set to "yes" -- defaults to "no" except for build.sh builds. This
results in a deterministic .a file rather than one that reflects
timestamps and permissions on the source files.
Also, clean up the ar flags we're using, and remove a redundant use of
ranlib that on a modern POSIX ar can be done with the "s" flag.
Discussed on tech-toolchain
prints something that does not look like an identifier, then use uname
-m instead. (Cygwin prints "unknown", and OpenBSD prints a long string
containing several spaces; this code should handle both.)
0 Minimal output ("quiet")
1 Describe what is occurring
2 Describe what is occurring and echo the actual command
3 Ignore the effect of the "@" prefix in make commands
4 Trace shell commands using the shell's -x flag
The default remains MAKEVERBOSE=2.
and store in the (non-exported) $TOP_objdir.
(We can't do the same for the environment $MAKEOBJDIR since it may contain
make(1) expressions that aren't easily parseable by sh(1))
Remember appropriate variations of '-M modp' and '-O mod' in $TOP_objdir
(replacing $makeobjdir misuse).
Use $TOP_objdir when trying to guess the TOOLDIR,
and when detecting if the top-level objdir needs to be created.
Fixes problems observed when testing fixes for PR 39360 and 39361.
Fix the TOOLDIR path used when guessing the TOOLDIR.
PR 39360 from Andrew Cagney <cagney@gnu.org>
Use stricter result checking from make(1) when guessing the TOOLDIR.
PR 39361 from Andrew Cagney <cagney@gnu.org>
Apparently there are things you can do in the environment or mk.conf
to set your object directory in a way that the previous code couldn't
detect. (This is an interim measure until we can properly detect and
create the top level object directory in all cases.)
or bomb in non-expert mode.
* If a previous build.sh run with the -U (unprivileged) flag created a
METALOG, then subsequent build.sh runs must also specify the -U flag.
In expert mode, this is just a warning.
* While I was here, changed spaces to tabs in one existing line.
to the CD-ROM image.
Make CDEXTRA and CDBUILDEXTRA be able to contain lists of files and directories
which are added in turn.
Add support for CDEXTRA_SKIP which contains a list of fnmatch(3) items to
skip during the copy. This is _very_ useful for skipping CVS dirs for example.
CDBUILDEXTRA and CDEXTRA_SKIP are to be used in Makefiles creating the images,
CDEXTRA remains to be used from build.sh.
Update documentation and build.sh help text to show that -C can be used to
specify a list of files and directories rather than just a single dir.
includes source sets as well. The infrastructure for this was already
there, although it needed a bug fix. Will look at adding arbitrary
directories next.
* Add a try_set_TOOLDIR function which tries to be clever about setting
TOOLDIR if possible;
* Call try_set_TOOLDIR from rebuildmake;
* Add nobomb_getmakevar, which works like raw_getmakevar except
never bombs;
* Reimplement raw_getmakevar in terms of nobomb_getmakevar;
* Add a second arg to find_in_PATH to control the result when the
program cannot be found.
MACHINE_ARCH only if it's not already set. This prevents
build.sh -m evbarm-eb
from ending up with MACHINE_ARCH=arm instead of =armeb (since MACHINE is
stripped of the -eb suffix just above).
flag. This ensures that -j<N> isn't accidentally inherited from the
environment, because the "--- foo ---" headers printed with -j<N> would
interfere with parsing the output.
when I make my wrapper script source build.sh. I can also think of other
times when it would be a PITA.
Abort the build if make fails in raw_getmakevar() - as tends to happen when
make itself is badly broken.
where ${MAKEWRAPPERMACHINE} is the suffix XXX on the target's make
wrapper, nbmake-XXX.
Fixes toolchain/30673, "single arch host disklabel isn't enough".
* Try to guess a suitable value for HOST_SH, if it was not set in
the environment. First try host-specific heuristics (Solaris has
/usr/xpg4/bin/sh); then try to find the name of the shell that was used
to run build.sh itself (by parsing the output from ps -p $$ -o comm);
then fall back to "sh".
* Having found a value for HOST_SH, copy it to BSHELL and CONFIG_SHELL.
* Use ${HOST_SH} instead of /bin/sh when creating the make wrapper.
* Use ${HOST_SH} instead of unqualified sh when running shell scripts.
- allow "-m macppc/evbppc" to also take "-a powerpc64" to build a
powerpc64 toolchain.
XXX this may change, as an evbppc64 port may be required.
XXX deal with that when we have some code...
which invokes make iso-image in the etc directory.
* Add an "iso-image" action in build.sh, which
invokes make iso-image.
* Document the above in doc/BUILDING.mdoc.
* Re-generate BUILDING.
Approved by christos
tools so that a parallel make doesn't start running dependall before
cleandir has finished.
Unfortunately make doesn't support .WAIT on the command line :-(
The Iyonix is a desktop machine from Castle Technology, based on a 600MHz
XScale[tm] 80321 processor.
* Uses the bootloader from NetBSD/acorn32, which is now 32-bit compatible.
* Currently boots multiuser with a serial console.
* Device support is not yet complete.
With help from abs.
test with "${MKxxx}" = "no" instead of -z "${MKxxx}"
Ignore errors when running pwd -P. (GNU coreutils incorrectly complains)
Both problems pointed out in private email from Christian Limpach.
rather than adding '-s' to make's command line in the makewrapper,
use the .SILENT target based on MAKEVERBOSE's value.
This means that you can do:
./build.sh -N 1 makewrapper
$TOOLDIR/bin/nbmake-$MACHINE
# runs at MAKEVERBOSE==1, with command lines suppressed
$TOOLDIR/bin/nbmake-$MACHINE MAKEVERBOSE=2
# runs at MAKEVERBOSE==2 for this invocation, with command lines shown
trying to use them internally to build.sh.
Fixes issue where build.sh would run "make cleandir" if MKUPDATE=yes was
set in mk.conf and -u wasn't given to build.sh.