Commit Graph

1305 Commits

Author SHA1 Message Date
christos 3e65cf6f80 Be more selective about what to quote-quote: only paths and version numbers. 2017-11-29 03:32:28 +00:00
christos 6933911900 backslash me harder! 2017-11-29 03:06:46 +00:00
christos cb9e65d7bb since gmake does not have :Q handle it in sed... 2017-11-29 02:10:15 +00:00
christos c4e49a61b5 Adjust to gdb-8.0.1 which uses c++
XXX: quoting of variables that contain paths and versions is broken.
2017-11-28 22:25:16 +00:00
christos 7a367c106f use make -C path/to -f Makefile instead of make -f path/to/Makefile
so that includes with relative paths work.
2017-11-28 22:05:57 +00:00
mrg 3141ce7b36 update netbsd version. 2017-11-13 08:47:24 +00:00
christos 8018b9b342 use the variable for the source dir instead of duplicating it. 2017-10-04 21:42:20 +00:00
christos d8288c95fa - gcc.old == gcc-5.3, so copy mknative-gcc{,.old} and adjust
- disable dual libstdc++ abi per joerg
  (https://gcc.gnu.org/onlinedocs/libstdc++/manual/using_dual_abi.html)
  will require a major libstdc++ major bump.
2017-10-04 21:29:43 +00:00
joerg bf5991674e Be consistent with our header. 2017-10-03 10:28:30 +00:00
christos 2dfeb58bd4 fix fpurge declaration 2017-10-03 01:43:03 +00:00
christos d9a3cc43b7 Simplify. 2017-10-02 22:32:04 +00:00
christos cd84452b4c regen 2017-10-02 22:21:31 +00:00
christos 692f2d0a6f handle __fpurge being declared in <stdio_ext.h> 2017-10-02 22:19:45 +00:00
joerg f6f53c2528 Honor HOST_CC. 2017-09-07 18:57:47 +00:00
mrg 26c43e3543 move the GMP_MACHINE_ARCH definition into external/lgpl3/gmp/Makefile.arch.
soon to be GMP 6 allows us to have only two arm copies.
2017-08-22 09:17:50 +00:00
joerg 7c192b2a5e Update LLVM build glue for 5.0RC1. 2017-08-01 20:07:37 +00:00
jmcneill 055f044508 --disable-nls does not work in gdb subdir, so add am_cv_func_iconv=no to
configure env. Fixes build on FreeBSD.
2017-07-01 12:23:09 +00:00
skrll 48a2d8bd72 Update for new libfdt location 2017-06-08 17:16:44 +00:00
skrll be32318492 New libfdt location 2017-06-08 17:09:29 +00:00
skrll ee83b6cae4 Hook in dtc/libfdt now that it builds for me 2017-06-07 10:38:33 +00:00
skrll e846b19637 Disable dtc/libfdt for now 2017-06-06 08:21:53 +00:00
skrll 03dcb730d4 Add libfdt 2017-06-06 07:45:39 +00:00
christos 85cf7cedea No need to set dtc twice. 2017-06-05 23:55:43 +00:00
christos 484e2f7c2e Add dtc 2017-06-05 23:24:29 +00:00
christos 74d52999c0 tools build glue. 2017-06-05 22:44:40 +00:00
riastradh ef315f7931 Remove MKCRYPTO option.
Originally, MKCRYPTO was introduced because the United States
classified cryptography as a munition and restricted its export.  The
export controls were substantially relaxed fifteen years ago, and are
essentially irrelevant for software with published source code.

In the intervening time, nobody bothered to remove the option after
its motivation -- the US export restriction -- was eliminated.  I'm
not aware of any other operating system that has a similar option; I
expect it is mainly out of apathy for churn that we still have it.
Today, cryptography is an essential part of modern computing -- you
can't use the internet responsibly without cryptography.

The position of the TNF board of directors is that TNF makes no
representation that MKCRYPTO=no satisfies any country's cryptography
regulations.

My personal position is that the availability of cryptography is a
basic human right; that any local laws restricting it to a privileged
few are fundamentally immoral; and that it is wrong for developers to
spend effort crippling cryptography to work around such laws.

As proposed on tech-crypto, tech-security, and tech-userlevel to no
objections:

https://mail-index.netbsd.org/tech-crypto/2017/05/06/msg000719.html
https://mail-index.netbsd.org/tech-security/2017/05/06/msg000928.html
https://mail-index.netbsd.org/tech-userlevel/2017/05/06/msg010547.html

P.S.  Reviewing all the uses of MKCRYPTO in src revealed a lot of
*bad* crypto that was conditional on it, e.g. DES in telnet...  That
should probably be removed too, but on the grounds that it is bad,
not on the grounds that it is (nominally) crypto.
2017-05-21 15:28:36 +00:00
chs 7e30e94394 provide a common softfloat fenv implemenation and use it for softfloat builds.
restore ABI compatibility with previous releases for ieeefp.h on sh3.
add namespace.h protection for all the fenv interfaces.
use MKSOFTFLOAT on sh3 instead of assuming softfloat.
standardize on comparing MKSOFTFLOAT with "no".
remove the arm-specific softfloat fenv code (which also had several bugs).
fix logic errors in the arm hardfloat feraiseexcept() and feupdateenv().
2017-03-22 23:11:07 +00:00
christos 3e2605f3b9 refresh 2017-02-24 03:44:54 +00:00
maya c3094abd94 GC more gcc 4.8 specific (dead) logic 2017-02-22 12:34:49 +00:00
jakllsch 55e4d28c1e Fix host tools build for asn1_compile, compile_et, and slc. 2017-01-30 02:38:50 +00:00
christos 05e8aa4695 don't try to build links when cleaning or making obj dirs 2017-01-29 22:16:51 +00:00
christos 4f6547fec0 make a symlink to krb5 for the tools build. 2017-01-29 19:23:52 +00:00
joerg 501cd18a74 Sync tools build glue with LLVM pre-4.0.0. 2017-01-11 12:08:34 +00:00
christos b8eef4082a regen 2017-01-07 21:31:07 +00:00
christos 4c2e361d5c strmode on MacOS/X is in string.h 2017-01-07 21:30:42 +00:00
christos 6b3772867a adjust for SSP (MacOS/X) 2017-01-07 21:29:30 +00:00
christos cf6cbc80c5 need ctype.h 2017-01-07 02:55:19 +00:00
christos 621e8732cd Check for declarations, not the existance of functions since some are
visible only when _NETBSD_SOURCE is defined. This avoids || defined(__NetBSD__)
hacks.
2017-01-07 02:52:04 +00:00
christos 81c11d5f0f handle the case where we don't have the files built yet 2017-01-06 20:27:19 +00:00
christos 792fa3b107 don't run grep if we don't have the Makefile, like when we are building
objdirs
2017-01-06 17:22:51 +00:00
christos 0a3c283ede regen 2016-10-19 21:55:26 +00:00
christos 883488e64e try to fix missing decls 2016-10-19 21:54:20 +00:00
mrg 4141e03cf9 pass GDB_MACHINE_ARCH to mknative-gdb and use that as the subdir.
obtain GDB_MACHINE_ARCH from the new gdb Makefile.gdb_arch.
2016-10-16 04:37:42 +00:00
christos 17fc55e9e9 Fix the host build of aarch64 with clang 2016-10-14 14:41:59 +00:00
christos 60788873f5 Define __STDC_{LIMIT,CONSTANT,FORMAT}_MACROS in CXXFLAGS.
The problem is that the gnulib interception of <stdint.h> and <inttypes.h>
does not really work because we implement those internally with
<sys/inttypes.h> and <sys/stdint.h> and those internal headers are used
by other internal headers *before* they get a chance to be intercepted
(where the __STDC_ macros are defined).

Another way to fix this is to move the inclusion of the other headers
in <stdint.h> and <inttypes.h> outside multiple inclusion protection.
2016-10-12 18:43:40 +00:00
mrg 203d3087cb pass -L in LDFLAGS. clang complains about it to stderr, and configure
checks for headers fail if there are unexpected stderr.
2016-10-11 03:57:00 +00:00
christos 9d29ca0833 revert our changes; softfloat removal is now done in libgcc/config.host 2016-10-05 19:25:49 +00:00
christos ca4d0436a9 We provide our own soft-float implementation in libc, so elide the libgcc
sources for it.
2016-10-05 14:16:12 +00:00
christos c232bb11c5 Add exec_ecoff.h 2016-09-14 00:41:04 +00:00
christos e0f345fa97 use the nbcompat copies for those files 2016-09-03 11:34:05 +00:00
mrg 7e5bd89da2 set gcc 5.4 netbsd version to 2016-06-06 2016-06-07 08:12:13 +00:00
mrg 814d336214 set _OUTDIR and _OUTDIRBASE properly for gcc.old, and fix a sed. 2016-04-21 07:22:15 +00:00
riastradh e1fdad5e8b Disable stripping pcc tool.
We don't have a tool that strips tools -- we have only a tool that
strips target programs.  $TOOLDIR/bin/$PLATFORM-install supports -s
by invoking the target-stripping tool, which chokes if you try to use
it to strip tools on a sufficiently different cross build.  So let's
just not strip the pcc tool -- it's tiny enough that I'm not worried
about its unstripped size!
2016-03-30 23:36:45 +00:00
mrg c6df9b1e81 use --with-diagnostics-color=auto-if-env as the default for GCC 5. 2016-03-26 09:02:56 +00:00
mrg 1e7ce98d0d set NETBSD_GCC_VERSION for GCC 5.3 separately.
don't collect crtstuff anymore.
2016-03-17 23:41:21 +00:00
christos 816f40abde Add DPADD's 2016-03-17 18:43:29 +00:00
mrg 6550c74580 grab insn-modes.h, and do the libgcc bootstrap from gcc as well. 2016-03-16 11:16:05 +00:00
mrg a37431532b unwind.h has a new problem, and fix the grabbing of x86 specific files. 2016-03-16 05:47:43 +00:00
mrg df62ea31af - pull i386-builtin-types.inc automatically on x86
- reenable cxx rt support
- don't grab insn-modes.h, we build it
- rename the c98 and c11 subdir codecvt.cc files while extracting
  them with mknative
- grab GGC_H as well, and use it in dependency lists
2016-03-15 21:38:32 +00:00
mrg e008877335 update for GCC 5.3 libgcov and libstdc++ 2016-03-15 06:10:13 +00:00
mrg 334c303b3a very first baby steps towards GCC 5.3 mknative. 2016-03-15 03:22:06 +00:00
mrg 8872ffd0f4 remove some more GCC 4.5 code. make GCC 5.3 be HAVE_GCC=53, so that,
for example, HAVE_GCC >= 48 works properly.
2016-03-13 01:06:51 +00:00
aymeric a3838ae30d add our libc's regex implementation to libnbcompat.
This way, nbsed picks it up and it unbreaks the build of xf86-video-intel-old's
man page under Linux and probably other future changes which rightfully expect
the (net)bsd behaviour.

Full release tested on ArchLinux and NetBSD 7.0_STABLE
2016-03-06 10:19:01 +00:00
martin 7493d9dc28 Remove regexp.h here temporarily 2016-03-01 10:11:07 +00:00
martin 7263822890 Revert to rev 1.77 for now on Aymeric's request 2016-03-01 10:09:00 +00:00
aymeric 978d3464f5 remove regsub.c from the list of files to build because it unbreaks the build
and this API is not yet endorsed. OK christos@
2016-03-01 06:48:55 +00:00
aymeric 90b3c9835b add our libc's regex implementation to libnbcompat.
This way, nbsed picks it up and it unbreaks the build of xf86-video-intel-old's
man page under Linux and probably other future changes which rightfully expect
the (net)bsd behaviour.
2016-02-29 22:19:29 +00:00
skrll a8be279001 Sort using mkheaderlist.sh:1.3 2016-02-23 11:43:57 +00:00
skrll 09049b2f7c Sort the output 2016-02-23 11:43:04 +00:00
martin c9d7952e8d Add missing closing ) and line continuation for mknative 2016-02-15 13:25:12 +00:00
christos 363ff477c7 silent when we don't have -ldl 2016-02-01 14:18:16 +00:00
christos ff7061cdde kill error message 2016-02-01 14:17:21 +00:00
christos ef6d39d2aa Figure out if we need libdl. 2016-02-01 13:48:01 +00:00
christos 9c8e579af7 Add -ldl if it is needed 2016-02-01 13:44:52 +00:00
christos 8523d51853 clean Makefile.local 2016-01-27 21:24:59 +00:00
christos 3c3d44a7db use HOST_CFLAGS for -pthread 2016-01-27 21:18:28 +00:00
christos e93985e2d5 use -pthread for more portability 2016-01-27 18:43:44 +00:00
christos 7f2bcc7a02 use EXTERNAL_GDB_SUBDIR 2016-01-26 17:48:31 +00:00
christos 22253bc332 use EXTERNAL_BINUTILS_SUBDIR 2016-01-26 17:47:35 +00:00
christos a5b18563d7 move cvslatest last 2016-01-24 22:49:08 +00:00
christos b342d8bcb3 Tool version 2016-01-24 20:14:17 +00:00
mrg e369ed1ed0 prepare for GCC 5:
- remove GCC 4.5 stuff, add most very basic GCC 5 stuff.
- use mknative-gcc.old for GCC 4.8
- copy mknative-gcc to mknative-gcc.old (should have done this when we
  switched to using gcc.old.)

