for a 64-bit target on a 32-bit host.
NB: There seems to be a bug in either gcc itself or the way we import
it, b/c the incorrect #define HAVE_ATOLL is picked from (e.g. for
sparc64) gnu/usr.bin/gcc/arch/sparc64/auto-host.h - so when gen*
auxilary (host) programs are built in gnu/usr.bin/gcc/backend, they
incorrectly pick-up target's HAVE_ATOLL.
For now providing atoll(3) in libnbcompat is a simple and sufficient
workaround.
by the application, all NetBSD interfaces are made visible, even
if some other feature-test macro (like _POSIX_C_SOURCE) is defined.
<sys/featuretest.h> defined _NETBSD_SOURCE if none of _ANSI_SOURCE,
_POSIX_C_SOURCE and _XOPEN_SOURCE is defined, so as to preserve
existing behaviour.
This has two major advantages:
+ Programs that require non-POSIX facilities but define _POSIX_C_SOURCE
can trivially be overruled by putting -D_NETBSD_SOURCE in their CFLAGS.
+ It makes most of the #ifs simpler, in that they're all now ORs of the
various macros, rather than having checks for (!defined(_ANSI_SOURCE) ||
!defined(_POSIX_C_SOURCE) || !defined(_XOPEN_SOURCE)) all over the place.
I've tried not to change the semantics of the headers in any case where
_NETBSD_SOURCE wasn't defined, but there were some places where the
current semantics were clearly mad, and retaining them was harder than
correcting them. In particular, I've mostly normalised things so that
_ANSI_SOURCE gets you the smallest set of stuff, then _POSIX_C_SOURCE,
_XOPEN_SOURCE and _NETBSD_SOURCE in that order.
Tested by building for vax, encouraged by thorpej, and uncontested in
tech-userlevel for a week.
- get man_MANS and TEXINFO from binutils/doc/Makefile now, not
binutils/Makefile, as all the binutils docs moved.
both:
- add new "mknative-gcc", "mknative-binutils", and "mknative-gdb"
targets / mknative options to allow regeneration of just one part
of the toolchain.
config.cache depends upon 'include/.stamp configure config.h.in defs.mk.in'
and runs configure. Forcebly remove config.cache before running configure.
This change means that config.cache is (still) retained between "make clean"
(but not "make cleandir") runs, but is flushed if configure or config.h.in
is changed, as the cache may contain incorrect information in that case.
which first lstat(2) the target and return EINVAL if it's a symlink,
and then call ch{flags,mod,own} as appropriate.
Removes the need for hokey code inside the tools themselves...
(as Solaris, Linux and HP/UX all mention they need zlib and it should
be part of libnbcompat, maybe this is a hint for us to get a move on
and do that :)
two variables:
TOOLCHAIN_MISSING -- set to "yes" on platforms for which there is
no working in-tree toolchain (hppa, ns32k, sh5, x86_64).
EXTERNAL_TOOLCHAIN -- if defined by the user, points to the root of
an external toolchain (e.g. /usr/local/gnu). This enables the cross-build
framework even for TOOLCHAIN_MISSING platforms.
If TOOLCHAIN_MISSING is set to "yes", MKGDB, MKBFD, and MKGCC are all
unconditionally set to "no", since the bits are not there to build.
If EXTERNAL_TOOLCHAIN is set, MKGCC is unconditionally set to "no",
since the external toolchain's compiler is not in-sync with the
in-tree compiler support components (e.g. libgcc).
* Set MACHINE_CPU much earlier in bsd.own.mk, so that more tests in
that file can use it.
tools use some features of glob(3) that are not available on
all systems.
* Always include the NetBSD vis(3) in libnbcompat, since vis(3)
is not really standardized, and the vis(3) present on some systems
is different from ours.
* Always include the NetBSD MD2, MD4, MD5, RMD160, and SHA1 implementations
in libnbcompat. The host tools use features of the NetBSD versions
which aren't present on all systems that include those functions.
* Add a check for random(3) -- the Heimdal host tools want it.
* Add a check for termios.h -- the Heimdal host tools want it.
* Update the README to indicate the current state of building the
host tools on Solaris 8 (for SPARC).
value for _PATH_DEFSHELLDIR. In theory, _PATH_DEFSHELLDIR will also be
used to find csh, but ".SHELL csh" shouldn't be used anywhere in our source
tree, and this make shouldn't be used for other things.
This should cause nbmake to use the right shell for most purposes when
cross-compiling from Solaris.
that's in that directory. Fixes compile issue on (older source ?) arm
systems noted by Richard Earnshaw.
XXX: arguably a better version of sys/exec_elf.h (and others) should
be in ../compat instead, but that's a problem for another day.
up by pk (and fix comments to match):
* A .WAIT here means that only the *immediately preceding* target needs
to be added to the list of "install-foo" targets used to ensure that
dependencies are installed (otherwise much more than is necessary
gets installed during the build process, increasing build time here)
* If building only an individual target such as "dependall-yacc", the
prerequisites may need to be built before running their "install-foo"
targets -- so add a dependency in that case on "dependall-foo".
gdb support (determined by GNU configure).
* Be less verbose if there are no existing toolchain framework files to
compare (suppress grep "file not found" error)
files. This version is capable of generating these files Properly from
a cross host (subject to having tools and target libs/includes available
ahead of time; to be documented).
For now this is a maintainer-tool only; none of the NetBSD build needs to
run msgfmt as of yet. (However, its presence is needed to make the
mknative part of src/tools/toolchain produce the same output as a truly
"native" GNU configury of the toolchain.)
just add the additional commands to the `.configure_done' target.
Also, since the groff distribution Makefiles don't get their dependencies
right, use internal knowledge to add additional target ordering to the
generated makefile. Note, this hack can be removed once our own make(1)
can be invoked in true sequential (i.e. compatible) mode again for subdir
makes.
* Beef up that goo so that for each ".WAIT group" all of the install targets
in the previous group have completed before starting the `all', `depend'
or `dependall' targets.
Provide a target "bootstrap-libgcc", which will create the files
src/gnu/lib/libgcc/${MACHINE_ARCH}.mk
src/gnu/usr.bin/gcc/arch/${MACHINE_ARCH}/tconfig.h
src/gnu/usr.bin/gcc/arch/${MACHINE_ARCH}/tm.h
...enough to allow libgcc to build so that a bootstrap build to DESTDIR can
take place.