Commit Graph

705 Commits

Author SHA1 Message Date
apb 0f98f9af22 HOST_SH should always be an absolute path, so don't bother searching for
/bin/${HOST_SH} or /usr/bin/${HOST_SH}.

If the HOST_SH sanity check fails, do not continue regardless.
2008-10-26 15:54:19 +00:00
apb bcc847fb86 Use ${TOOL_SED} instead of just "sed" while building other tools.
Where sed is used in a != assignment, use
.if make(depend) || make(all) || make(dependall) || make(install)
to ensure the command doesn't run at "make obj" time when TOOL_SED will
not have been built.
2008-10-25 22:15:28 +00:00
apb 4f24e44506 Build sed earlier, just after mktemp. Note that sed and mktemp do not
depend on each other, but the .WAIT is needed to get them both installed
before the remainder of the tools build.
2008-10-25 22:12:41 +00:00
apb 9e166e6cc9 Remove the local handling of the NOSUBDIR variable. We can rely
on bsd.subdir.mk's handling of the NOSUBDIR variable.

Also add some comment to .if/.else/.endif and .for/.endfor lines.
2008-10-25 14:59:35 +00:00
apb debdeec730 The tools/compat versions of mkstemp() and mkdtemp() need to call the
internal function that's usually named "__gettemp".  However in a cross
build, "__gettemp" is in a namespace reserved for the host system, so we
can't use that.  Use "__nbcompat_gettemp" instead, following the example
of several other functions or macros in tools/compat.  Previously, this
was handled by using the name "gettemp", but that conflicts with the
local gettemp() function in dist/nawk.
2008-10-20 10:28:38 +00:00
dogcow 13a2178397 Define __USE_ISOC99 for linux, making the isblank() proto appear.
This is probably not the Right Thing, but it seems to not break anything.
2008-10-20 07:48:21 +00:00
apb d1cf36b114 Add a comment to the Makefile explaining that we do not use HOST_AWK
here, because tools/host-mkdep is built before tools/awk.
2008-10-19 22:05:22 +00:00
apb 96230fab84 Use ${TOOL_AWK} instead of ${AWK} or plain "awk" in make commands.
Pass AWK=${TOOL_AWK:Q} to shell scripts that use awk.
2008-10-19 22:05:19 +00:00
apb 74809f044a Add awk as a host tool. 2008-10-19 19:40:19 +00:00
apb ce47df9797 Define NOINFO, so that we don't try to build info files for host tools. 2008-10-19 19:38:55 +00:00
tsutsui e610f24a9a Regen from configure.ac rev 1.67:
> Prepare dummy <resolv.h> and <arpa/nameser.h> to make asn1_compile and
> compile_et compile on systems which don't have these BIND headers like Cygwin.
2008-10-18 16:27:19 +00:00
tsutsui 0dbe1e872b Prepare dummy <resolv.h> and <arpa/nameser.h> to make asn1_compile and
compile_et compile on systems which don't have these BIND headers like Cygwin.

Tested by "build.sh -m i386 -U release" on CYGWIN_NT-5.1-1.5.25,
and should close PR toolchain/29032.
2008-10-18 16:25:04 +00:00
tsutsui 9f5daccbf0 Regen autoconf stuff using tools version of autoconf (in src/tools/autoconf),
as per suggestion from apb@ on tech-toolchain.
Tested 'build.sh -U release iso-image' on NetBSD/i386 4.99.73.
2008-10-14 15:23:26 +00:00
dyoung 5e0c4c784c Per uwe@'s suggestion, build nbgroff under wider circumstances.
I choose to build it if MKDOC != no or if MKHTML != no.  It used
to be built only when MKMAN != no.
2008-10-13 18:11:15 +00:00
mrg 9917d709a8 - add a i386/t-netbsd64 makefile fragment to build 32/64 bit
libgcc/multilib on amd64
- enable the 32/64 bit libgcc/multilib support on sparc64
- adapt mknative-gcc to grab multilib.h
- use --enable-multilib on amd64 and sparc64

