Commit Graph

132 Commits

Author SHA1 Message Date
rin a3e196b030 gcc.old: Switch earmv6{,hf}eb to BE8, ported from gcc. 2020-12-01 02:39:48 +00:00
rin a8c74629f6 Support aarch64eb in */config.guess.
Cherry-picked from upstream:
https://git.savannah.gnu.org/gitweb/?p=config.git;a=commit;h=1c4398015583eb77bc043234f5734be055e64bea

Everything except external/apache2/llvm/dist/llvm/cmake/config.guess
is patched, which is under vendor tag and cannot be modified. I expect
that this file is not actually used as we use hand-crafted version of
configure script instead of cmake for building LLVM.

Note that external/apache2/llvm/autoconf/autoconf/config.guess has
already been committed on Oct. 20, but commit message disappeared as
cvs aborted due to "permission denied" when trying to modify the file
mentioned above. Sorry for confusing you.

Also note that GMP uses its own config.guess Patch for
external/lgpl3/gmp/dist/config.guess is provided by ryo@. Thanks!
2020-11-17 10:35:10 +00:00
jakllsch e98c6d562d Native GCC (old) for aarch64eb 2020-09-04 02:30:44 +00:00
jakllsch 998e6be0d9 Build driver-aarch64.c for both endians of aarch64 2020-09-04 02:26:57 +00:00
jakllsch dbd5c7f03a Treat aarch64eb the same as aarch64, enabling aarch64eb build 2020-09-03 18:30:05 +00:00
jakllsch 9f4a03f995 Teach config.gcc about NetBSD aarch64eb 2020-09-02 14:13:20 +00:00
mrg a2dc1f3fac merge GCC 8.4 into gcc.old. 2020-08-19 07:46:31 +00:00
mrg cef8759bd7 initial GCC 8.4 -> gcc.old import. 2020-08-18 23:31:16 +00:00
mrg 04ac9a9074 regen mknative files for GCC 7.5. 2020-08-13 07:19:59 +00:00
mrg a05ac97e64 merge GCC 7.5.0 into gcc.old. .. just in time to be obsolete? :) 2020-08-11 08:45:54 +00:00
lukem 7115637964 Fix addition of C++ .cc source to SRCS
Fix assumption that all of the source files are .c, as some are .cc.

Not tested, based on similar change to
  external/gpl3/gcc/usr.bin/cc1plus/Makefile
2020-07-01 08:25:44 +00:00
lukem b252a0e204 use ggc-none.c not ggc-none.o in SRCS
not tested, based on similar change to
 external/gpl3/gcc/usr.bin/lto-wrapper/Makefile
2020-07-01 07:54:24 +00:00
mgorny 318f469ce6 Enable EOWNERDEAD & ENOTRECOVERABLE in libstdc++ 2020-03-08 22:10:56 +00:00
mgorny 26a48dd100 Install gcc's unwind.h instead of libexecinfo's
The prototypes in libexecinfo's unwind.h do not match those commonly
used (e.g. by gcc, clang, GNU libunwind, LLVM libunwind...), causing
C++ programs to fail to build on type mismatches (e.g. compiler-rt,
libc++abi).  Rather than providing our own header, reuse the one
included in gcc.
2020-01-22 15:10:31 +00:00
kamil 77a1ad5f00 Switch the iconv(3) prototype to the POSIX conformant variation
Remove const from the 2nd argument.

const char ** and char ** are incompatible types and it was a cost to keep
the technically incompatible form for a more purist variation. NetBSD was
almost the last alive OS to still keep the const argument (known leftovers:
Minix and Illumos).

Keep the const form for the internal purposes inside citrus and rump.

Address the build breakage fallout in the same change.

There are no ABI changes.

