Commit Graph

1270 Commits

Author SHA1 Message Date
christos 1ffd7c80d4 put O_CLOEXEC definition here. 2014-09-24 13:17:35 +00:00
matt 58bfd92e80 Add sys/arch/riscv. 2014-09-19 17:30:13 +00:00
christos 17d648a1fc Fix problem reading the last line when it did not contain a delimiter
(Hubert Garavel)
2014-09-16 17:23:50 +00:00
martin 5621a8b94e Avoid overflowing the "year" value by making the field uint64_t. Adapt
arguments and local variables accordingly.
This now fixes PR 49144 for real.
2014-09-07 11:50:23 +00:00
matt e1c4f892b5 or1k does not support --with-float 2014-09-03 19:25:29 +00:00
matt 667791d88d Add or1k 2014-09-03 19:24:52 +00:00
apb 893aa1d4bf Add tools/README, to collect hints like how to use
.if defined(HOSTPROG)

and

#if HAVE_NBTOOL_CONFIG_H
#include "nbtool_config.h"
#endif /* HAVE_NBTOOL_CONFIG_H */
2014-09-01 13:50:15 +00:00
apb 20e1ccfe27 Copy definitions of __type_min(t), __type_max(t), and some related macros,
from <sys/cdefs.h>, for use when building tools.
2014-09-01 11:20:06 +00:00
martin d67a8a7def Add a slightly stripped down version of sys/dev/clock/clock_subr.h to make
this code available for tools.
2014-09-01 07:48:16 +00:00
christos 2b177d3981 switch to the new gmake 2014-08-18 06:58:51 +00:00
joerg f14316bcbc Update build glue for LLVM/Clang 3.6svn r215315. Changes include various
performance improvements across all backends and a much improved PPC32
backend.
2014-08-10 17:32:54 +00:00
matt 547b3a3b01 Changes to existing files to enable building AARCH64 userland.
evbarm64-el
This is clang only.  While gcc4.8 supports aarch64, no netbsd support has
been written for aarch64 with gcc4.8.
2014-08-10 05:56:36 +00:00
christos 786e78dabb use host rules for files. 2014-07-15 16:04:35 +00:00
christos 86eb29ab38 descend to vgrind 2014-07-15 13:19:44 +00:00
christos 373bce115f build glue 2014-07-15 13:19:13 +00:00
pooka bb567b2891 Add cat, rpcgen and stat to TOOLS_BUILDRUMP. They're useful for
installing headers for the app stack cases that need it done, and small
enough to not matter for the kernel-only cases that don't.
2014-06-15 14:36:57 +00:00
mrg ac641cb906 remove remaining makefile support for GCC < 45 that i found. 2014-06-14 20:49:36 +00:00
christos 453a5cc5a8 Deal with errc/warnc 2014-06-06 01:40:40 +00:00
joerg b1bb3099bf Update build system for LLVM/Clang snapshot r209886. This brings in the
merged AArch64 backend and the move of eARM to DWARF exception handling
for NetBSD. C++11 is required for building.
2014-05-30 18:28:13 +00:00
skrll bca753667d Don't grab libstdc++-v3/config.h it's not used. 2014-05-29 16:27:50 +00:00
mrg 955b6c1f27 commonize the netbsd local version string. (the native one wasn't
updated, and now that won't be a problem again.)
2014-05-29 07:40:37 +00:00
mrg f6968e3347 two fixes skrll@ pointed out:
- pass --enable-libstdcxx-threads to enable a bunch of tests and thus
  get the right answers
- MKNATIVE_CONFIG_TARGET_LIBS needs to do libgcc before libstdc++-v3,
  for the GCC 4.8 case.

with these we now get the right threading options in the headers.
2014-05-28 07:32:22 +00:00
skrll e0000582f3 Update with-pkgversion date for gcc 4.8.3 import. 2014-05-27 09:19:30 +00:00
joerg 61731496eb Retire USE_COMPILERCRTSTUFF=yes. 2014-04-22 13:20:58 +00:00
apb e9ba37c365 Clarify the NetBSD-specific and Linux-specific code at the top of
compat_defs.h:

* Explain why _NETBSD_SOURCE should not be defined on NetBSD.
* Move NetBSD-specific block to the top of the file.
* Improve comment about Linux <feature.h>.
* Move #undef _POSIX_SOURCE and #undef _POSIX_C_SOURCE to the
  Linux-specific block instead of a place that would affect all
  non-NetBSD platforms.  This makes the code match the comment.

This will need to be re-visited if other platforms also need
#undef _POSIX_SOURCE or #undef _POSIX_C_SOURCE.  At present, I suspect
that they are needed only for Linux.
2014-04-19 19:01:08 +00:00
riastradh 7410f91473 ctfconvert/ctfmerge need libdwarf &c., so build them if MKCTF=yes. 2014-04-03 18:23:38 +00:00
martin aad6ef8bb5 Bring back the playstation2 port - now that a toolchain for it is
available again.
2014-03-31 11:25:47 +00:00
ozaki-r 1339b2cc13 Add MKCTF
This variable separates CTF stuffs from MKDTRACE; we can build DTrace
solely without building and using them. This allows us to use DTrace
even if CTF stuffs have problems (actually they have now).

This variable would be merged into MKDTRACE eventually, once CTF stuffs
work correctly again.
2014-03-25 09:52:55 +00:00
christos c20b670602 switch to the new libelf and libdwarf 2014-03-09 17:12:03 +00:00
christos 9b48ab4fda switch to the new libdwarf 2014-03-09 17:10:38 +00:00
christos 482608c0a5 switch to the new libelf 2014-03-09 17:10:12 +00:00
mrg 4e43797c9f don't collect gthr-default.h anymore. 2014-03-02 04:58:20 +00:00
mrg 4501ec6885 don't collect c++allocator.h. we copy it via G_ALLOCATOR_H we've
already pulled out, and the extra copy can confuse make when it
has an older timestamp than the copy in dist/libstdc++-v3/.
2014-03-02 03:17:14 +00:00
mrg b53d27fc90 define GCCDIST properly for GCC 4.1, and since it is now the same
as GCCSRCDIR remove the latter.
2014-02-27 20:15:53 +00:00
matt c265e52e42 To build elftosb with clang++, it needs more than nl_types.h provides.
XXX to workaround with, if compiling on __NetBSD__ just include the real
nl_types.h
2014-02-27 01:07:52 +00:00
mrg afa90f2bf5 prepare for moving GCC 4.5 into gcc.old:
- convert to using ${EXTERNAL_GCC_SUBDIR}
- define base-external-gpl3-gcc* subdir as GCC_SUBDIR
- use <bsd.init.mk> over <bsd.own.mk> for a bunch of places; mostly
  because it arranges for ../Makefile.inc to be included earlier, and
  don't bother including the latter if the former is already included.
- move all .PATH: settings after <bsd.{own,lib}.mk> so that all
  valid variables are set before it is evaluated
- rename mknative-gcc* to match their subdir name.

XXX the relationship between the Makefile.inc/Makefile.gcc_path files
    is kind of sketchy, it would be great if this was fixed.
2014-02-26 09:54:32 +00:00
skrll 6d3ceb1d61 Rename NetBSD/hp700 to NetBSD/hppa.
Unfortunately our VCS isn't very helpful here.
2014-02-24 07:23:38 +00:00
christos eff9fc76a8 put back some cppflags we lost. 2014-02-18 01:34:18 +00:00
christos 8140d3b7fb Merge gcc-4.8 mknative bits. 2014-02-17 21:39:43 +00:00
skrll 9897c7a624 The mpfr sources moved down into a src directory - deal with this in
mknative.
2014-02-16 11:26:31 +00:00
tsutsui 11b13dddf7 No need to specify ${.OBJDIR} for target files.
It rather fails if MKHOSTOBJ=yes.
2014-02-15 13:34:28 +00:00
joerg 1df17bf6cf For the tools build, always use the Bison-created m68 asm parser.
Fixes build on Linux, where the glibc guards trip up the
"must-be-included-first" check in config.h.
2014-01-29 23:35:13 +00:00
christos 3f604fd430 Add the {v,}{err,warn}c functions 2014-01-16 17:24:56 +00:00
matt 4783f46508 Pass HOST_CXX to llvm configure as CXX=${HOST_CXX:Q} since llvm wants c++
more than cc.
2014-01-16 09:00:55 +00:00
christos 2b043c75b6 eliminate use of bsd.sys.mk from Makefiles 2014-01-16 01:15:32 +00:00
joerg dd255ccea4 Update build glue for LLVM/Clang 3.5svn r199312. Noticable changes
include bug fixes for the loop vectorizer, initial work for assembler
parser/disassembler on SPARC, improvements to ARM assembler and .code16
support on x86.
2014-01-15 22:21:33 +00:00
apb d74d486617 fix prototype for strnlen. 2014-01-09 16:08:46 +00:00
apb c9b2ee2cd1 Declare and define strnlen if necessary. 2014-01-09 11:31:12 +00:00
apb 5318071613 regen 2014-01-09 11:27:31 +00:00
apb fd3f18ac6d Add strnlen to configure tests in tools/compat 2014-01-09 11:26:58 +00:00
joerg 66153a214b Update build system and import script for mdocml 1.12.3. 2014-01-05 19:49:57 +00:00
joerg 6d322f2f45 Update LLVM family to 3.5svn r198450. Interesting changes include:
- Improvements in the SPARC64 support
- ARM backend can almost build a full NetBSD/EABI system with the
  integrated assembler
- PowerPC grows disassembler support
- LLD supports copy relocation, beginning of MIPS backend
- New diagnostic for use of bool expression as size_t argument for
  strncmp and friends
2014-01-05 16:38:05 +00:00
dsl 7c4ad3905a Remove the borked definition of ELF64_Shalf from some more places.
Remove the _KERNEL parts of some clones of sys/elf_exec.h
One might ask why this file has got cloned so many times.
2014-01-03 16:50:54 +00:00
joerg aceb213538 Allow kernel code to access constant databases by moving cdbr(3) and the
required mi_vector_hash(3) into src/common.
2013-12-11 01:24:08 +00:00
mrg 75219f3a01 update to MPC 1.0.1. 2013-11-28 12:08:56 +00:00
apb 3c49568a05 Define __USE for use during a tools build. 2013-10-24 13:59:47 +00:00
skrll 28fd2e75c0 Improve wording and remove typos 2013-10-21 09:02:08 +00:00
skrll c31e8e667f Move the GNUHOSTDIST assignment back to the top of the Makefile. 2013-10-21 08:59:29 +00:00
skrll 2143de4353 Group the mknative stuff together - no functional change 2013-10-20 17:12:23 +00:00
skrll 739e5cb01a g/c VAX_CONFIGURE_ARGS 2013-10-20 17:10:15 +00:00
skrll e0d4b1e3bf Make sure gmake is quiet when grabbing variables. 2013-10-20 16:00:20 +00:00
skrll 02cb02f748 Deleted 1 line too many in previous commit. 2013-10-20 14:55:28 +00:00
skrll cc4d923295 g/c gcc3 goop 2013-10-20 14:14:18 +00:00
christos ff5462c4ef more files needed 2013-10-03 18:58:37 +00:00
skrll 41c37f737d Grab enable_initfini_array from the ld Makefile 2013-10-01 15:41:17 +00:00
joerg 6c440ed37c Update LLVM/Clang snapshot to r189662. This includes many improvements
to the new SLP vectorizer, fast codegen support for PPC and using
terminfo for the color sequences. In addition, add (optional) build
infrastructure for lld to allow easier testing. This is controlled by
MKLLD.
2013-09-02 14:34:55 +00:00
joerg 6bc52dcb42 Preserve -std=* options as they may change the dependency list. 2013-09-02 08:37:11 +00:00
joerg 4879d4747d Support __format_arg. 2013-08-18 20:48:17 +00:00
gsutre f5edbcbeb8 Use makeinfo built from src/tools/texinfo. Fixes PR toolchain/48123.
ok apb@
2013-08-16 10:29:32 +00:00
jmcneill 7184d9f2f5 regen 2013-08-14 10:15:14 +00:00
jmcneill 6d54013fc1 add test for struct tm tm_gmtoff member 2013-08-14 10:14:45 +00:00
drochner 86d6df49cc pass HOST_SH to the build, to keep it from picking up a "bash"
from $PATH
2013-08-13 20:41:25 +00:00
jmcneill b54c1c7c33 regen 2013-08-09 20:13:21 +00:00
jmcneill a46673afc5 makefs_udf uses clock_gettime, and on some versions of linux that lives in librt 2013-08-09 20:12:38 +00:00
apb b042dd28fe Revert previous change to tools/Makefile.gnuhost. When getenv("M4")
contains multiple words, flex fails.

Adjust tools/autoconf/Makefile to pass the necessary extra arguments via
M4=... in CONFIGURE_ENV.  This is similar to what used to be in
revision 1.4 of tools/autoconf/Makefile, but it's now after instead of
before the inclusion of Makefile.gnuhost, because it has to override the
value of M4=...  that Makefile.gnuhost stores in CONFIGURE_ENV.
2013-08-07 17:50:55 +00:00
apb 1f64f4d863 Compile snprintb.c into libnbcompat. The source file is found in the
common/lib/libutil directory.
2013-08-06 22:04:25 +00:00
apb 0c6780a550 declare snptintb_m() and snprintb() if HAVE_SNPRINTB is not defined. 2013-08-06 21:58:46 +00:00
apb 2ee0f9ee2f regen, to pick up the test for snprintb_m. 2013-08-06 21:56:36 +00:00
apb e39e332c37 Add a configure test for snprintb_m. We will assume that
the rpesence of snprintb_m implies the presence of snprintb.
2013-08-06 21:50:19 +00:00
apb 7788a0781f Add the "-g -D__gnu__" flags when invoking M4 via CONFIGURE_ARGS
in tools/Makefile.gnuhost.  This makes the tools version of m4
behave like GNU m4.

Remove similar code from tools/autoconf/Makefile, where it didn't
work because Makefile.gnuhost would previously have overridden it.

This fixes a problem in which the tools version of autoconf complained
"M4sugar requires GNU M4.
Install it before installing M4sugar or set the M4 environment variable to its path name."
2013-08-06 21:47:01 +00:00
christos 78da6e3986 revert socklen_t to int (from dh) 2013-07-20 10:31:19 +00:00
matt 2d336eb8bb Even if we aren't making a crossgdb still make the object dir for it. 2013-07-19 20:58:58 +00:00
christos b865eeeb70 PR/48063: Justin Cormack: incorrect definition of socklen_t 2013-07-19 12:00:30 +00:00
pooka 39da3b933c regen
(XXX: I don't think these files were previously regen'd with the
method documented in configure.ac, and therefore the diffs are now huge)
2013-07-19 11:06:37 +00:00
pooka 0cf7fed87e Fix some tests for musl libc -based systems.
from Justin Cormack and Jens Staal
2013-07-19 10:53:20 +00:00
matt c9855651f8 Add stub port for evbcf which has enough to do a distribution build. 2013-07-18 22:08:59 +00:00
matt 86b93a01b2 m68k doesn't support with-float=soft 2013-07-18 22:00:48 +00:00
joerg 25c7cbb1ed Update LLVM/Clang to snapshot r185778. This brings in a lot of work on
integrated-assembler support on PowerPC as well as support for
compressed DWARF sections in some tools.
2013-07-07 21:36:42 +00:00
mrg 9b70ac591a pass both NEWCONFIGDIR and NETBSDSRCDIR to mknative-gcc. 2013-06-28 08:30:10 +00:00
mrg bbbc9a7e3c use NETBSDSRCDIR to find mpc/mpfr/gmp, not NEWCONFIGDIR, the
latter which is for finding a r/w directory to write to if
we're running from a read-only tree.
2013-06-27 02:38:39 +00:00
tsutsui ccf0f70064 Invoke tools/binstall/mkmanifest for Cygwin via ${HOST_SH}.
Fixes builds using source sets that drop executable bits.
2013-06-14 16:10:02 +00:00
joerg c7c727fae8 Update LLVM/Clang snapshot to r182734. Brings initial support for
integrated PowerPC assembler.
2013-05-28 17:37:33 +00:00
skrll e960d69d35 Create a sanitise_includes function and use it everywhere it's needed. 2013-05-05 07:11:34 +00:00
matt af8f0546ca Make disklabel a MI tool. It will use MACHINE/MACHINE_ARCH to determine
the disklabel params as well as allowing command-line options of -M <machine>
and -B {le,be} to specify MACHINE and byteorder to be used.
2013-05-03 16:05:11 +00:00
kiyohara 4aba7d3a0d Support to build for epoc32 userland. 2013-05-01 13:11:59 +00:00
skrll e75ab118f0 Avoid populating mknative output with gmp,mpfr, and mpc source
directories
2013-04-25 16:18:43 +00:00
joerg af56d1fe99 Update LLVM/Clang snapshot to r180004. This brings in the last pieces of
C++11 support in Clang as well as initial SPARC64 support.
2013-04-25 13:59:54 +00:00
skrll 3aad465ab1 Use --with-{mpc,mpfr,gmp}-{lib,include} to avoid the LIBISPRIVATE=no
dance in mknative and avoid poluting the DESTDIR.

Update the README to reflect this.
2013-04-18 05:20:00 +00:00
uwe a94dff73a7 Some shells have ((expr)) syntax for arithmetic. Add space between
parens of nested (compound-list)s to unconfuse them.

Fixes PR toolchain/47695
2013-03-27 01:03:39 +00:00
christos 747508ddb1 no man pages for tools build. 2013-03-16 22:32:50 +00:00
christos 0cbc48b3cf Put back error checking in a simpler form thanks to uwe 2013-03-16 02:51:56 +00:00
christos 64e869fe87 Fix the real problem, Makefile.host was included before the HOST_MKDEP
setup so it prevented correct CPPFLAGS from being used.
2013-03-16 02:51:25 +00:00
joerg 8f7ae0d2ba Revert 1.25 and 1.26: Breaks build on !NetBSD 2013-03-14 14:55:35 +00:00
christos 93b2a5c31b re-directing once is good enough. 2013-03-12 01:55:33 +00:00
christos 2bc1b2d373 not a good place to include "nbtool_config.h" 2013-03-12 01:52:55 +00:00
christos 621c21b80f Perform shell fd gymnastics to capture the error in the pipeline and exit. 2013-03-12 01:52:20 +00:00
apb 79f461b52c Prevent the tools/gettext build from trying to run emacs. 2013-03-06 14:34:01 +00:00
christos aa85cedebf don't leak on error. 2013-03-05 16:29:09 +00:00
christos 1cf655fddf regen 2013-03-05 16:28:06 +00:00
christos 8fdd0859f5 add dprintf 2013-03-05 16:26:41 +00:00
christos e2a59201c6 account for -vi 2013-03-05 03:06:21 +00:00
joerg db135d737c Add infrastructure for building MCLinker. 2013-02-27 21:25:05 +00:00
joerg 763d7bc79a Work-around for python detection in LLVM's configure script 2013-02-20 14:13:31 +00:00
joerg 4a5bd22048 Replace NETBSDSRCDIR with .PARSEDIR based logic here. bsd.own.mk is
included too early in the tools build, but not including it fails for
standalaone builds.
2013-02-19 18:02:41 +00:00
joerg c1d816d5fd Update LLVM/Clang snapshot to r175373. This improves GNU as
compatibility.
2013-02-19 12:35:41 +00:00
joerg 6936a0d356 Explicitly include bsd.own.mk to allow building without tool make. 2013-02-18 20:30:16 +00:00
christos 8c8d8c331c Arrange for manifest 2013-02-17 01:47:59 +00:00
christos 6a49e1d8c8 Create a manifest on windows if the filename requires it, so that it does
not need UAC to execute.
2013-02-17 00:36:40 +00:00
christos ce5eed14bf regen 2013-02-17 00:34:35 +00:00
christos 1fb8dbfe71 cygwin defines u_quad_t in <rpc/types.h>, so include this to the headers
we include and test by default.
2013-02-17 00:34:11 +00:00
christos e382023f82 - Provide HOSTEXEEXT if NOCOMPATLIB
- merge a variable for readability and add an exe suffix where needed.
2013-02-17 00:32:42 +00:00
christos af9a2d00d7 yes, but include the right file 2013-02-07 20:31:52 +00:00
christos fb6d072e45 add shaX and rmd160 headers, same as mdX 2013-02-07 20:30:29 +00:00
christos a5cb6d21a6 Don't create a crippled mtree with no hashes. We have hash support in
libcompat, use it. If that breaks cross-compilation, we'll fix it.
2013-02-06 01:01:48 +00:00
matt 3ba56103bd There are other little endian arm machine_arches other than "arm"
Use MACHINE_CPU and TARGET_ENDIANNESS instead of MACHINE_ARCH
2013-02-05 07:27:02 +00:00
joerg 96fc3e30a7 Update to LLVM/Clang snapshot r174288. This brings in the new AArch64
backend as well as an import bug fix for pointer compare optimisations.
2013-02-04 15:00:31 +00:00
pooka dc7c452845 Use TOOLS_BUILDRUMP=yes to restrict building of tools to those required
for building rump kernels.  This cuts down the NetBSD source tree required
by buildrump.sh to a fraction and addresses a size/download time concern
from a person packaging rump kernels for Linux.

No change to the normal case (tested with several -j32/-j64 builds).

reviewed by apb
2013-01-31 15:22:50 +00:00
riastradh 33d53fbdf3 Set NOMAN before including <bsd.own.mk> to really fix PR 47500.
(Hi, christos.)
2013-01-27 19:21:12 +00:00
christos 4d8260de85 links for makefs 2013-01-26 16:52:43 +00:00
christos 136bcc39cf Pr/47500: Henning Petersen: Don't install man pages for tools 2013-01-24 13:35:52 +00:00
joerg fa9d9d71df Update LLVM/Clang snapshot to r172366. Catch up with the move past 3.2
release.
2013-01-23 15:02:52 +00:00
christos af7d92d457 add new file 2013-01-17 22:25:36 +00:00
martin db54b43cab Note MKRUMP=no and the need to specify HAVE_GCC= explicitly when using
MKGCC=no. Also point at but number 47353.
2012-12-26 19:11:27 +00:00
apb e3b7b9c4cd If you are going to append things to CPPFLAGS and then transfer
the result to HOST_CPPFLAGS later, then also include the value of
HOST_CPPFLAGS in this process.  This should fix a problem in which the
value of HOST_CPPFLAGS set by compat/defs.mk was lost during a build
with MKDTRACE=yes.

XXX: It would probably be better to just use HOST_CPPFLAGS throughout.
2012-12-16 06:47:39 +00:00
christos af8c5897ad first define HOSTLIB and then include bsd.own.mk! 2012-12-10 00:34:56 +00:00
christos 5641345b31 forgetting to shift turns this into a cpu burner. 2012-12-09 23:53:39 +00:00
christos 810857e2ff ignore --sysroot=/ 2012-12-09 23:42:16 +00:00
christos 568b7e7cb5 restore the find loop to include files generated by configure 2012-12-09 23:18:30 +00:00
christos 6e077d2764 handle the list of files and directories generated dynamically by configure 2012-12-09 21:48:04 +00:00
christos df81d8d522 make this work 2012-12-09 19:15:48 +00:00
christos c3a3a89834 Include <bsd.own.mk> to give a chance to ${TOOLDIR} to be defined before
using it in rules. Before there was another .mk file included before ${TOOLDIR}
was used.
2012-12-09 18:08:08 +00:00
apb b45c93d77d Use a "find | while read" loop to install all *.h files anywhere
under ${.OBJDIR}/include, and remove the previous hack of touching a
"dummy" file in each subdirectory.  This should fix a problem on some
platforms where include files directly under ${.OBJDIR}/include (not in
a subdirectory) were not installed.
2012-12-09 15:22:54 +00:00
apb 15a61bc010 Change the default value of COMPATLIB_UNINSTALLED to no, now that
all users of comapt/defs.mk have been adjusted.  This is the last
commit related to fixing PR 47188.
2012-12-02 13:05:14 +00:00
apb e0d2aa9d82 Make most things under src/tools use the TOOLDIR version of compat/defs.mk,
instead of the version in the .OBJDIR of tools/compat.
2012-12-02 12:48:32 +00:00
apb a2542bc740 Now that tools/Makefile builds tools/binstall before installing
tools/host-mkdep, we can use the newly-built install program
to install host-mkdep.
2012-12-02 12:44:06 +00:00
apb f996a13f4f In tools/binstall/Makefile, explicitly use the uninstalled copy
of libnbcompat, not the version that's installed under TOOLDIR.
2012-12-02 12:39:55 +00:00
apb d4a6601b30 Add two variables to tools/compat/defs.mk.in:
COMPATLIB_UNINSTALLED:
		If "yes", then use the files from the .OBJDIR of
		NETBSDSRCDIR/tools/compat.  Otherwise, use the files
		from TOOLDIR.

COMPATLIB_NO_LIB:
		If "yes" then do not use the library (but still use
		the include files).

COMPATLIB_UNINSTALLED defaults to "yes" for now, but this will soon be
changed to "no.
2012-12-02 12:37:08 +00:00
apb fe5488e7a4 Make tools/compat/Makefile install the library in
${TOOLDIR}/lib/libnbcompat.a, install the include files in
${TOOLDIR}/include/compat/**, and install defs.mk in
${TOOLDIR}/share/compat/defs.mk.  Previously, nothing from
tools/compat was installed under TOOLDIR.

Adjust tools/compat/Makefile to use an uninstalled copy of
host-mkdep from the .OBJDIR of tools/host-mkdep, and an uninstalled
copy of the install program from the .OBJDIR of tools/binstall.
This allows it to be built after tools/host-mkdep is built but
before tools/host-mkdep is installed; and to be installed after
tools/binstall is built but before tools/binstall is installed.
2012-12-02 12:34:51 +00:00
apb e95f6bc055 Make tools/Makefile build host-mkdep, compat, and binstall in that order,
before installing any of them.  It installs them in any order relative
to each other.  The .WAIT points that used to be between these three
tools are replaced by .ORDER and dependencies.

This is needed in preparation for making tools/compat install
some files into TOOLDIR.
2012-12-02 12:25:25 +00:00
apb 0b3c0236de Use a CONFIGURE_ENV variable instead of in-line code for passing
environment variables to the confifure script for host-mkdep.
Also reword the comment about why TOOL_AWK can't be included.
2012-12-02 12:21:51 +00:00
apb 3a6b21ba52 Teach tools/compat/Makefile to use an uninstalled copy of host-mkdep
from the.OBJDIR of tools/host-mkdep.  This is in preparation for
building all three of tools/host-mkdep, tools/compat, and tools/binstall,
before installing any of them.

While here, also move the regen target to the end.
2012-12-02 12:19:34 +00:00
apb 3b5482ec3a Teach tools/binstall/Makefile to use an uninstalled copy of
host-mkdep from the.OBJDIR of tools/host-mkdep.  This is
in preparation for building all three of tools/host-mkdep,
tools/compat, and tools/binstall, before installing any of them.
2012-12-02 12:18:16 +00:00
apb 9ff9611745 TOOLDIR must be valid, unless MKTOOLS=no.
Add tests and .error directives to enforce this.
2012-12-02 12:10:43 +00:00
apb 326b13ee70 If tools are not wanted, then set SUBDIR= empty instead of
defining all the subdir-related targets to do nothing.  This way,
the targets are not invoked at all, instead of being invoked but
doing nothing.
2012-12-02 11:46:34 +00:00
apb 34072b3232 remove trailing white space 2012-12-02 11:19:45 +00:00
jkunz 32c0cb2823 According to the i.MX23 Reference Manual section 3.1, Page 3-3:
"The i.MX23 always operates in litle-endian mode."
So build elftosb and bootloader for this processor only for evbarm(-el).
2012-11-27 20:00:38 +00:00
pooka cdb7042197 Build gmake iff we're going to need it. 2012-11-26 16:57:25 +00:00
joerg 54f191bfce Move the build_install logic from lib/Makefile into share/mk and re-use
it for tools. The existing logic broke for the LLVM build with the
recent .ORDER changes in make.
2012-11-15 23:51:53 +00:00
jkunz 993229b6fe Add elftosb tools to evbarm userland and toolchain.
Elftosb is used to create a digitaly signed "secure boot" file.
This sb file can be booted by the first stage boot loader found in
Freescale i.MX23 and i.MX28 application processors.

Copyright (c) 2004-2010 Freescale Semiconductor, Inc.
2012-11-15 19:49:11 +00:00
bouyer 63a0d054cf At last on some linux distros, gmake is needed to build the cross-gdb. 2012-10-01 19:27:04 +00:00
skrll 18ea2c9f55 More tweaks 2012-09-27 11:29:49 +00:00
skrll 35ceab06ed No need to do "obj includes" twice. 2012-09-25 11:12:16 +00:00
skrll 40ecf146db More tweaks. I didn't manage to complete a mknative from scratch run, but
this is a step in the right direction.
2012-09-25 06:55:10 +00:00
joerg 2b3d1ee8a7 Update LLVM/Clang snapshot to r164464. This adopts the GCC options for
the SSP parameters and a not-yet-default rewrite of SROA.
2012-09-23 17:22:22 +00:00
pooka c978e80017 fix EXTERNAL_TOOLCHAIN build 2012-09-20 15:50:20 +00:00
skrll 9378dd0cd5 Update for gcc 4.5.4 2012-09-18 07:05:15 +00:00
skrll f26f274521 Attempt to describe the gcc 4.5 method (untested) 2012-09-16 15:09:55 +00:00
jmmv cdcce7d462 Add a new "-P prefix" option to mkdep(1).
This option prepends the string given in prefix to every target
filename.  This is useful for programs that have source files in
multiple subdirectories and a single Makefile that references all of
them explicitly (without using the VPATH functionality because there
can be files with the same name in each subdirectory).
2012-08-26 22:37:19 +00:00
skrll c3746f757b Grab CRTSTUFF_T_CFLAGS_S.
Gentlement start your mknative runs.
2012-08-11 16:05:01 +00:00
joerg 2ce6b7d32d Decouple binutils build from HAVE_GCC. Merge common fragments of
HAVE_GCC and HAVE_PCC.
2012-08-10 16:13:36 +00:00
christos 53b6bc587f add -I${TOOLDIR}/include/nbinclude to fix the build (find arm/elf_machdep.h).
Is nbinclude intended here? Why not put the machine files in ${TOOLDIR}/include?
2012-08-05 06:20:14 +00:00
hans f70d5ee4a9 Don't use -print0/-0 in find | xargs, it is non-standard and not needed at all. 2012-06-19 21:48:33 +00:00
joerg 062cd24989 Fix version string returned by clang --version.
Integrate the in-tree config file generation with the cross-building
toolchain.  Regenerate the files.
Keep version numbers all in one place.
2012-06-17 07:40:25 +00:00
joerg c9196b81ce Update LLVM/Clang snapshot to r158533. This brings in support for
stack-realignment in functions using alloca on x86. Move to
/usr/include/clang-3.2 to reflect the version.
2012-06-16 17:01:02 +00:00
tsutsui 0532bb776d Use ${DESTDIR}/usr/mdec for DEFAULT_BOOTDIR on tools fdisk(8)
rather than unknown build host's /usr/mdec directory.

XXX: no option to leave MBR bootcode empty on x86 targets
2012-06-05 13:41:23 +00:00
joerg 1fa9b84508 Add cdbr(3) support to tools/compat. 2012-06-04 19:06:45 +00:00
joerg 571103e860 Build getcap.c only once. 2012-06-04 18:53:02 +00:00
joerg 4b38c823d2 Make Alan Barrett happy and add (). 2012-06-04 10:18:01 +00:00
joerg f7ef3610be Add a special seeder for cdbw_output that gives stable results.
Hook up cdbw(3) for the tool build.
2012-06-03 21:02:50 +00:00
joerg 4f6bb5e029 Add __predict_true / __predict_false definitions. 2012-06-03 21:01:43 +00:00
joerg b203f35690 Don't depend on __P. 2012-06-02 22:54:52 +00:00
joerg 55a1bc2fcb Always use system zlib. Avoids the need for 32bit build environment when
bootstrapping on some Linux distros. We require zlib to be present anyway.
2012-05-31 21:02:02 +00:00
joerg 2fab7c857c Forcefully override the GNU make configure check. The build system in
NetBSD doesn't need it, so the configure check doesn't have to reject
a prestine NetBSD host.
2012-05-31 18:52:16 +00:00
tsutsui 56ed3d51fc Don't use "#if defined(__i386__) || defined(__x86_64__)" conditionals
in C source file to define option features.
Define proper options in each Makefile per ${MACHINE_ARCH} variable instead.

Previously if a host is x86 and it has /usr/mdec/mbr file in its system,
tools fdisk implicitly installs it as mbr bootcode even for !x86 targets.
2012-05-05 16:03:55 +00:00
tsutsui 07a6a7e726 Replace not only space but also '(' and ')' on generating BUILD_PLATFORM
strings to appease shell's echo.
Cygwin's uname -r returns "1.7.9(0.237/5/3)" etc.
2012-04-18 11:28:30 +00:00
mrg 9ac63422b6 force set ac_cv_mkdir_path to our install -d program.
fixes the remaining issues with 'sourcesets' and 'tools'.
2012-04-15 08:37:32 +00:00
mrg 9ec90b003a force ac_cv_path_mkdir to be set to nbinstall -d. this will avoid
gmp/configure from trying to use its install-sh for mkdir -p, and
should fix sourcesets created tarball builds.
2012-04-12 01:05:31 +00:00
joerg 103b308da9 Update LLVM/Clang snapshot to r153935. This brings in the new inline
cost analysis.
2012-04-04 10:42:00 +00:00
joerg ead2c0eee3 Update LLVM/Clang snapshot to r151411. This brings in Lambda support for
C++11 and a new literal format string check to catch variadic argument
functions.
2012-02-28 17:09:29 +00:00
njoly 584981b8a8 Adjust libyywrap.c location. 2012-02-18 17:51:21 +00:00
skrll b7196e474c Disable the sim on mips for next person running gdb7 mknative. 2012-02-09 15:15:58 +00:00
christos 66776cea39 remove dup target. 2012-01-21 22:31:15 +00:00
tsutsui fdc3c331af Always redefine DEV_BSIZE=512.
All references of DEV_BSIZE in tools are to manipulate target
(i.e. NetBSD's) file images (in installboot(8) and makefs(8) etc.) and
no host's DEV_BSIZE is required for the moment.  Closes PR toolchain/42574.
2012-01-21 20:05:27 +00:00
christos c300185bd0 Merge the two Makefiles that were mostly copies of each others.
The reason to do this was to add support for cleaning up the config.cache
files when the build environment (as determined by uname -srm) changes.
2012-01-20 23:01:05 +00:00
joerg e39ef1d61e Update LLVM/Clang snapshot to r148262 for some bugfixes. 2012-01-17 15:51:55 +00:00
skrll 3e6a962380 Fix bootstrap-libgcc for gcc 4.5 2012-01-10 12:27:54 +00:00
skrll 4684600473 Fix (harmless?) HAVE_GCC comparison version. 2012-01-10 12:26:45 +00:00
joerg 3a9ee24e6b Explicitly request TLS support for mknative. 2011-12-12 18:59:06 +00:00
skrll a273c995fc Pull across the fix for target/50691
ok'ed by mrg@
2011-12-02 09:44:48 +00:00
tsutsui 3093d001cd Pass M4=${TOOL_M4:Q} to CONFIGURE_ENV for tools/gmp.
Fixes configure error on cygwin.
2011-11-21 13:46:37 +00:00
christos 96f71ed699 mkdir the proper sim dirs! 2011-11-06 19:46:12 +00:00
joerg 89e5f5a8b7 Add getline.c here too. 2011-11-03 19:30:05 +00:00
joerg fe2cc85884 Update LLVM/Clang snapshot to r143571 for the improved optimizer. 2011-11-03 17:52:53 +00:00
joerg b0027af054 Add getline(3) compat glue. 2011-11-03 14:13:53 +00:00
joerg 6edf2caf7f Revert .WAIT removal and add comment why it is needed between *tblgen. 2011-11-03 07:42:56 +00:00
njoly 2b2cb14012 Do not build tic more than once 2011-11-02 23:47:07 +00:00
christos 9002895fe6 move tic later, after all the tools it needs are built. 2011-11-02 20:36:41 +00:00
yamt de081393a5 tweak dependencies for tic, which needs nbperf, awk, and sed. 2011-11-02 20:33:18 +00:00
christos 8bfa1d3c54 Handle auto-generating hash.c 2011-11-02 17:49:20 +00:00
joerg ecc1f89d09 Remove an unnecessary .WAIT between llvm-tblgen and clang-tblgen. 2011-11-01 23:11:55 +00:00
joerg ac992c4949 Hook up nbperf into the normal tool build. 2011-11-01 21:16:28 +00:00
mrg c23dc553e9 obsolete now useless (and wrongly set to "219" :-) HAVE_BINUTILS.
switch the sense of the gdb and gcc tests to list the platforms not
switched to gcc 4.5 or gdb 7, which is now:

GCC 4.1:
.if ${MACHINE_ARCH} == "alpha"	|| \
    ${MACHINE_CPU}  == "arm"	|| \
    ${MACHINE_CPU}  == "m68k"	|| \
    ${MACHINE_CPU}  == "vax"

GDB 6:
.if ${MACHINE_ARCH} == "alpha"	|| \
    ${MACHINE_ARCH} == "hppa"	|| \
    ${MACHINE_CPU}  == "mips"	|| \
    ${MACHINE_CPU}  == "sh3"	|| \
    ${MACHINE_ARCH} == "vax"

let's go, people!  (-:
2011-10-31 08:14:43 +00:00
matt e1da7aef13 Fix PPC _SOFT_FLOAT 2011-10-13 19:52:33 +00:00
joerg 9aa0541bdf Update LLVM/Clang snapshot to r141658. This primarily fixes a regression
preventing Qt4 from building.
2011-10-11 13:53:56 +00:00
christos 494dd6b7c3 add psim support 2011-10-09 02:03:30 +00:00
christos be84a9917e remove pre-gcc-4.5 mknative remnants that have long ceased to function. 2011-09-26 21:16:14 +00:00
christos 97417a67ca mknative for gdb7 2011-09-26 02:36:19 +00:00
christos 544cd45c15 adjust for new gas Makefile 2011-09-25 04:00:58 +00:00
mrg 68568a44b1 since omp.h is part of libgomp, put it in the libgomp files not the
libstdc++ files.
2011-09-23 06:43:46 +00:00
mrg dc04629559 add libgomp support. needed by "cc -fopenmp", that koffice 2.3 wants to use. 2011-09-21 02:15:18 +00:00
jdc 3d7c729d6b Add PDP_ENDIAN definition, required for makefs (v7fs). 2011-09-05 07:38:52 +00:00
joerg f4a68476b9 Ensure __printflike exists. 2011-08-27 18:33:22 +00:00
matt cc8037f3d1 Add an inline ex script to modify configargs.h for powerpc to auto-enable
-msoft-float.
2011-08-17 18:34:13 +00:00
apb 4390b548c2 regen 2011-08-14 20:25:01 +00:00
apb c2497c0d32 Detect the presence of <pthread.h>, and add a HAVE_PTHREAD_H
variable in defs.mk.
2011-08-14 20:22:42 +00:00
apb e4189833c9 Prevent expansion of <dollar>NetBSD<dollar> in a string that's
indended to be copied to nbtool_config.h.

Fix most lines longer than 80 columns.  I don't know how to fix the
long lines in the definition of NB_CHECK_INTTYPE.
2011-08-14 20:20:59 +00:00
mrg b9477da802 add --disable-werror. GCC 4.6 doesn't like some of the code here and
rather than patching code to fix it (and one case isn't trivially fixable)
simply turn off -Werror by default here.  should fix PR#45140.
2011-08-04 02:38:41 +00:00
joerg a968e272e0 Partially revert last, keep assertions enabled (but with the correct
spelling of the option).
2011-07-18 19:11:28 +00:00
adam b878485fea Pass HOST_CC otherwise fails e.g. on Mac OS X; fixed typo in --disable-assertions 2011-07-18 18:37:15 +00:00
joerg 3eb244d801 Retire varargs.h support. Move machine/stdarg.h logic into MI
sys/stdarg.h and expect compiler to provide proper builtins, defaulting
to the GCC interface. lint still has a special fallback.
Reduce abuse of _BSD_VA_LIST_ by defining __va_list by default and
derive va_list as required by standards.
2011-07-17 20:54:30 +00:00
joerg 9777e8c193 Update to Clang/LLVM r135360. Most importantly, this adjusts the
cc -print-search-dirs output to expand sysroot-prefixed library paths to
make live easier for libtool.
2011-07-17 20:07:56 +00:00
tsutsui a1f5c3dd33 Build nbm68k-elf2aout as a host tool on m68k targets
for an ancient PROM bootloader.
Mostly taken from nbmips-elf2ecoff.
2011-07-16 15:52:01 +00:00
joerg 220d715bdc Update to LLVM/Clang r135100 to get past the type system rewrite. 2011-07-13 23:48:29 +00:00
mrg fd2a48532a force HAVE_AS_SPARC_GOTDATA_OP to false, since those relocs seem
busted with our binutils.  now sparc64 seems to work fine.
2011-07-10 15:28:26 +00:00
mrg 29bf026bea install elf2ecoff for all mips64 systems. it's needed for stand. 2011-07-10 08:43:50 +00:00
joerg 1cb60d627b Update LLVM/Clang snapshot to r134635. This reduces the memory usage in
preprocessor heavy code and recognizes mipseb as alias for mips.
2011-07-07 21:59:14 +00:00
matt 464af93e1a Fix cleandir-llvm (only remove config if it exists) 2011-07-07 05:41:59 +00:00
joerg 288bb96063 Hook up LLVM's MIPS target. 2011-07-05 19:37:10 +00:00
joerg 04d0160d70 Also enable toolchain build of ARM 2011-07-05 17:30:35 +00:00
joerg 1b9578b8c2 Hook up LLVM's ARM target. 2011-07-05 17:22:20 +00:00
joerg c8a6f85bd1 Use a different switch to explicitly disable developer-only libraries
for the toolchain build.
2011-07-05 17:15:51 +00:00
joerg b49cc14919 Hook up LLVM's SPARC target. 2011-07-05 14:15:56 +00:00
joerg 8597eac543 Hook up LLVM's PowerPC. 2011-07-04 22:37:58 +00:00
joerg b0f1ff448a Update LLVM/Clang to r134374. This brings the xstorerng alias for Via
PadLock, a bugfix for the C++ ABI in one edge condition and various
compiler improvements.
2011-07-04 16:10:38 +00:00
mrg b2ad2936ae fix the previous 2011-07-03 12:26:02 +00:00
mrg 1f61213386 -I$DESTDIR/usr/include is escaping into the generated files from
the native-gcc run.  add some sed commands to remove them.
2011-07-03 12:11:32 +00:00
mrg d2d81d57a9 copy sysroot-suffix.h as well, for sh3. 2011-07-03 06:47:12 +00:00
mrg b9c57fbd15 also pull out LIB2ADD_ST for libgcc. 2011-07-02 13:25:05 +00:00
mrg 0debd27c81 avoid creating an unused directory. 2011-07-01 02:11:14 +00:00
mrg a8847d182c - call each ${MKNATIVE_CONFIG_TARGET_LIBS} target separately
- comment out maybe-all-target-libgcc
- cope with the special transformation needed for gtyp-input.list
2011-07-01 01:27:17 +00:00