none of this affects the installed tools yet, just the src/tools one.
2008-10-11 05:03:43 +00:00
apb 85f76ee71a Remove the definitions of BUILD_OSTYPE and BUILD_OSVERSION, which have
been unused since the TOOL_JOIN change made in revision 1.9.
2008-10-07 15:10:35 +00:00
apb 1817eadbb8 Use TOOL_SED, not HOST_SED. Also use && to catch errors in
building atf-host-compile.
2008-10-05 20:14:14 +00:00
apb 4344eb9766 Add a .WAIT to ensure that sed is installed early, so that TOOL_SED can
be used during the build of other tools.
2008-10-05 20:11:54 +00:00
apb 520cbbf81f Build strfile both as a host tool and as an installed program:
* in games/fortune/strfile/Makefile, build strfile as a
  regular program instead of as a host tool;
* add tools/strfile directory to build strfile as a host tool;
* in tools/Makefile, add strfile to SUBDIR list;
* in BSD.*.mk, define TOOL_STRFILE variable;
* in games/fortune/datfiles/Makefile, use TOOL_STRFILE when creating
  databases at build time;
* in distrib/sets/lists/games/mi, mention usr/games/strfile.
2008-09-26 18:23:09 +00:00
skrll 9bb781168b Grab libgcov stuff. 2008-09-19 13:18:28 +00:00
lukem 83079ea51d Configure with --disable-warnings; cross-compiling on NetBSD 3.1
with gcc 3.3.3 doesn't support -Wextra
2008-08-31 00:31:22 +00:00
gmcgarry 3d3450222a Build pcc as host tool if requested. 2008-08-24 05:53:36 +00:00
apb d9a401e5bc Verify that MAKEFLAGS contains "-j" before trying to manipulate it
with :C///.
2008-07-07 10:57:03 +00:00
mrg cadcec42f4 pass the "-j" flag down to gmake. you can force -j option to
gmake by setting GMAKE_J_ARGS=-jN.


discussed with matt@ and a few others.

XXX: this is kind of hacky, as it will fork off more processes than
XXX: "-jN" says to, but there's no real way to get parallelism in
XXX: both the tools/gcc build and the rest of the build without
XXX: this.
2008-07-07 05:43:56 +00:00
he b30cb0f01e Remove references to bebox-elf2pef and bebox-mkbootimage, now that they
have been integrated in common powerpc tools and subsequently removed.
2008-05-26 12:45:50 +00:00
kiyohara e9d09f2c45 Integrated to powerpc-mkbootimage. 2008-05-24 17:47:21 +00:00
garbled 562fa2cf46 Add rs6000 to the headerlist. Pointed out by Michael Muller 2008-05-14 07:08:40 +00:00
jmmv 75562a3ca6 Adjust the build of the ATF tools to use the new paths to the source files
and the new library names.  Per import of atf-0.5.
2008-05-01 15:35:14 +00:00
garbled 0c4a5c6fd7 Build powerpc-mkbootimage for rs6000 and bebox too. 2008-04-30 21:18:17 +00:00
garbled 1ccf3668f5 prep-mkbootimage is no longer needed. 2008-04-30 21:16:56 +00:00
garbled c3408ed04a Convert prep to use the new unified mkbootimage rather than it's own. This
mkbootimage can be shared by prep, rs6000, and bebox.

TODO: Convert bebox to use this.  Needs someone to test.
2008-04-30 21:15:33 +00:00
martin 3028e483e4 Convert to new 2 clause license 2008-04-29 06:53:00 +00:00
martin ce099b4099 Remove clause 3 and 4 from TNF licenses 2008-04-28 20:22:51 +00:00
skrll 11670328a2 Collect the libobjc config.h 2008-02-08 18:06:48 +00:00
simonb d8de5b102b Remove support for NetBSD/pc532. 2008-01-09 11:25:58 +00:00
christos dff27399c2 $HOST_SH does not necessarily contains the absolute path to sh. Fix it if
it does not.
2007-11-24 18:44:00 +00:00
uebayasi 0f2ad14fc7 target:
cmd1 && cmd2 && cmd3

|	|	|
v	v	v

target:
	cmd1
	cmd2
	cmd3

This makes the script (cmd1 && cmd2 && cmd3) slightly easier to debug.  No
functional change expected.
2007-11-19 05:54:03 +00:00
jmmv 2965cbca98 Add the atf host tools
This adds reachover Makefiles to build the atf tools required during a
cross-build.
2007-11-12 14:54:43 +00:00
christos 170bdd7b66 make it so that we always use our own version of getopt_long as the comment
says.
2007-11-08 20:30:59 +00:00
tls 918f0e5e02 Try to address mess with user_from_uid and friends by ensuring we always
get our versions if any of the functions aren't present on the host system.