Change accepted by core@.
2019-10-24 18:17:14 +00:00
mrg 36ac495d2b merge gcc 7.4 into gcc.old part 3 (last?) 2019-09-26 08:02:28 +00:00
mrg 1debfc3d3f merge gcc 7.4 into gcc.old part 2. 2019-09-26 05:55:33 +00:00
mrg ac10021d3f merge gcc 7.4 into gcc.old. 2019-09-26 05:51:13 +00:00
mrg 3ad841b2f6 import GCC 7.4 as gcc.old 2019-09-26 05:45:16 +00:00
mrg 4d79f33340 delete GCC 6.5. every platform has been on GCC 7 for a while now. 2019-06-20 10:29:53 +00:00
kamil ac211f1cad Sync gcc.old GetPcSpBp() with GCC9 (and recent LLVM)
Unify all NetBSD ports in a single ifdef.
2019-04-16 01:44:07 +00:00
christos b7ade174e0 Compiling some files with -fPIC and -O2 ends up having global
symbols classified as local in pic mode, and that ends up with PC32
relocations "movl *psp, %rx" (/bin/sh parse.c). Treat pic code as
shared libraries to avoid classifying common initialized symbols
as local. Thanks to thorpej@ for his help.
2019-04-02 02:59:50 +00:00
rin 1d1632b562 Fix usage of STACK_ALIGNBYTES in our local change.
Tested on amd64 and i386:
- binaries generated by "gcc -fsanitize=address" work fine
- /usr/tests/usr.bin/{cc,c++}/t_asan_* do not fail
2019-03-24 00:23:59 +00:00
mrg e27558b901 remove our riscv changes in gcc.old. they were obsolete with GCC 5
update, let alone GCC 6.  new GCC 7 has native support again.

this is really about trying to avoid conflicts when we next have
gcc become gcc.old.
2019-01-31 20:44:46 +00:00
christos a9dc9217bb Descend and build includes even if mkgcccmds=no because we need the header
files during cross build too.
2019-01-18 17:31:39 +00:00
christos 76718fd7da Use the proper stack aligment for the architecture. Fixes broken asan
tests on i386.
2019-01-17 20:36:51 +00:00
christos a493019100 now that our profiled c library is pic we can use it in shared objects 2019-01-06 18:15:18 +00:00
christos 9b7d2d5975 Specify that we need the profiled libraries when we are linking c++ with
profiling.
2019-01-04 18:35:45 +00:00
rin dee7fb843d PR toolchain/53810
PR toolchain/53684
PR toolchain/53685

No one defines TARGET_DEFAULT_CPU anymore. Use ENABLE_SHARED_LIBGCC
instead to determine whether GCC is configured for m68k or m68000.
This fixes C++ binaries on m68k, that require libgcc_s.

OK mrg
2018-12-28 21:30:20 +00:00
mrg 0e9d255287 rewrite the CPU identification on arm64:
- publish per-cpu data
- publish a whole bunch of info in struct aarch64_sysctl_cpu_id
  instead of various individual nodes (there are 16 total.)
- add MIDR extractor bits
- define ARMv8.2-A id_aa64mmfr2_el1 and id_aa64zfr0_el1 regs,
  but avoid using them until we make sure they exist.  (these
  members are added to aarch64_sysctl_cpu_id to avoid future
  compat issues.)

the arm32 and aarch32 version of these need to be adjusted as
well (and aarch32 data published at all.)  still trying to
work out how to make the same userland binary running on a
real arm32 or an aarch32 system can work sanely here.

ok ryo@.
2018-11-20 01:59:51 +00:00
mrg 9977f8ab49 pull across from gcc/: regen after GCC 6.5. 2018-11-11 23:14:16 +00:00
mrg cb0339e943 merge GCC 6.5.0 into gcc.old. 2018-11-11 22:49:37 +00:00
mrg e9afa17a23 merge GCC 6.5 into gcc.old (properly this time.) 2018-11-11 20:59:07 +00:00
martin cd54eb5ef0 VAX does not fully populate the register move costs table, so do not
access it w/o checks.
Hack to work around PR toolchain/53176.
2018-10-29 10:22:56 +00:00
christos 0bee54c3d5 The syslog format attribute is a superset of the printf format attribute
so allow functions marked with the printf format attribute to call syslog
without producing warnings with -Wmissing-format-attribute.
2018-09-14 20:46:46 +00:00
christos 0883f3731a fix the build; this was mis-generated before to an empty file. 2018-09-07 18:41:39 +00:00
mrg 866b3c4cbe merge in missing changes from gcc to gcc.old (both GCC 6.4.):
--
redo mknative-gcc for all ports.  main changes include:
- "#define HAVE_CC_TLS 1" for most/all ports, thanks maya@
- "#define _GLIBCXX_HAVE_LDEXPL 1" and "#define _GLIBCXX_HAVE_TGMATH_H 1"
  for many ports