this should not affect current builds.
2016-01-24 05:10:26 +00:00
mrg bb92a8ab71 add a comment saying this is for GCC 4.8 2016-01-24 05:02:23 +00:00
christos 73f09d245f Regen with autoconf 2.69. 2016-01-20 19:35:32 +00:00
christos ee45ee4be7 look in gpl3 for stuff too (autoconf) 2016-01-16 18:38:53 +00:00
christos c57a971ad4 grr another copy of the path I missed; factor out to a variable. 2016-01-14 01:13:26 +00:00
christos 8c986671c8 look in external first. 2016-01-13 23:01:15 +00:00
christos d1c4f2bedd groff has moved 2016-01-13 19:29:26 +00:00
christos 12a818e828 lex source moved. 2016-01-09 17:40:37 +00:00
christos 07a1a60ca9 Save a couple of dollars now that make is fixed. 2016-01-09 01:13:42 +00:00
christos eab6a8b567 libelf has moved. 2015-12-27 21:37:50 +00:00
christos 927b4a5792 move sortinfo after pax 2015-12-19 01:10:31 +00:00
christos 14e50442f2 Add sortinfo 2015-12-18 18:56:33 +00:00
christos d8b72b3b93 kill -x, files that don't exist anymore 2015-12-17 22:31:49 +00:00
christos d14bf0b7ec bump for printf/syslog format changres 2015-10-16 00:41:07 +00:00
christos 15404ac95d use c comments 2015-10-09 14:42:40 +00:00
christos 2ecf333ea1 don't lie in the comment; this is not the re-entrant version 2015-10-08 20:33:58 +00:00
christos 51c8e06c4d Switch to a version that does not suffer from reporting the wrong length
if the file contains NULs. From OpenBSD.
2015-10-08 20:20:45 +00:00
pooka bc0dc0b26e Add more compat defs for code compiled for !NetBSD targets.
At least GNU Hurd lacks MAXHOSTNAMELEN/MAXPATHLEN/PATH_MAX, so make sure
those have some arbitrary semi-sane values.