Still assumes if the functions are all there, they work like ours, which
may be a problem too.
2007-10-30 20:23:35 +00:00
christos 93c52e3c71 I am now convinced of the error of my ways, and I am checking for all the
decls mtree is using.
2007-10-19 15:56:53 +00:00
christos e8cbe68183 Move linux block up higher as it was before. noted by apb 2007-10-18 16:04:24 +00:00
christos a3b8c83a7e - define the NetBSD options before including any files
- add the _NETBSD_TOOLS define to make more symbols visible
- user_from_uid and group_from_gid are renamed only if we don't have them
2007-10-18 02:27:10 +00:00
garbled cbaea9726c regen for pmppc removal 2007-10-17 23:31:07 +00:00
apb 810a68fb1a regen 2007-10-14 20:27:22 +00:00
apb 7f785f3945 Adapt to the changed way of telling make which shell to use. 2007-10-14 20:26:47 +00:00
apb 4d49fce1d6 * Add Makefile.regen to regenerate configure from configure.ac;
* Add comments in configure.ac to explain how to regenerate configure.
2007-10-14 20:25:35 +00:00
lukem 9b5022a3a6 add raise_default_signal 2007-09-28 09:12:49 +00:00
lukem 339d6e2876 regen for raise_default_signal 2007-09-28 09:12:19 +00:00
lukem 5f778f6e61 Add raise_default_signal(). 2007-09-28 09:11:11 +00:00
drochner 109044809a Force use of __cxa_atexit by a configure command line argument
(for booth the tool build and mknative). gcc's "config.gcc" sets
it if the target is netbsd[2-9], but since the target is w/o version
number in our builds, it has no effect. Found by Nick Hudson,
patch approved by mrg.
2007-09-20 12:26:51 +00:00
yamt 7253d0ec03 use a pre-generated list of files instead of running find(1) again and again.
PR/34551.
2007-08-07 12:44:39 +00:00
yamt 1912a2fa9c add a file generated by mkheaderlist.sh. 2007-08-07 12:43:02 +00:00
yamt f4069de4f3 a script to generate a list of headers for Makefile.disklabel. 2007-08-07 12:38:23 +00:00
apb 46427a7162 Regen after recent changes to configure.ac and compat_defs.h.
(Most of the changes seem to result from somebody having used
non-tools versions of autoconf and autoheader in the past.)
2007-08-07 08:29:15 +00:00
apb a7b292d021 Update the instructions to say that regen should be done again
to pick up changed RCS IDs.
2007-08-07 08:27:41 +00:00
apb 0da2db6cd1 Provide definitions for {be,le}{16,32,64}{enc,dec} if necessary.
This is adapted from the very detailed fix provided by
Giles Lean in PR bin/36678.

Only one simplified implementation is provided, instead of the
two implementations conditional on __GNUC_PREREQ__(2,95) that are
provided in NetBSD's <sys/endian.h>.  The use of memcpy instead of
__builtin__memcpy, and the absence of __inline or __unused, should make
it independent of GCC.
2007-08-07 08:22:04 +00:00
apb 581beaff5e More detailed instructions for what to do when editing configure.ac.
In particular, discourage the use of non-tools versions of
autoconf and autoheader.
2007-08-07 07:47:50 +00:00
jmmv ecd360e001 sys/queue.h now requires sys/null.h, so add a compatibility header file.
Fixes build of tools under, e.g. Mac OS X.
2007-07-19 13:49:12 +00:00
jmmv 899297d564 Treat -cxx-isystem as -isystem-cxx. Not really required by our code, but
I discovered this while trying to add a host tool written in C++.
2007-07-09 15:27:10 +00:00
joerg dbfc63fcce Rename nbinstall to ${MACHINE_GNU_PLATFORM}-install as it calls the
target strip. Don't pass down strip as it is not needed any longer.
2007-07-03 16:29:24 +00:00
nakayama 0c74dffd74 Add strndup(3) to libnbcompat, since estrndup(3) added into efun.c calls it. 2007-07-03 12:11:09 +00:00
joerg 12929bba43 - When compiling nbinstall for the tool chain, use the target strip
and not /usr/bin/strip. This makes nbinstall usable for
  cross-compiling in pkgsrc.