- arm64 and amd64 had a broken c++config.h that disabled many things
- configargs.h has more normalisation
- ppc64 has a few things fixed, must have missed several mknative rounds
--
regen to pull out INTERNAL_CFLAGS.
--
pull -DHAVE_CC_TLS out of $(INTERNAL_CFLAGS) if it is there, and add
it to CPPFLAGS.

this fixes PR#53567 for me.
2018-09-05 06:26:58 +00:00
maya 9e53aadb1c Correct missing paren and regen for gcc.old, too.
Now HAVE_CC_TLS will be defined in confdefs.h.
2018-09-03 22:52:00 +00:00
mrg 2dd16a5c31 consolidate path for gcc-version specific into GCC_INCSDIR, and
have it derived from the HAVE_GCC value so it does not need to
be modified for newer GCCs.
2018-08-12 21:48:56 +00:00
mrg 4877c284cc fix the sanitizer include path. 2018-08-02 07:47:30 +00:00
mrg 63ce0b47ae merge GCC 6.4 into gcc.old. 2018-08-02 00:02:46 +00:00
mrg f13786ea7f import GCC 6.4 srcs into gcc.old in preparation for GCC 7.x.
these are netbsd GCC srcs from 20180801.
2018-08-01 22:18:23 +00:00
kamil e5038c36e9 Cherry-pick upstream patch for internal_mmap() in GCC(.old) sanitizers
Fix internal_mmap() on 32-bit NetBSD platforms

There is need to use internal_syscall64() instead of internal_syscall_ptr().
The offset argument of type off_t is always 64-bit.

http://llvm.org/viewvc/llvm-project?view=revision&revision=333075

PR kern/53261 by Martin Husemann
2018-05-23 11:16:13 +00:00
mrg 875f3f406e apply the changes from GCC 6 / powerpc and netbsd-stdint.h
to make <stdatomic.h> work.
2018-04-14 08:09:46 +00:00
mrg 7032fd789a 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.

XXX: pullup-8 to gcc/ not gcc.old/
2018-03-28 19:24:52 +00:00
mrg 7b319e81c3 fix the cleanfiles for hooks mechanism 2018-03-13 03:17:01 +00:00
mrg a23ad621f4 remove this obsolete file that has a lot of dated info from
about the time we started switching some ports to GCC 5.3.
2018-02-23 01:01:22 +00:00
christos a3a22b2ed2 we now has _UC_MACHINE_FP. 2018-02-15 19:02:06 +00:00
maya 0cca4bc316 Use bools with bool. NFCI.
From Henning Petersen in PR toolchain/53009.
(I completed for the rest of the function. Similar code exists in GCC trunk.)
2018-02-11 13:50:15 +00:00
kamil 413e439cd5 Install GCC (gcc.old/) headers for Sanitizers
Install:
 - allocator_interface.h
 - asan_interface.h
 - common_interface_defs.h
 - tsan_interface_atomic.h

Into:
 - /usr/include/gcc-5/sanitizer

Note headers in a comment headers for introduction in future:
 - dfsan_interface.h
 - lsan_interface.h
 - msan_interface.h

Skip a file that will never be relevant on NetBSD:
 - linux_syscall_hooks.h

PR 52265 by Kamil Rytarowski

Proposed and accepted on tech-toolchain@.

Sponsored by <The NetBSD Foundation>
2018-02-01 20:50:22 +00:00