from Robert Millan in PR misc/50166, with some modifications from myself
2015-09-21 21:50:16 +00:00
christos 6fbf8f6644 undo previous; include is in ${.OBJDIR} 2015-09-17 14:25:43 +00:00
skrll a9a1ce9deb gdb.old is no more. 2015-09-17 09:34:20 +00:00
christos 2b8a0471fe make this more robust by using .CURDIR to cd. 2015-09-17 02:22:47 +00:00
christos c51dc1d472 add double quotes for consistency 2015-08-16 09:17:49 +00:00
christos d0e1037b7b handle gdb-7.9.1 2015-08-16 09:14:53 +00:00
mrg 5414ce041b for now, use gdb.old. 2015-08-15 21:12:28 +00:00
kamil c4c10ad1a1 Add reallocarr(3) to tools/compat
This should unbreak libutil(3) creation on systems withot reallocarr(3).
2015-07-26 14:01:53 +00:00
mrg cf4dd8937a remove the xfree86 reachover makefiles and the vast majority of
the support in the rest of the source tree.

X11 sets could use some cleaning up perhaps (just deletion, as
we've never really marked the old X11R6 as obsolete for native
xorg using platforms so far either.)
2015-07-23 08:03:24 +00:00
matt 589b128fbc Support building the xorg X11 libraries under MKCOMPAT.
Add XORG_MACHINE_ARCH to compat's bsd.*.mk
Turn xorg makekeys and makestrs into real host tools which are installed into
${TOOLSDIR}
2015-06-24 22:20:24 +00:00
christos 5c5210c091 Like the non-host mkdep don't print ./foo.h as a dependency, but simplify
it to foo.h. This was causing problems with:

