Commit Graph

1194 Commits

Author SHA1 Message Date
martin 9a4831519f Apply patch, requested by maya in ticket #1070:
force build of gcc and friends with -std=gnu++03 when the host compiler
is clang. New clang versions default to newer c++ standards and the
old gcc in this branch has not been updated to those.
2018-10-26 15:12:53 +00:00
martin 92e7976a58 Pull up following revision(s) (requested by mrg in ticket #1008):
tools/gcc/mknative-gcc: revision 1.94

also pullout INTERNAL_CFLAGS for the libgcc build, where it may have
-DHAVE_CC_TLS defined on the command line.  (we already collect all
the other components.)
2018-09-05 09:21:37 +00:00
martin 4845be07bd Pull up following revision(s) (requested by mrg in ticket #1008):
tools/gcc/gcc-version.mk: revision 1.11
	tools/gcc/mknative-gcc: revision 1.93
	external/gpl3/gcc/dist/config/tls.m4: revision 1.2
	external/gpl3/gcc/dist/libgcc/configure: revision 1.5

Correct extra parens, regen configure (selectively)
Fixes root cause of PR toolchain/53567

in configargs.h, as well as normalising to /usr/src, normalise the
--build to the same as the --host, so that it never changes based
upon the host you ran mknative on.  (some recent changes are only
because i updated a system from netbsd-7 to netbsd-8.  this will
avoid that in the future.)

remove GCC 5 marker.  this is now nb3 20180905.
2018-09-05 08:59:04 +00:00
martin 29d99cdb20 Pull up following revision(s) (requested by christos in ticket #796):
tools/mdsetimage/Makefile: revision 1.15
	tools/compat/Makefile: revision 1.82
	tools/gdb/Makefile: revision 1.35
	tools/lorder/Makefile: revision 1.13
	tools/gcc/Makefile: revision 1.85
	tools/dtc/Makefile: revision 1.3
	tools/cvslatest/Makefile: revision 1.2
	tools/ctfmerge/Makefile: revision 1.8
	tools/libelf/Makefile: revision 1.9
	tools/libdwarf/Makefile: revision 1.8
	tools/ctfconvert/Makefile: revision 1.7
	tools/makekeys/Makefile: revision 1.2
	tools/gettext/Makefile: revision 1.7
	tools/binstall/Makefile: revision 1.12
	tools/libfdt/Makefile: revision 1.3
	tools/libctf/Makefile: revision 1.7
	tools/binutils/Makefile: revision 1.27
	tools/mandoc/Makefile: revision 1.11
	tools/Makefile.host: revision 1.32
	tools/dbsym/Makefile: revision 1.13
	tools/genassym/Makefile: revision 1.7
	tools/Makefile.inc: revision 1.14

PR/53238: Robert Elz: Disable MKREPRO in tools; the host compiler might
not support the necessary options. This is done thusly:

1. Set MKREPRO=no in Makefile.host. This handles all the Makefiles that
   use it and don't include bsd.own.mk.
2. Create Makefile.inc and set MKREPRO=no in it. Change the Makefiles that
   include bsd.own.mk, to include bsd.init.mk which includes Makefile.inc
   first. This will also allow us to control other tools options from a
   single location if we need to.

XXX: pullup-8
2018-05-05 19:25:55 +00:00
martin 065c98c565 Pull up following revision(s) (requested by maya in ticket #775):
tools/Makefile.gnuhost: revision 1.46-1.48
	external/gpl3/gcc/dist/gcc/genattrtab.c: revision 1.2

do the bracket nesting only for clang for now.

Use the __clang__ preprocessor symbol to check for clang, since --version
might barf. From joerg@

Apply upstream commit:
From: ppalka <ppalka@138bc75d-0d04-0410-961f-82ee72b054a4>
Date: Wed, 27 Apr 2016 21:18:05 +0000
Subject: [PATCH] Reduce nesting of parentheses in conditionals generated by
 genattrtab

gcc/ChangeLog:
        * genattrtab.c (write_test_expr): New parameter EMIT_PARENS
        which defaults to true.  Emit an outer pair of parentheses only if
        EMIT_PARENS.  When continuing a chain of && or || (or & or |),
        don't emit parentheses for the right-hand operand.
git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@235536

gcc/arm generates so many parens it hits a bracket depth limited which is
enforced by clang. This reduces the number of parens generated and avoids the
need to increase bracket depth.

Fixes PR toolchain/53178 properly.

Remove hack previously needed to build gcc/arm with clang.
genattrtab.c:1.2 makes this unnecessary.

Tested by thorpej.
2018-04-18 14:01:16 +00:00
martin 9fe407a8d0 Pull up following revision(s) (requested by maya in ticket #754):
tools/Makefile.gnuhost: revision 1.45

GCC build exceeds the macOS clang default bracket nesting level of 256.

Work around with -fbracket-depth=512.

From potr in PR toolchain/53178.
2018-04-14 10:44:56 +00:00
martin 12be5c4b38 Pull up following revision(s) (requested by mrg in ticket #682):
tools/gcc/gcc-version.mk: revision 1.10 (via patch)
	external/gpl3/gcc.old/dist/gcc/config/i386/i386.c: revision 1.10
	external/gpl3/gcc.old/dist/gcc/config/i386/i386-protos.h: revision 1.6
	external/gpl3/gcc.old/dist/gcc/config/i386/constraints.md: revision 1.6
	external/gpl3/gcc.old/dist/gcc/doc/invoke.texi: revision 1.7
	external/gpl3/gcc.old/dist/gcc/config/i386/i386.md: revision 1.7
	external/gpl3/gcc.old/dist/gcc/doc/extend.texi: revision 1.7
	external/gpl3/gcc.old/dist/gcc/config/i386/i386-opts.h: revision 1.4
	external/gpl3/gcc.old/dist/gcc/config/i386/predicates.md: revision 1.6
	external/gpl3/gcc.old/dist/gcc/config/i386/i386.h: revision 1.7
	external/gpl3/gcc.old/dist/gcc/config/i386/i386.opt: revision 1.7
	(with external/gpl3/gcc.old/ -> external/gpl3/gcc/)

add the spectre mitigation options for x86:

  -mindirect-branch=<choice>
  -mfunction-return=<choice>
  -mindirect-branch-register

the values for 'choice' are "keep" (default, existing behaviour),
"thunk", "thunk-inline", and "thunk-extern".

as taken from the Ubuntu port of these changes in their
ubuntu:gcc-5_5.5.0-8ubuntu1.diff.  i've also included the doc
updates that are missing from ubuntu from gcc itself.
i've tested both i386 and amd64 fairly heavily with these options
enabled in both kernels and userland, atf runs and hundreds of
package builds.

bump the NetBSD GCC version.  both GCC 5 and 6 got x86 spectre
mitigation code, and both are now "nb2 20180327".
2018-04-01 09:00:42 +00:00
martin 0726057def Pull up following revision(s) (requested by hans in ticket #623):
external/bsd/mdocml/dist/configure: revision 1.10
	tools/mandoc/Makefile: revision 1.10
Honor HOST_CC.
2018-03-13 13:29:57 +00:00
snj fda60e1318 Pull up following revision(s) (requested by uwe in ticket #555):
build.sh: 1.322-1.323
	tools/make/buildmake.sh.in: 1.9-1.12
Make sure nbmake is always built with the right _PATH_DEFSYSPATH.
--
Restore formatting/indentation of the configure call in rebuildmake()
to what it used to be.
--
G/c unused runcmd.
--
Do not use HOST_CFLAGS to link the make binary.
--
Do not use HOST_CFLAGS and others.  build.sh calls configure with
CFLAGS set to HOST_CFLAGS, etc - so HOST_* environment variables are
already taken into account if set.
OTOH, if configure were to add anything to CFLAGS etc, the old code
would happily ignore those changes, picking up original environment
variables instead.
2018-02-19 18:26:44 +00:00
snj 164ea90fca Pull up following revision(s) (requested by sevan in ticket #435):
tools/compat/configure: revision 1.88 via patch
	tools/compat/configure.ac: revision 1.89 via patch
	tools/compat/nbtool_config.h.in: revision 1.42
Add asnprintf() to the AC_CHECK_DECLS list.
Resolves conflict when cross compiling on Cygwin the provided implementation
does not get picked up.
Closes PR toolchain/52797
--
regen
2018-02-03 22:02:02 +00:00
snj 0ccdffc3ce revert ticket 435 2017-12-21 23:06:58 +00:00
snj 66cb8dbf17 Pull up following revision(s) (requested by sevan in ticket #435):
tools/compat/compat_defs.h: 1.108
	tools/compat/configure: 1.87-1.88
	tools/compat/configure.ac: 1.88-1.89
	tools/compat/fpurge.c: 1.2
	tools/compat/nbtool_config.h.in: 1.41-1.42
handle __fpurge being declared in <stdio_ext.h>
--
regen
--
Add asnprintf() to the AC_CHECK_DECLS list.
Resolves conflict when cross compiling on Cygwin the provided implementation
does not get picked up.
Closes PR toolchain/52797
--
regen
2017-12-21 19:11:21 +00:00
snj fd2ef77c34 Apply patch (requested by christos in ticket #312):
disable dual libstdc++ abi
2017-10-09 17:59:16 +00:00
snj 02fbcddc9c Pull up following revision(s) (requested by jmcneill in ticket #114):
distrib/sets/lists/comp/mi: revision 1.2139
	distrib/sets/lists/debug/mi: revision 1.217
	distrib/sets/mkvars.mk: revision 1.32
	external/gpl2/Makefile: revision 1.14
	share/mk/bsd.own.mk: revision 1.1010
	tools/Makefile: revisions 1.188, 1.189
	tools/dtc/Makefile: revisions 1.1, 1.2
	tools/libfdt/Makefile: revisions 1.1, 1.2
Add libfdt
--
New libfdt location
--
tools build glue.
--
Add dtc
--
add MKDTC
--
Add dtc
--
add DTC
--
add DTC
--
No need to set dtc twice.
--
Update for new libfdt location
2017-07-18 17:32:50 +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