- Fix a typo in a comment.
- Fix strip() in the context of (v)fork:
  - Build the argument string first using asprintf (simpler) and
    avoid leaking memory from the child in the parent.
  - Don't use warn in the child, as stdio should be avoided.

OK christos@, tested on Solaris by dmcmahill@.
2007-06-28 19:05:55 +00:00
he 678b5429b3 Instead of inventing a new environment variable to override the
SSP functionality location test, use gcc_cv_libc_provides_ssp instead,
as hinted by freza@ and uwe@.
2007-06-07 14:36:27 +00:00
he bd8f620dfb Modify the gcc configure script to allow override of the "target libc
has ssp functions built-in" test via the TARGET_LIBC_PROVIDES_SSP environment
variable, to allow us to configure a cross-compiler appropriately without
having to try to find out by looking in the target's source directory.

Tweak our build to tell gcc that the ssp bits are now in libc.

The native compiler appears to already think that the ssp bits
live in libc, so no change appears to be needed there.

The autoconf-generated configure script will be committed separately shortly.
2007-06-07 08:58:58 +00:00
matt a2194c542b Remove non-shared hooks for VAX. 2007-03-31 05:55:43 +00:00
skrll 25a1cb4e5b G/C some HAVE_GCC == 3 stuff 2007-03-16 08:01:05 +00:00
chs 13bb388148 disable sim for mips until someone adds the rest of the build framework for it. 2007-02-19 18:26:22 +00:00
cbiere d5ed210dc4 Use '-o' instead of '-or' for find, the latter is a non-portable extension.
Reported by Raymond Meyer.
2007-02-07 17:49:23 +00:00
apb f7004b0cbc Whenever we try to parse the output from make, run make with the -B
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.
2007-02-05 18:26:01 +00:00
dogcow 38bd59d0b4 paxctl got moved to usr.sbin, it seems. 2007-01-30 23:47:37 +00:00
dogcow 4af19d6ae8 Back out this addition; it's The Wrong Thing when other system headers get
included.
2007-01-28 10:10:16 +00:00
dogcow f7c54e5b52 Due to recent changes in the cd9660 code, crosscompilation of tools/makefs
now fails due to the use of [be]e{16,32}dec. Add a compat header, and force
the inclusion of <sys/endian.h>.
2007-01-28 09:19:33 +00:00
apb c4aece6e61 Pass TOOL_JOIN, TOOL_MKTEMP, NM, and TOOL_SED through to the
tools version of lorder.  Also remove the hack of treating
Darwin differently, because the new TOOL_JOIN should solve that
problem.
2007-01-14 16:32:23 +00:00
apb 082025241e Build join(1) as a host tool. 2007-01-14 16:17:29 +00:00
ginsbach 0772ea91f4 Fix unbalanced sed expression -- add missing '('. 2007-01-11 15:10:08 +00:00
ginsbach dc7b6798f1 Don't invoke join(1) with POSIX syntax on MacOS X 10.3.9. This fixes
cross-building on the aforementioned platform.
2007-01-09 17:49:56 +00:00
ginsbach 37ee0e11e5 Fix tools build, binstall/xinstall, for systems without id_t, e.g.
MacOS X 10.3.9.  This should better match the NetBSD definition of id_t
in sys/sys/types.h.
2007-01-09 17:34:27 +00:00
agc 06c3bf82f1 Fixes to allow veriexecgen to be built as a host tool. 2006-12-20 22:03:20 +00:00
agc d05a6603f6 A commit too far - don't try to build veriexecgen for just now 2006-12-20 08:22:41 +00:00
agc b1a085da3c Build veriexecgen as a host tool 2006-12-19 21:23:18 +00:00
he 0a97c3f688 Complete the move of string_to_flags() and flags_to_string() from the
bin/ls sources to libutil:
 o Bump libutil minor version number
 o Fix uses to include <util.h> to pick up the function definitions
 o Fix most uses of flags_to_string() to release the now-malloc()ed result
2006-12-14 20:09:35 +00:00
dyoung f3fbc3bb0f Change the name of the host disklabel to nbdisklabel-${MAKEWRAPPERMACHINE},
where ${MAKEWRAPPERMACHINE} is the suffix XXX on the target's make
wrapper, nbmake-XXX.