.y.h: ${.TARGET:.h=.c}

where .h was ./cgram.h and the source became ./cgram.c confusing for example
/usr/src/tools/lint1 because make had both cgram.c and ./cgram.c in the list
of sources, trying to build both of them in parallel thinking that they were
different files. Since the regular mkdep does not produce such dependencies,
the regular build does not suffer from this issue.
2015-05-12 00:04:34 +00:00
joerg f022b767bf misc/48722: Use explicit HOST_SH in case the user insists on removing
permissions from the filesystem.
2015-03-05 10:22:25 +00:00
mrg ffaa4bd44e kill the -fPIC that m68000 ends up with, fixing it in the specs
is not trivial..
2015-01-31 08:50:01 +00:00
mrg 5c6c8063ac canonicalise the src dir to /usr/src, so it doesn't matter
where we run mknative.
2015-01-30 12:23:47 +00:00
joerg d8eb4f1993 Update build system glue for LLVM 3.6RC1. Notable changes:
- Old JIT is removed.
- Improvements to debug information handling.
- ARM: check for deprecated instructions and warn in the integrated
  assembler
- PPC: VSX support, va_arg support for struct/union types, -fPIC vs
  -fpic supported, faster atomics
- x86: improved vectorizer
2015-01-29 20:41:33 +00:00
uwe 803bb83c30 Add endian_machdep.h files for sh3 machines to _ARCH_INCS as
sh3/include/elf_machdep.h needs it since r1.11.

