Commit Graph

2476 Commits

Author SHA1 Message Date
jmcneill 0d362dae7a oops, re-enable host_detect_local_cpu for NetBSD 2021-09-18 19:59:11 +00:00
jmcneill 1af43c0ad6 Fix build on macOS 11.6 arm64 hosts. 2021-09-18 10:45:11 +00:00
christos a043955316 Patch the build script and toolchain to allow passing through
HOST_CPPFLAGS, HOST_CXXFLAGS, but not LIBRARY_PATH because it breaks
the build. These variables are necessary to support building NetBSD
from a GNU Guix or NixOS host, where /usr/include, /lib, and all
but /bin/sh do not exist.  In many cases, support for HOST_CPPFLAGS
was incomplete. From Ryan Sundberg
2021-09-18 01:47:07 +00:00
christos 1d13b09f36 Add missing parentheses around ternary operator (Etienne Brateau, via
Damien Zammit)
2021-08-29 08:41:57 +00:00
mrg ab57e84c1b fix arm64 builds: turn off MKCOMPAT for GCC
no idea why it was enabled as we can't easily target 32 bit.

if we figure this out for aarch32, the subdir names etc will
probably be different, or we can just revive the deleted
files no longer referenced with this commit.
2021-08-19 06:52:37 +00:00
mrg c7f5e91fa9 remove unused oabi mknative output. 2021-08-16 18:43:06 +00:00
mrg 67b89a9d15 note sh3 switched. 2021-08-16 17:42:05 +00:00
mrg 22cfb1f2ea install experimental/* and ext/opt_random.h. they're expected to
be there (and the latter was removed by accident.)

regen for everyone (also picks up missing tgmath.h for many ports.)

fixes build of pkgsrc/databases/mongodb for me.
2021-08-16 06:56:20 +00:00
christos 528f04f801 provide an equivalent alignment for __float128 for clang and i386 that
does not have it. Idea from mrg@
2021-07-17 16:31:51 +00:00
christos a60b166b0e clang does not support __float128 in our configuration and i386 2021-07-14 13:24:58 +00:00
skrll 10ddebb360 Fix a comment 2021-07-13 06:56:09 +00:00
mrg 16ea282704 define a X86_32_ASAN_BIT_OFFSET macro that defaults differently on
netbsd/i386 than other x86-32 targets.

fixes PR#56280.
2021-07-11 22:41:38 +00:00
mrg 7af90b5921 remove an old #if 0'd section. 2021-07-10 22:39:56 +00:00
thorpej 25ae879cc5 Remote -O0 hack for alpha; root cause has been addressed. 2021-07-06 12:41:00 +00:00
hgutch fb0e1b46a6 GCC git commit 91f66e78cc141da77ff9e0e3c8519e1af3f26c07[1] introduced
a regression in sh.  In addition to the intended change (based on the
commit message), an apparently unintended change was made, inverting a
comparison.  This broke sh builds and our workaround (so far) was to
compile xlint/lint1 with -O0.

Revert the comparison to what it was before and remove the -O0 hack
from xlint/lint1.

[1] https://gcc.gnu.org/git/?p=gcc.git;a=commitdiff;h=91f66e78cc141da77ff9e0e3c8519e1af3f26c07
2021-07-05 10:34:25 +00:00
cjep 0c942b0abf PR toolchain/56180. Additional to yesterday's commit in gcc, also needed in
gcc.old. Add configuration so that gcc can find the LTO plugin when
cross-building NetBSD from OpenBSD hosts.
2021-06-29 08:51:03 +00:00
cjep 87a9dd8907 PR toolchain/56180. Add configuration so that gcc can find the LTO
plugin when cross-building NetBSD from OpenBSD hosts. Discussed with mrg.
2021-06-28 09:13:10 +00:00
riastradh fc9d104b4a gdbserver(1): Work around clang build failure. 2021-06-20 12:29:58 +00:00
mrg 5be704ed29 switch m68000, m68k and 32 bit arm to GCC 10. just sh3 left!
special thanks to rin for fixing arm32.
2021-06-19 06:19:35 +00:00
rin 5bf1f32ce9 Update earmv[67]{,hf}{,eb}: hazard has gone, just working fine!
Note that kernel texts for soft-float variants are just same as that for
hard-float counterparts.
2021-06-16 00:56:16 +00:00
rin b1b853acea mknative for config.gcc fix for arm. 2021-06-15 08:23:41 +00:00
rin fd0328c778 Fix GCC10 for arm.
Include order of bpapi.h and netbsd-elf.h was swapped when official
support for arm*--netbsdelf-eabi{,hf} was added to GCC10. This seems to
cause critical inconsistencies, which results in SIGSEGV for as(1) on
earmv6hf{,eb} and some other regressions for many arm variants.

With this fix, everything work just fine as far as I can see.

Thanks skrll and mrg for discussion!
2021-06-15 08:22:23 +00:00
christos 1107fae2d2 enable gdbserver for amd64 (so that we don't break its build). 2021-06-07 14:24:42 +00:00
christos a66f3670d9 regen mipsn64el 2021-06-06 01:09:08 +00:00
rin 7b1352c2f3 Add missing nbsd_init_abi() call to aarch64_nbsd_init_abi().
Fix tests/usr.bin/gdb/t_regress:pie on aarch64eb (types of auxv was
misinterpreted), and hopefully other strange behaviors on aarch64{,eb}.

This is a regression introduced in GDB11. Neither gdb.old nor release
branches are affected.
2021-06-04 01:42:14 +00:00
rin c9540f6f13 PR toolchain/55837
Get rid of -O0 hack for GDB for hard-float arm. This was necessary because
libunwind did not support s0-s31. Note that for *most* cases (not all!),
-O0 stops using VFP registers for general purposes.

Also note that this hack was incomplete. We had to compile every functions
with -O0, that can be unwinded. Otherwise, GDB crashed every time exceptions
were raised.
2021-05-31 22:33:19 +00:00
joerg a956dc8220 Always use C++17 string_view, the emulation is just broken. 2021-05-30 02:23:25 +00:00
mrg 41b9942230 switch mips* and i386 to GCC 10.
arm32 (significant issues remaining), m68k (seems fine, but x68k
needs to reduce support in loadbsd), and sh3 remaining.
2021-05-27 06:58:27 +00:00
christos 407a19b76a restore -iremap functionality which was omitted by a merge botch, and then
remove as unused later.
2021-05-18 21:34:03 +00:00
rin 86042b19c0 Cherry-pick upstream fix for GCC10 regression to -misel option.
Assembler codes generated by GCC are identical with that of our local
fix in rev 1.26 for 32-bit processors, and no significant changes for
64-bit processors also.

master: https://gcc.gnu.org/g:6156df483fa50a08f561b6c248819f2992aa380d
gcc-10: https://gcc.gnu.org/g:5f665c1ca452673e9812cd92b07bd31441c0ac5b
(diffs are same)

commit r12-9-g6156df483fa50a08f561b6c248819f2992aa380d
Author: Segher Boessenkool <segher@kernel.crashing.org>
Date:   Tue Apr 20 12:00:50 2021 +0000

    rs6000: Fix cpu selection w/ isel (PR100108)

    There are various non-IBM CPUs with isel as well, so it is easiest if we
    just don't consider that flag here (it is not needed).

    2021-04-20  Segher Boessenkool  <segher@kernel.crashing.org>

            PR target/100108
            * config/rs6000/rs6000.c (rs6000_machine_from_flags): Do not consider
            OPTION_MASK_ISEL.
2021-05-11 01:47:20 +00:00
rin 5811b9203b In preparation to import upstream fix, revert our local fix in rev 1.26:
http://cvsweb.netbsd.org/bsdweb.cgi/src/external/gpl3/gcc/dist/gcc/config/rs6000/rs6000.c#rev1.26

> Fix regression introduced to GCC10, where it wrongly recognizes 32-bit
> processors as POWER9 if -misel flag is specified.
2021-05-11 01:39:09 +00:00
christos 2d56ebfab5 PR/56153: Rin Okuyama: alpha miscompiles malloca() macro. 2021-05-08 12:23:47 +00:00
rin 893bd8c6b1 For GCC10, add -Wno-unused-result for alloca(0) here and there. 2021-05-07 12:19:48 +00:00
mrg f119d7e9a4 avoid GCC-10 warnings. 2021-05-06 06:52:18 +00:00
mrg d946536fcb netbsd-eabi.h was never merged from the now present upstream version.
reduce diffs to upstream here and in other files in this subdir.

remove unused ARM_EABI_UNWIND_TABLES and __UNWIND_TABLES__.

clang defines __UNWIND_TABLES__, but doing this in GCC triggers the
need for more libgcc / libc unwind functionality to be added, and this
code has never been enabled for netbsd/earm.  (could potentially clean
up unused code in libc now, or, revive this once the full support has
been implemented..)
2021-04-29 01:51:39 +00:00
christos a6b5619189 Revert the change for the c-common.c hack. It is meant to be only for 32
bit mips. (Thanks Rin)
2021-04-27 14:18:25 +00:00
rin 3704a40269 Remove accidentally committed autogen file.
Should fix periodic snapshot builds with RO mounted /usr/src.
2021-04-26 23:51:08 +00:00
christos 475b3abc9b regen for mipsn64el 2021-04-26 17:24:04 +00:00
christos 933e8e6935 fix typos 2021-04-26 15:38:11 +00:00
christos 2beb407a26 regen for mipsn64eb 2021-04-25 23:38:40 +00:00
christos f6c4e00751 Add a mipsn64 target 2021-04-25 23:35:52 +00:00
christos b5bf390898 regen for mipsn64eb 2021-04-25 23:21:08 +00:00
christos 4d74c4e283 add mipsn64 targets 2021-04-25 23:18:42 +00:00
christos fc046893c7 regen for mipsn64eb 2021-04-25 23:16:26 +00:00
christos cfe96b2e15 Add support for mipsn64 targets which build 64 bit binaries by default
on instead of n32
2021-04-25 23:12:53 +00:00
christos bb13676ffd Limit no-error to stack-protector 2021-04-25 22:25:55 +00:00
christos e751f111c8 - Disable stack-protector errors like we did for cc1plus
- use ${MACHINE_MIPS64}
2021-04-25 22:25:00 +00:00
rin 7b81801bbc Update as(1) failure on armv6; it occurs also for earmv6hfeb, whereas it
does not for earmv6{,eb}.
2021-04-25 15:32:24 +00:00
christos 2b59ea2015 fix cargo-cult 2021-04-25 15:09:08 +00:00
christos ff47a56302 - include <bsd.init.mk>
- use MACHINE_MIPS64
2021-04-25 15:08:28 +00:00