Fixes toolchain/30673, "single arch host disklabel isn't enough".
2006-12-09 20:13:13 +00:00
freza 62e91a7ad9 There's no need to install machine/reloc.h with powerpc/include/elf_machdep:1.7
OK by <riz>
2006-11-25 18:59:35 +00:00
skrll c27514b676 Fix the logic for --disable-sym. Hi uwe!
Use CPPFLAG_ISYSTEM.
2006-11-25 16:06:04 +00:00
riz 0ed9b3e5ea add reloc.h to the list - missed this in the last commit. 2006-11-25 07:38:44 +00:00
uwe 964935dc72 Disable sim for mknative unless it's known to work (configure's
default is to enable sim if there's support for the cpu).

The current list of "known to work" contains arches with G_SIM_OBS
already set: powerpc, powerpc64 and mips.

There's arm support in sim, but committed configs for arm do not have
G_SIM_OBS set, so I'm not enabling it here.

There's SH support in sim, but it fails to build out of the box, and
since we didn't build SH sim support for gdb 5.3, we keep it disabled.

Other arches shouldn't be affected, as there's no support for them in sim.
2006-11-24 02:09:01 +00:00
uwe 65e0d788c7 Pass preset configure "cache" vars in the environment not only to the
top-level configure, but to ${MAKE} configure-host as well.

Add more vars (for readline mostly) so that there's no configure
warnings about tests skipped b/c of cross-compilation.
2006-11-24 01:48:57 +00:00
uwe 4e48d71604 Note that nbmake-MACHINE native-gdb writes files under src, so this
step needs to be done in a writable src tree.
2006-11-23 23:33:56 +00:00
uwe f8e9ad465b Wrap overlong line to fit. 2006-11-23 23:31:00 +00:00
uwe 2770a4453e Use -isystem to add ${DESTDIR}/usr/include to the search path.
gdb comes with its own copy of GNU readline 5.x, but
-I${DESTDIR}/usr/include stuffed at the beginning of the command line
makes it find our compat readline/readline.h (emulating readline 2.x)
that conflicts with the readline 5.x includes.

Makes README.mknative instructions actually work instead of failing
midway b/c of conflicting tilde_expand() prototypes.
2006-11-23 22:41:10 +00:00
riz 2adcd99325 Add the nbinclude directory to the include path, so that
<hppa/elf_machdep.h> (and possibly others) can be found.
2006-11-22 18:37:38 +00:00
riz 2f0a27492f Make sys/exec_elf.h and machine/elf_machdep.h available to host
tools, and allow paxctl to use them when compiled as a host
tool.  This fixes the build on MacOS X (and perhaps other platforms)
2006-11-22 15:08:47 +00:00
dsl 7e3a0208c4 Add some notes about the bogosity of some of the .WAIT stuff.
Remove a 'never had a sane effect' .WAIT from a .ORDER line.
Don't add a (probably incorrect) dependency for 'make install' since
it contradicts a .ORDER line elsewhere when .ORDER applies recursively
to child nodes.
I also think that the stuff that tries to add dependencies between
the stuff that bsd.subdir.mk generates does not DTRT at all.
I suspect that build.sh builds things in an order that avoids issues here.
2006-11-17 21:54:55 +00:00
christos 2354d57484 Add paxctl as a tool. 2006-11-10 16:50:10 +00:00
dogcow 9070e87821 ...and one more for xcompilation (due to lib/libc/hash/sha1/sha1hl.c, sigh.) 2006-10-29 06:56:01 +00:00
dogcow 2b33ff3b97 cross (and native) building works again. woo. 2006-10-29 06:17:08 +00:00
uwe 06ddf90514 CONFIGURE_ARGS+=--disable-nls so that tools/gmake doesn't accidentally
pick up tools/gettext that is built when MKMAINTAINERTOOLS=yes

As gettext is built after gmake - this only happens if you either do
an update build and tools/gmake gets rebuilt, or if you use the same
TOOLDIR for several ports.
2006-10-27 22:36:23 +00:00
mrg 3e7961407f make sure we can find <sys/{rmd160,sha2}.h>. make sure the crypto/foo.h
versions of these include something that exists...
2006-10-27 22:32:45 +00:00
mrg af62440127 add ${.CURDIR}/../../common/lib/libc/hash/{rmd160,sha2} to the .PATH
so that these sources are found after this code moved.

(hi christos!)
2006-10-27 22:25:26 +00:00