Commit Graph

2114 Commits

Author SHA1 Message Date
christos
9c9fe86bc2 - Use EXTRA_SPECS like we did for aarch64 instead of SUBSUBTARGET_EXTRA_SPECS
so that assembly specs get propagated (they were lost before)
- adjust the block register padding (like the other OS's) so that code compiles
- XXX: linker still broken for shared libraries because the os specific spec
  is not chosen
2019-11-05 20:06:41 +00:00
mrg
c3f2d15f93 netbsd/hppa uses 16 byte alignment. the inherited default changed.. 2019-11-03 01:03:30 +00:00
mrg
304edd729a regen mknative for all arm after christos fixes. 2019-10-30 00:07:33 +00:00
skrll
6c41bebf88 G/C 2019-10-29 07:57:29 +00:00
christos
fbb09d761c Add more -O0 files for vax, sort 2019-10-29 02:49:05 +00:00
christos
f3b58f9273 vaxinate sanitizer_file.cc against the optimizer virus. 2019-10-28 16:25:05 +00:00
christos
b83b36aedd remove build output. 2019-10-27 21:07:37 +00:00
christos
c61fe20bc9 add some more machines to the 32 bit part 2019-10-26 18:36:25 +00:00
christos
876570509c Unbreak the sanitizers for gcc. The sanitizer offset defined in
libsanitizer needs to match with the compiler concept of
TARGET_ASAN_SHADOW_OFFSET, since the compiler generates instructions
to access memory at that offset in the code, and expects the
sanitizer library to have mapped something there. If there is
disagreement, Mr. Segmentation Fault comes and resolves it for you.
2019-10-25 18:03:59 +00:00
christos
943bd98d5c arm-common.c uses bitmap stuff so put the common-target.a before common.a 2019-10-24 18:48:43 +00:00
christos
741a117e19 arm-common.c needs stack-protector treatment 2019-10-24 18:48:09 +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
christos
8cb33180ff mknative tries to build this file with c++ and c++ does not like types
inside offsetof() (a language limitation).
2019-10-24 03:31:38 +00:00
christos
d05d30e64c add new files
XXX: all the arms need regen
2019-10-24 03:26:06 +00:00
christos
ad28d61a37 Since add_debug_regex_map is used in opts-global.c unconditionally, we can't
disable the code with #ifndef __NetBSD__ because it breaks cross-building.
2019-10-23 18:55:36 +00:00
christos
9fb3a182b9 prevent DFmode re-definition. 2019-10-16 15:01:56 +00:00
mrg
4c9e8c010a regen arm ports for config.gcc fix. 2019-10-16 07:38:02 +00:00
mrg
c1069780e3 make sure to include bpabi.h before arm.h. 2019-10-16 07:35:14 +00:00
mrg
669eddb156 use sanitizer_platform_limits_netbsd.cc.
link asan with libm so it can find signgam.

basic libasan works now.
2019-10-13 21:18:20 +00:00
mrg
de11d87641 introduce some common variables for use in GCC warning disables:
GCC_NO_FORMAT_TRUNCATION    -Wno-format-truncation (GCC 7/8)
GCC_NO_STRINGOP_TRUNCATION  -Wno-stringop-truncation (GCC 8)
GCC_NO_STRINGOP_OVERFLOW    -Wno-stringop-overflow (GCC 8)
GCC_NO_CAST_FUNCTION_TYPE   -Wno-cast-function-type (GCC 8)

use these to turn off warnings for most GCC-8 complaints.  many
of these are false positives, most of the real bugs are already
commited, or are yet to come.


we plan to introduce versions of (some?) of these that use the
"-Wno-error=" form, which still displays the warnings but does
not make it an error, and all of the above will be re-considered
as either being "fix me" (warning still displayed) or "warning
is wrong."
2019-10-13 07:28:04 +00:00
mrg
31fd77d90f remove ubsan_handlers_cxx.cc from sources. shouldn't be used with gcc. 2019-10-06 00:15:22 +00:00
maya
6b43361992 We might've switched modes, re-init the move cost table again if necessary.
Fixes unlikely segfault on VAX.
2019-10-04 12:46:43 +00:00
mrg
5e850be408 - update README.gcc8 to include current status
- netbsd/arm64 uses 64 byte malloc alignment
- make lsan compile on sparc*, mips*, ppc and arm64 again
- add missing sparc, alpha and i386 abi compat for struct __sanitizer_addrinfo
- avoid linux includes on arm64
- avoid multiply defined __ubsan_handle_cfi_bad_type when UBSAN_CAN_USE_CXXABI
  isn't defined, and, undefine it
- bad_array_length.cc and bad_array_new.cc lose special build rules
- regen arm64 mknative
2019-10-04 08:51:32 +00:00
christos
0ce1e4fd59 Fix core-dump register fetching. 2019-10-02 15:15:09 +00:00
skrll
c3fbc82630 Remove garbage. Maybe something is wrong with mknative or mrg's script? 2019-10-02 10:34:48 +00:00
mrg
41cead3c75 mknative-gcc for GCC 8.3 and all ports. 2019-10-02 07:14:31 +00:00
mrg
c79e82c597 make most of this compile:
- sanitizer_procmaps_netbsd.cc is obsolete.
- fix merge botches where upstrem has as slightly different version
  is upstream than prior local
- libstdc++ default is now gnu++17
- ubsan needs UBSAN_CAN_USE_CXXABI set
- properly use $G_RTL_BASE_H not (empty) $RTL_BASE_H
- libbackend HH gains new generated insn-modes-inline.h, and read-md.c
  gains the HH dep.
2019-10-02 06:51:59 +00:00
mrg
06250edab5 avoid multiple tm_file headers being listed and breaking builds. 2019-10-02 05:58:03 +00:00
mrg
415bf64101 don't undef SDB_DEBUGGING_INFO. obsolete (and triggers a warning.)
disable isInDeadlySignal() for now.
fix some compile errors in asan and lsan.
2019-10-02 05:04:58 +00:00
mrg
013d491e47 recycle README.gcc7 as README.gcc8 and give it a fresh clean 2019-10-02 04:23:58 +00:00
mrg
78e1884efe remove obsolete code and merge botch. 2019-10-02 03:46:21 +00:00
mrg
9c540241b2 remove obsolete gcc 4.9 or1k code. 2019-10-02 02:59:46 +00:00
mrg
e66a3c37e9 - use /usr/include/gcc-8
- update sanitizer makefiles

also, reduce diffs to upstream:
- remove or1k support
- re-order various lines to match upstream
- move regex map code into file-prefix-map.[ch]
2019-10-02 02:54:34 +00:00
mrg
200c7aa165 retire or1k gcc 4.9 code. 2019-10-02 02:50:38 +00:00
mrg
eb6947af76 merge GCC 8.3.
XXX: our change for e500 has moved into 'powerpcspe' port, which has
XXX: been marked deprecated in GCC 8.  this may affect what ppc ports
XXX: can update to GCC 8 easily, and we may need to add support for
XXX: 'powerpcspe' while we can.
2019-10-01 22:44:18 +00:00
mrg
78fc770276 regen for GCC 8.3 and our changes. 2019-10-01 22:41:59 +00:00
mrg
251c9c162b merge debug/file prefix/merge stuff with upstream, which has gained
a lot of the same features.  builds, but may not actually run right.
adjust for add_path()'s SYSTEM -> INC_SYSTEM.
2019-10-01 21:17:27 +00:00
mrg
ee69d28dd0 final GCC 8.3 sanitizer merge, untested. 2019-10-01 21:13:43 +00:00
mrg
c08ccaef18 merge GCC 8.3.0 pass 2. still will not compile yet. these
files are yet to merge:

C gcc/config/rs6000/rs6000.c
C libsanitizer/lsan/lsan_allocator.cc
C libsanitizer/sanitizer_common/sanitizer_internal_defs.h
2019-10-01 11:49:12 +00:00
mrg
3f8cba227b merge GCC 8.3.0 pass 1. will not compile yet. thare are still
about 25 files with merge issues.
2019-10-01 10:38:15 +00:00
mrg
14f5a3b000 import GCC 8.3. it includes these new features:
- many optimisations improved: inter-procedural, profile-directed,
  LTO, loops including user-controllable unroll support, and more.
- columns numbers added to line numbers in dwarf
- gcov extended significantly
- many sanitizer updates
- many new warning messages
- many better hints and more useful error messages
- minor ABI changes on x86-64 libstdc++, and some c++17 modes
- draft c++2a features
- better c++17 experimental support
- Armv8.4-A supported, better 8.2-A and 8.3-A support, including
  32 bit arm port.  cortex a-55, a-75 and a-55.a-75 combo support.
- in the GCC bugzilla, 8.1 shows 1149 bugs fixed, 8.2 shows 100, and
  8.3 shows 158.
2019-10-01 09:36:01 +00:00
christos
5c69aad9bb Validate register number before fetching/storing it (Gopikrishnan Sidhardhan) 2019-09-26 20:11:10 +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
kamil
7c33168b4c Add LSan and UBSan specific preprocessor macros
__SANITIZE_LEAK__ patch:
https://gcc.gnu.org/ml/gcc-patches/2019-09/msg01270.html

__SANITIZE_UNDEFINED__
https://gcc.gnu.org/ml/gcc-patches/2019-09/msg01286.html

GCC upstream does not see value in feature parity with LLVM sanitizers.
For the time being this will be a NetBSD specific extension.

__SANITIZE_LEAK__ is needed for __NO_LEAKS in <sys/cdefs.h>
__SANITIZE_UNDEFINED__ is planned to be reused in the kernel headers.
2019-09-22 23:34:13 +00:00
maya
fe084afe4c Initialize the mode before accessing the move costs.
This matches the code of the rest of the file, and might be acceptable
by upstream.

PR toolchain/53176.
2019-09-14 15:02:47 +00:00
maya
4f2290cb73 Revert ira-color.c r1.2.
"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."

Will commit a more upstream-friendly variant shortly.
2019-09-14 15:00:04 +00:00
kamil
1d6035aaec Cherry-pick upstream GDB patch to fix SIGTTOU handling
Fixes toolchain/54508 by Tobias Ulmer

commit 766f883622ef008230250aa5aecef9fb9b29f233
Author: Alan Hayward <alan.hayward@arm.com>
Date:   Tue May 28 10:07:54 2019 +0100

    Suppress SIGTTOU when handling errors

    Calls to error () can cause SIGTTOU to send gdb to the background.

    For example, on an Arm build:
      (gdb) b main
      Breakpoint 1 at 0x10774: file /build/gdb/testsuite/../../../src/binutils-gdb/gdb/testsuite/gdb.base/watchpoint.c, line 174.
      (gdb) r
      Starting program: /build/gdb/testsuite/outputs/gdb.base/watchpoint/watchpoint

      [1]+  Stopped                 ../gdb ./outputs/gdb.base/watchpoint/watchpoint
      localhost$ fg
      ../gdb ./outputs/gdb.base/watchpoint/watchpoint
      Cannot parse expression `.L1199 4@r4'.
      warning: Probes-based dynamic linker interface failed.
      Reverting to original interface.

    The SIGTTOU is raised whilst inside a syscall during the call to tcdrain.
    Fix is to use scoped_ignore_sigttou to ensure SIGTTOU is blocked.

    In addition fix include comments - job_control is not included via terminal.h

    gdb/ChangeLog:

            * event-top.c: Remove include comment.
            * inflow.c (class scoped_ignore_sigttou): Move from here...
            * inflow.h (class scoped_ignore_sigttou): ...to here.
            * ser-unix.c (hardwire_drain_output): Block SIGTTOU during drain.
            * top.c:  Remove include comment.
2019-09-06 14:37:00 +00:00