Unbreaks tools build on non-netbsd hosts (and whatever problems on
netbsd hosts of different endianness that might have been caused by
the mismatch).
2015-01-24 16:21:33 +00:00
christos 8283eb918f add strtoi strtou (Kamil Rytarowski) 2015-01-18 18:09:10 +00:00
christos ee9a7d9469 we have lto... 2015-01-16 20:10:26 +00:00
christos 17972cafc9 regen 2015-01-16 18:44:31 +00:00
christos b89ab6e264 strto{i,u} 2015-01-16 18:44:06 +00:00
skrll b4b886e5d8 Fix gcc PR target/64479 [SH] wrong optimization delayed-branch 2015-01-15 08:42:14 +00:00
joerg 72e6048ca0 Reorganise the way xorg is build. Move build of makestrs into src/tools
as it is needed for the "includes" phase. Make it symlink all necessary
headers in obj to decouple it from "includes" itself, breaking the
dependency cycle. Move the do-x11 target between do-lib and do-build, so
that libraries can get the benefit of build_install (correct .WAIT
behavior) and everything else like "includes" uses the plain SUBDIR
entry in external/mit.
2015-01-07 20:42:01 +00:00
joerg 025900ca94 cleandir-llvm should not exist in the filesystem 2015-01-05 18:41:59 +00:00
apb 5ffb287e29 Update documentation about tools being restricted to C89 (or not).
It's not practical for the C89 restriction to be maintained for
compilers, but it is still desirable for most tools.  The "long long"
data type is in wide use despite not being in C89.  C99 library features
(as opposed to language features) can often be added to the compat
framework when the need becomes apparent.
2015-01-03 13:20:11 +00:00
christos 1741549da9 add __UNVOLATILE 2014-12-24 16:18:46 +00:00
christos acfd168486 remove unused constants (Kamil Rytarowski) 2014-12-22 18:08:39 +00:00
pooka 6c078a85f6 build genassym for TOOLS_BUILDRUMP 2014-12-05 01:50:47 +00:00
mrg e4e7131a68 use --disable-shared on m68000 for mknative. 2014-11-22 19:41:27 +00:00
joerg 706f66c9f4 If the internals are not explicitly requested, use #include_next to pick
up the system version. <locale> from libc++ requires this and is used by
src/tools/elftosb2.
2014-11-12 15:08:52 +00:00
skrll d5fd623ace Note new date for version - this is the import date. 2014-10-20 08:37:30 +00:00
mrg c1ff61510d add --enable-libstdcxx-time=rt for the GCC 4.8 build. 2014-10-10 20:23:22 +00:00
christos 0fe1d114cc add gpt 2014-09-30 19:38:25 +00:00
christos 92e39ddd46 now gpt works under macosx. 2014-09-30 18:00:28 +00:00
apb 8c50b72e75 Say that tools should use C89, not C99; Say that tools may use
HAVE_NBTOOL_CONFIG_H to conditionally exclude features.  Many
other small changes.
2014-09-30 07:34:50 +00:00
christos 0097d76426 add opendisk 2014-09-29 21:05:11 +00:00
christos fe3105d7f6 Not ready for prime time, needs at least proplib. 2014-09-29 20:29:44 +00:00
apb 3512e573be It is usually easy to add new definitions to src/tools/compat, and that
is usually better than adding compatibility definitions to individual
tools.
2014-09-24 16:17:39 +00:00
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