Commit Graph

2339 Commits

Author SHA1 Message Date
mgorny
318f469ce6 Enable EOWNERDEAD & ENOTRECOVERABLE in libstdc++ 2020-03-08 22:10:56 +00:00
mrg
cc42bf7eca regen for mknative and all platforms. there are a few things
fixed in this, mostly related to tgmath.h or frexp, and some
generated vs hand-edited white space diffs.
2020-03-07 22:26:16 +00:00
joerg
723199159f Use C++ syntax for defining types, not C one. 2020-02-23 02:06:01 +00:00
fox
02cd2e9449 external/gpl3/gcc: Fix build failure under LLVM.
-Wno-error= flag now only applies to gcc 8 and not to LLVM based builds.

Reviewed by: kamil@
2020-02-12 00:36:37 +00:00
fox
5b7a3dc736 external/gpl3/gcc: Suppress -Werror=format-overflow error.
Add -Wno-error=format-overflow for c-cppbuiltin.c and c-typeck.c to prevent
build failure.

Error was reported when build.sh was run with MKLIBCSANITIZER=yes flag.

Reviewed by: kamil@
2020-02-09 08:04:40 +00:00
mrg
86ab731f62 powerpc switched. 2020-02-07 07:16:32 +00:00
joerg
68f38f2c72 Don't implicitly cast away const char * when using correct C++ string.h
implementations. Those have overloaded string operations that preserve
constness.
2020-01-30 20:38:12 +00:00
uwe
109609bc84 Do not override STACK_BOUNDARY in netbsd.h
sysv4.h already overrides PREFERRED_STACK_BOUNDARY b/c SYSV ABI
requires 16 bytes alignment for %sp anyway and so we already get that
for free.

More importantly this also fixes alloca() in GCC 8, that was somehow
confused by that STACK_BOUNDARY value we had and created a buffer that
overlapped top local variable slots.
2020-01-22 21:39:43 +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
4f79a48470 Introduce PT_LWPSTATUS + PT_LWPNEXT, obsolete PT_LWPINFO
PT_LWPINFO is a legacy ptrace(2) operation that was originally intended
to retrieve the thread (LWP) information inside a traced process.

It has a number of flaws and is confused with PT_LWPINFO from FreeBSD.

PT_LWPSTATUS and PT_LWPNEXT address the problems (shortly by: rename,
removal of pl_event) and introduces new features: signal context
(pl_sigpend, pl_sigmask), LWP name (pl_name), LWP TLS base address
(pl_private). The private pointer was so far missing information for
a debugger.

PT_LWPSTATUS@nnn is now shipped with core(5) files and contain LWP specific
information, so far missed in the core(5) files.

PT_LWPSTATUS retrieves LWP information for the prompted thread.
PT_LWPNEXT retrieves LWP information for the next thread, borrowing the
semantics from NetBSD specific PT_LWPINFO.

PT_LWPINFO is namespaced with __LEGACY_PT_LWPINFO and still available for
the foreseeable future, without plans of removing it.

Add ATF tests for PT_LWPSTATUS + PT_LWPNEXT.

Keep ATF tests for PT_LWPINFO.

Switch GDB to new API.

Proposed on tech-kern@.
2019-12-24 14:50:59 +00:00
rin
f2a119be2e Fix 'nm /dev/ksyms' (noticed by ryo).
Since binutils 2.15, nm(1) cannot be used for character devices.
We worked around this by a local patch:

http://cvsweb.netbsd.org/bsdweb.cgi/src/gnu/dist/binutils/binutils/Attic/bucomm.c?r1=1.1.1.2&hideattic=0#rev1.2

With recent update of binutils, 'nm /dev/ksyms' got broken again.
This is due to a consistency check involving file size reported by
stat(2), which is always zero for character devices. So, skip this
check if file size is zero.
2019-11-30 22:50:11 +00:00
mrg
f3e1e5aaf8 note that earm and riscv switched to GCC 8. 2019-11-28 19:31:27 +00:00
christos
54e278d262 more regen stuff. 2019-11-22 14:57:01 +00:00
christos
01b509c1c7 regen x86_64 for i386 support 2019-11-22 01:52:20 +00:00
christos
356e78ed45 add missing files for 32 bit debugging on 64 bit host. 2019-11-22 01:49:20 +00:00
christos
e1c84f8601 Support for compat-32 type shared library paths. 2019-11-22 01:48:50 +00:00
mrg
e881204900 few gcc 8 clean ups:
- port lsan_allocator.h to riscv and ia64.
- remove configure output garbage from ia64/defs.mk
- update README.gcc8 to reality:
  - arms mostly work, but not quite
  - most ports now build
  - some ports have switched
2019-11-18 01:13:39 +00:00
mrg
a8b195cdfe note i386 and sparc* conversion. note arm32 issues. 2019-11-16 11:50:58 +00:00
mrg
a782ceec24 duplicate a some of Makefile.gnuhost.
should fix PR#53561.
2019-11-14 09:27:08 +00:00
mrg
5052e4c83f update a bunch of reality. 2019-11-10 10:31:38 +00:00
mrg
2c291b342a oops, regen these again with right iconv prototype present. 2019-11-06 21:33:07 +00:00
mrg
88ed255da2 regen mknative for powerpc and powerpc64. 2019-11-06 19:14:29 +00:00
mrg
96ef73dee0 update the comment above LIB_SPEC to remove 2 wrong things we fixed. 2019-11-06 10:42:00 +00:00
mrg
7c07e1db8f revert the powerpc config.gcc changes i made while merging,
they end up mis-ordering tm files.

revert the rs6000/netbsd64.h change and put it back as
SUBSUBTARGET_EXTRA_SPECS.


this seems to make the build work again, though mknative will
need a re-run for ppc*.
2019-11-06 09:10:50 +00:00
christos
1bfb63bfe1 regen powerpc64 2019-11-05 20:07:20 +00:00
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
skrll
f24a6747bb Restore the kvm support 2019-08-31 20:16:25 +00:00
maya
5dd22a92f0 Don't keep our local modifications as ifdef __NetBSD__.
When we build netbsd on another OS, we produce a cross compiler without
these definitions.

Fixes some compiler crashes when building netbsd/vax on linux.
2019-08-29 11:45:29 +00:00
rjs
c50f68c427 Fix to PR port-arm/54159.
From:

<http://mail-index.netbsd.org/tech-toolchain/2019/08/26/msg003596.html>

Pullup -9
2019-08-27 19:23:22 +00:00
mrg
1db21b1df3 fix MKCXX=no:
- don't build GDB
- don't build sanitizers
- don't build GCC commands
- fix some set lists
2019-08-23 08:17:26 +00:00
kamil
c208434299 Ship with sanitizer/lsan_interface.h for GCC 7
Leak Sanitizer is there.
2019-08-15 16:01:27 +00:00
christos
c599e3d1b6 On NetBSD the auxv tag is always 32 bits long. Gdb assumes it is 64 on _LP64.
This works most of the time, except for 64 bit big endian (sparc64 eg).
2019-08-12 05:40:42 +00:00
mrg
952758b2ca regen mknative for everyone after:
- NETBSD_ENABLE_PTHREADS removed (default always)
- HAVE_GNU_INDIRECT_FUNCTION enabled for some platforms
- switch to dragondfly bsd locale routines after christos made them work for us
2019-08-01 21:29:39 +00:00
christos
2d6048637c Manually patch the locale configuration to use the dragonfly code instead
of generic.
2019-07-31 16:40:25 +00:00
christos
062a414ce2 Use the dragonfly locale code for NetBSD too. 2019-07-31 16:39:02 +00:00
christos
00ecc5eae9 Add a forward declaration for the specialized __timepunct<wchar_t> destructor
that the dragonfly code needs to avoid "instantiation before specialization",
and an empty implementation for the generic code.
2019-07-30 20:28:50 +00:00
christos
6afa7d32cf There is no specialized constructor for ctype<char> so the
destructor ends up trying to free uninitialized memory for
_M_c_locale_ctype.
2019-07-30 20:24:58 +00:00
christos
a0d7985299 Arrange so that the Makefile works for both the generic and the dragonfly
locale code.
2019-07-30 20:19:18 +00:00
christos
f5ca8a60e2 Remove extra paren 2019-07-29 08:03:47 +00:00
christos
648d051fe8 remove extra paren 2019-07-29 07:59:47 +00:00
christos
813c7a947a Factor out the uselocale() calls by providing the _l missing functions as
inlines in xlocale_port.h except in c_locale.{cc,h} because the header gets
installed.
2019-07-28 17:41:21 +00:00
christos
f9b8013d85 PR/54375: Andreas Gustafsson: gdb attached to running process shows extra
thread. When attaching to a process that has threads make sure that we
mutate the inferior_ptid (that currently has lwpid == 0 to the first thread
we encounter.
2019-07-14 18:50:58 +00:00
christos
870d594d5a Use ULONGEST_MAX instead of (ULONGEST)-1 2019-07-13 21:55:52 +00:00
christos
5625e95427 Add (ULONGEST) to prevent narrowing warnings. 2019-07-13 21:53:48 +00:00
christos
a8a9d504b1 Regen mips 2019-07-12 22:45:07 +00:00
christos
8c59d46439 remove ancient and unused regset_t definitions 2019-07-12 22:44:33 +00:00
christos
e81dba3600 remove dup solib-svr4 defs 2019-07-12 22:44:11 +00:00
christos
434b3c9777 put back the kvm stuff lost in previous merge. 2019-07-12 22:43:15 +00:00
christos
ca881224bd add the bfd ntrad vectors so that core files are recognized on mips64 2019-07-12 22:42:45 +00:00
mlelstv
e810f82151 Don't sign-extend bytes when dumping description data. 2019-07-06 12:30:36 +00:00
kamil
e81678c69d Sync (c) note in GDB:sh-nbsd-tdep.c with upstream
This file is now GPLv3+, not GPLv2+.
2019-06-21 19:20:18 +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
mrg
0f3896e83f fix cross gdb build on sh and ppc:
- gdb_assert.h has moved into common/gdb_assert.h.
- force promotion to avoid compile errors

XXX why aren't these files built into the native binary, and
triggered normal build failures.
2019-06-17 06:33:53 +00:00
kamil
93c1a1e955 Enhance the GDB support for NetBSD
- Enable VFORK events
- Add syscall number for SCE/SCX events
- Add commented out posix_spawn(3) events
2019-06-14 01:00:52 +00:00
maya
eb9b74df38 Remove unused macro 2019-06-12 17:04:35 +00:00
christos
edd36b2506 fix format 2019-06-09 15:39:18 +00:00
mrg
293a231ba2 make this compile. now arm64 gdb works again. yay. 2019-06-08 14:59:01 +00:00
christos
c2e5191aa6 add a section for arch64-nbsd and regen. 2019-06-08 12:47:43 +00:00
christos
54eac751dd regen with forcing libexpat presence. 2019-06-02 23:27:19 +00:00
christos
1956f0abc1 put back script deleted during merge. 2019-06-02 16:07:58 +00:00
christos
6257d8c636 Don't require procfs to be mounted with linux so that <pid>/task is available
and explain why.
2019-06-01 17:24:20 +00:00
christos
7c126d09e2 Add defines so this compiles. 2019-06-01 17:23:29 +00:00
christos
db1852c7eb Do as FreeBSD does now (I have not checked that the offsets are correct) 2019-06-01 17:22:58 +00:00
christos
b231d39ade remove unused variable 2019-05-30 21:43:23 +00:00
christos
5a254e06b6 fix ppc 2019-05-30 21:27:58 +00:00
christos
b455aee1e6 need arch-utils.h 2019-05-30 21:23:52 +00:00
christos
2e708c9633 let's do things in the order everyone else does (I don't think it matters) 2019-05-30 21:16:03 +00:00
christos
98da7af653 set the architecture of the inferior. 2019-05-30 21:15:47 +00:00
christos
8f8c2ce4ff put back the kvm pcb code. 2019-05-30 20:41:14 +00:00
christos
87816d4f78 fix sh3eb 2019-05-30 19:34:27 +00:00
christos
f11604d482 add mipseb 2019-05-30 19:22:02 +00:00
christos
0a362b835d fix mipsel 2019-05-30 18:58:32 +00:00
christos
5afd627207 add mips64el 2019-05-30 18:34:24 +00:00
christos
9acf2c73cc add mips64eb 2019-05-30 18:17:58 +00:00
christos
20cd48c95d add m68k 2019-05-30 18:06:05 +00:00
christos
410f15d2f9 hello sun2! 2019-05-30 17:46:38 +00:00
christos
3a0b714ca4 add armeb 2019-05-30 17:16:33 +00:00
christos
82e413f264 fix hppa... 2019-05-30 16:54:01 +00:00
christos
3a781464e3 fix arm 2019-05-30 16:02:23 +00:00
christos
5ae5996a77 fix alpha 2019-05-30 13:54:20 +00:00
christos
d57368d20e Fix aarch64 2019-05-30 13:43:03 +00:00
christos
2530b571d5 vaxinate. 2019-05-30 01:19:59 +00:00
christos
f2848d63f1 more cleanups and homogenization 2019-05-30 01:19:36 +00:00
christos
8d9c916170 regen 2019-05-29 22:10:58 +00:00
christos
52e385fd92 Some more mechanical c++ificiation. 2019-05-29 22:10:38 +00:00
christos
fb7cdab11e make those compile again... 2019-05-29 22:08:28 +00:00
christos
aa1f3a6662 Move definitions into configure.nat; harmonize and refactor the NetBSD
nat definitions.
2019-05-29 22:07:47 +00:00
christos
d410c4ea3a fix build and regen for i386 2019-05-29 17:52:09 +00:00
christos
70cee18a97 regen 2019-05-29 01:56:33 +00:00
christos
dbb6ab2cb7 add netbsd specific files 2019-05-29 01:46:49 +00:00
christos
d32ea12c6c we don't have xfer_partial 2019-05-29 01:41:33 +00:00
christos
417eec4373 Add a declaration for canonicalize_file_name(), it really does not belong
here, but it is the most convenient (since it is only used in pathstuff.c)
2019-05-29 01:41:01 +00:00
christos
629cc47726 remove conflict marker 2019-05-29 01:38:27 +00:00
christos
e3dc3b907d use snprintf 2019-05-29 01:37:55 +00:00
christos
87865ed3b5 Start adjusting to the c++ world. 2019-05-28 15:30:39 +00:00
christos
21177fff6f fix locally modified file. 2019-05-28 01:20:02 +00:00
christos
314094e71e Resolve conflicts (by choosing the new gdb code). 2019-05-26 21:39:59 +00:00
christos
4559860ef2 May 11th, 2019: GDB 8.3 Released!
The latest version of GDB, version 8.3, is available for
          download.

          This version of GDB includes the following changes and
          enhancements:

          + Support for new native configurations (also available as a
            target configuration):
               o RISC-V GNU/Linux (riscv*-*-linux*)
               o RISC-V FreeBSD (riscv*-*-freebsd*)
          + Support for new target configurations:
               o CSKY ELF (csky*-*-elf)
               o CSKY GNU/Linux (csky*-*-linux)
               o NXP S12Z ELF (s12z-*-elf)
               o OpenRISC GNU/Linux (or1k*-*-linux*)
          + Native Windows debugging is only supported on Windows XP or
            later.
          + The Python API in GDB now requires Python 2.6 or later.
          + GDB now supports terminal styling for the CLI and TUI. Source
            highlighting is also supported by building GDB with GNU
            Highlight.
          + Experimental support for compilation and injection of C++
            source code into the inferior (requires GCC 7.1 or higher,
            built with libcp1.so).
          + GDB and GDBserver now support IPv6 connections.
          + Target description support on RISC-V targets.
          + Various enhancements to several commands:
               o "frame", "select-frame" and "info frame" commands
               o "info functions", "info types", "info variables"
               o "info thread"
               o "info proc"
               o System call alias catchpoint support on FreeBSD
               o "target remote" support for Unix Domain sockets.
          + Support for displaying all files opened by a process

         + DWARF index cache: GDB can now automatically save indices of
            DWARF symbols on disk to speed up further loading of the same
            binaries.
          + Various GDB/MI enhancements.
          + GDBserver on PowerPC GNU/Linux now supports access to the PPR,
            DSCR, TAR, EBB/PMU, and HTM registers.
          + Ada task switching support when debugging programs built with
            the Ravenscar profile added to aarch64-elf.
          + GDB in batch mode now exits with status 1 if the last executed
            command failed.
          + Support for building GDB with GCC's Undefined Behavior
            Sanitizer.

          See the NEWS file for a more complete and detailed list of what
          this release includes.

   February 27th, 2019: GDB 8.3 branch created
          The GDB 8.3 branch (gdb-8.3-branch) has been created. To check
          out a copy of the branch use:

git clone --branch gdb-8.3-branch ssh://sourceware.org/git/binutils-gdb.git

   December 23rd, 2018: GDB 8.2.1 Released!
          The latest version of GDB, version 8.2.1, is available for
          download.

          This is a minor corrective release over GDB 8.2, fixing the
          following issues:

          + PR build/23516 (gdb build error under msys+mingw: strip can't
            handle gdb-add-index.exe)
          + PR build/23623 (install-strip fails)
          + PR rust/23626 (gdb crashes in upstream rust nil-enum test)
          + PR rust/23650 (rust field name access error mentions "foo")
          + PR gdb/23663 (gdb 8.1.1: undefined rpl_stat function with musl
            toolchains)
          + PR python/23669 (gdb.execute("show commands") doesn't work)
          + PR python/23714 (Command repetition stops working after
            gdb.execute)
          + PR gdb/23838 (8.2 regression for invalid -data-directory)
          + PR gdb/23974 ("info os" crash when specifying invalid object)
          + PR gdb/23999 (SYMBOL_LANGUAGE assertion failure on AIX)
          + PR gdb/24003 (Error when binary searching CUs for a specific
            DIE when using DWZ)

   September 5th, 2018: GDB 8.2 Released!
          The latest version of GDB, version 8.2, is available for
          download.

          This version of GDB includes the following changes and
          enhancements:

          + Support for the following target has been added:
               o RiscV ELF (riscv*-*-elf)
          + Support for following targets and native configurations has
            been removed:
               o m88k running OpenBSD (m88*-*-openbsd*)
               o SH-5/SH64 ELF (sh64-*-elf*)
               o SH-5/SH64 (sh*)
               o SH-5/SH64 running GNU/Linux (sh*-*-linux*)
               o SH-5/SH64 running OpenBSD (sh*-*-openbsd*)
          + Various Python API enhancements
          + Aarch64/Linux enhancements:
               o SVE support.
               o Hardware watchpoints improvements for entities stored at
                 unaligned addresses.
                    # New "c" response to disable the pager for the rest
                      of the current command.
                    # C expressions can now use _Alignof, and C++
                      expressions can now use alignof.
                    # Improved flexibility for loading symbol files.
                    # The 'info proc' command nows works on running
                      processes on FreeBSD systems as well as core files
                      created on FreeBSD systems.
                    # A new --enable-codesign=CERT configure option to
                      automatically codesign GDB after build (useful on
                      MacOS X).
                 See the NEWS file for a more complete and detailed list
                 of what this release includes.

   July 31st, 2018: GDB 8.1.1 Released!
       The latest version of GDB, version 8.1.1, is available
       for download.
       This is a minor corrective release over GDB 8.1, fixing
       the following issues:
	  # PR gdb/22824 (misleading description of new rbreak
	    Python function in GDB 8.1 NEWS file)
	  # PR gdb/22849 (ctrl-c doesn't work in
	    extended-remote)
	  # PR gdb/22907 ([Regression] gdbserver doesn't work
	    with filename-only binaries)
	 # PR gdb/23028 (inconsistent disassemble of vcvtpd2dq)
	  # PR gdb/23053 (Fix -D_GLIBCXX_DEBUG gdb-add-index
	    regression)
	  # PR gdb/23127 ([AArch64] GDB cannot be used for
	    debugging software that uses high Virtual Addresses)
	  # PR server/23158 (gdbserver no longer functional on
	    Windows)
	  # PR breakpoints/23210 ([8.1/8.2 Regression] Bogus
	    Breakpoint address adjusted from 0xf7fe7dd3 to
	    0xfffffffff7fe7dd3)

   July 4th, 2018: GDB 8.2 branch created
       The GDB 8.2 branch (gdb-8.2-branch) has been created. To
       check out a copy of the branch use:
 git clone --branch gdb-8.2-branch ssh://sourceware.org/git/binutils-gdb.git

   January 31st, 2018: GDB 8.1 Released!
       The latest version of GDB, version 8.1, is available for
       download.
       Changes in this release include:
	  # Breakpoints on C++ functions are now set on all
	    scopes by default ("wild" matching);
	  # Support for inserting breakpoints on functions
	    marked with C++ ABI tags;
	  # Target floating-point arithmetic emulation during
	    expression evaluation (requires MPFR 3.1 or later);
	  # Various Python Scripting enhancements;
	  # Improved Rust support; in particular, Trait objects
	    can now be inspected when debugging Rust code;
	  # GDB no longer makes assumptions about the type of
	    symbols without debugging information to avoid
	    producing erroneous and often confusing results;
	  # The 'enable' and 'disable' commands now accept a
	    range of breakpoint locations;
	  # New 'starti' command to start the program at the
	    first instruction;
	  # New 'rbreak' command to insert a number of
	    breakpoints via a regular expression pattern
	    (requires Python);
	  # The 'ptype' command now supports printing the offset
	    and size of the fields in a struct;
	  # The 'gcore' command now supports dumping all the
	    memory mappings ('-a' command-line option);
	  # New shortcuts for TUI Single-Key mode: 'i' for
	    stepi, and 'o' for nexti;
	  # GDBserver enhancements:
	       @ Support for transmitting environment variables
		 to GDBserver;
	       @ Support for starting inferior processes with a
		 specified initial working directory;
	       @ On Unix systems, support for globbing expansion
		 and variable substitution of inferior
		 command-line arguments;
	  # Various completion enhancements;
	  # The command used to compile and inject code with the
	    'compile' command is now configurable;
	  # New '--readnever' command-line option to speed the
	    GDB startup when debugging information is not
	    needed;
	  # Support for the following new native configurations:
	       @ FreeBSD/aarch64 (aarch64*-*-freebsd*);
	       @ FreeBSD/arm (arm*-*-freebsd*);
	  # Support for the following new targets:
	       @ FreeBSD/aarch64 (aarch64*-*-freebsd*);
	       @ FreeBSD/arm (arm*-*-freebsd*);
	       @ OpenRISC ELF (or1k*-*-elf)
	  # Removed support for the following targets and native
	    configurations:
	       @ Solaris2/x86 (i?86-*-solaris2.[0-9]);
	       @ Solaris2/sparc (sparc*-*-solaris2.[0-9]);
       See the NEWS file for a more complete and detailed list
       of what this release includes.

   January 5th, 2018: GDB 8.1 branch created
       The GDB 8.1 branch (gdb-8.1-branch) has been created. To
       check out a copy of the branch use:
 git clone --branch gdb-8.1-branch ssh://sourceware.org/git/binutils-gdb.git

   November 1st, 2017: Debugging Tools Devroom at FOSDEM 2018
       We will have a Debugging Tools Devroom at FOSDEM 2018.
       The Call for Participation has recently been announced.
       The Devroom is on the first of the two FOSDEM days, on
       Saturday 3 Feb 2018. See you all at FOSDEM in Brussels!

   September 7th, 2017: GDB 8.0.1 Released!
       The latest version of GDB, version 8.0.1, is available
       for download.
       This is a minor corrective release over GDB 8.0, fixing
       the following issues:
	  # PR breakpoint/21886 (Compressed MIPS code debugging
	    impossible due to memory breakpoint misplacement)
	  # PR symtab/22002 (Assertion on debuggee built with
	    -gdwarf-5 -fdebug-types-section)
						  GDB News (p6 of 30)
	  # PR symtab/22003 (Incompatibility with -gdwarf-5 -
	    DW_FORM_implicit_const)
	  # PR gdb/22046 (Regression on older kernels for T
	    (stopped) processes)
	  # PR sim/20863 (gdb-7.12 powerpc-rtems4.12-gdb does
	    not build on FreeBSD)
	  # PR breakpoint/21555 ("error re-setting breakpoint"
	    on PIE executables)
	  # PR tdep/21717 ("print $fpscr" says "" until some VFP
	    data register is printed)
	  # PR exp/21827 (Regression: gdb command lookup became
	    case-sensitive; but definitions are forced into
	    lowercase)
	  # PR remote/22021 (Multi-arch exec fails with a remote
	    target)
2019-05-26 20:59:15 +00:00
christos
99e23f81b2 Sync with HEAD 2019-05-26 20:13:49 +00:00
christos
699b0f9210 Import gdb current to gdb.old 2019-05-26 20:02:05 +00:00
christos
a1d9e97103 Undo previous (disable lsan), and instead fix it by passing 1 instead of 0
to the address argument in detach. Apparently linux ignores the address
argument for detach (or treats 0 as 'do not set').
2019-05-25 15:18:52 +00:00
maya
111421ac72 don't claim lsan support on netbsd.
PR toolchain/54226: address sanitizer doesn't work
2019-05-25 13:54:37 +00:00
christos
18d966ff32 Modernize the error printing for text relocations by syncing it to the
"more maintained" platforms.
2019-05-12 22:42:33 +00:00
christos
fcd7b61e5b regen for ppc64 2019-05-11 02:39:48 +00:00
christos
19f0e0e583 remove the ppc64 long-double-128; the default is 64 now. 2019-05-11 02:39:32 +00:00
christos
6f6e225c3d Switch PPC64 long double to 64 bits until the compiler is fixed.
XXX: This changes the ABI of the libraries.
2019-05-11 02:37:58 +00:00
christos
e0449d2322 Ignore 0 size'd symbols when looking for CMSE veneers.
XXX: Is this correct?
2019-05-05 21:49:53 +00:00
christos
ea8d659759 Everyone has libexpat so enable it. 2019-05-05 20:48:46 +00:00
kamil
51245743fe Improve comment in the GDB NetBSD code 2019-05-03 19:06:50 +00:00
kamil
1c9d9aa474 Overwrite waiton_ptid in nbsd-nat, rather than generic core
This avoids compatibility issues with remote access to !NetBSD platform.
2019-05-03 19:03:57 +00:00
kamil
a26629aac4 Quick clean up the NetBSD support in GDB
Changes:

 - always perform polling on inferior_ptid, never -1
   -1 can cause catching fork/vfork events in random order
   polling on pid will guarantee to report events in expected order

 - assume availability of KERN_PROC_PATHNAME

 - drop dead code for KERN_PROC_AUXV (FreeBSD-specific sysctl)
   AUXV on NetBSD is handled with PIOD_READ_AUXV

 - drop unused nbsd_fetch_kinfo_proc

 - drop unneeded hacks for fork/vfork code

 - drop support for FreeBSD specific flags returned for PT_LWPINFO
   NetBSD uses PT_GET_SIGINFO / PT_GET_PROCESS_STATE for most pieces of
   information

 - port nbsd_thread_name to NetBSD

 - enable LWP and FORK events in nbsd_enable_proc_events

 - use NetBSD new batteries for distinguishing event type in to_wait
   map most events into GDB types
   breakpoint, single step, hw breakpoint/watchpoint ones are still not
   used with the full power here

 - add support for EXEC events

 - clean up

This change makes GDB functional with threaded code and it is good enough
to pass t_regress / threads test.

It's possible to execute and step processes with multiple threads, use
scheduler-lock, follow-fork etc features.


What does not work:

 - the LWP EXIT event and wait() are not synchronized and can deadlock
   this has been observed with exiting go applications

 - GDB VFORK code is still disabled and awaits kernel fixing

Short term goal is to correct LWP EXIT and follow up with VFORK fixes.

Long term goal is to rewrite NetBSD GDB support and write new support in
the remote process plugin (gdb-server) framework.

PR kern/53120
PR port-arm/51677
PR bin/54060
PR bin/49662
PR kern/52548
2019-05-03 07:05:28 +00:00
kamil
f1a9e7560d Backport improvements into GCC's sanitizer_linux.cc from more recent LLVM
Backport fixups for syscall()/__syscall() routines from LLVM compiler-rt
dated October 1st 2018. The commit beffore switching LLVM compiler-rt
sycall calls to libc calls for NetBSD.

GCC8 will get part of these changes from upstream and GCC9 will operate on
libc calls directly for the NetBSD port.

This is intended to correct misuse of parameters of syscall()/__syscall()
that could break !x86 ports in UBSan.
2019-04-27 00:23:17 +00:00
mrg
71f0a1a7ed add missing symver-config.h 2019-04-23 22:22:22 +00:00
christos
bde7252318 Add an ifdef _GLIBCXX_COMPAT_ that removes the versioned symbol nodes from
libstdc++ and enable it for now only for the random archives but not for the
shared object (although it does not break anything that I've tested to enable
it for the shared object too). Fixes static linking, which does not handle
multiple versioned symbols properly.
2019-04-23 20:55:53 +00:00
mrg
d12924f2c9 - use the same set of emulations for riscv* on netbsd as linux does
- for riscv64-*netbsd* hosts and 32 bit target, set LIB_PATH
- build the other target emulations for riscv32 on riscv64
- regen riscv64 mknative for ld updates
2019-04-18 10:07:24 +00:00
mrg
4e3331939d - undef STARTFILE_PREFIX_SPEC, it is wrong for netbsd
- make LINK_SPEC more like other multi-line string defines
- update multilib stuff for GCC 7 riscv -- -m32/-m64 gone, -mabi and
  -march now decide between several options
2019-04-18 10:06:19 +00:00
mrg
4e5e0371b1 delete files no longer present in GCC 7 port of riscv. 2019-04-18 06:32:21 +00:00
mrg
326d89ec21 - define __riscv__ again
- define *intptr_t in terms of 'long int' always
- move fixtfdi.c, fixunstfdi.c, floatditf.c, and floatunditf.c into t-netbsd64
- remove duplicated riscv case in config.gcc, reducing upstream diff as well
- regen riscv64 mknative
2019-04-17 10:07:00 +00:00
mrg
9ba37f97ce mknative-gcc and mknative-binutils for riscv32. mostly builds. 2019-04-17 09:37:49 +00:00
mrg
d1429afe98 fake mknative, mostly enough to build real for mknative. 2019-04-17 08:56:10 +00:00
mrg
3e8847491c fix -I paths for powerpc*. convert amd64 specific hack.
we've been building dp-bit.c and fp-bit.c backwards, but as they
use the same input source, they just had opposite objects and
the right total was provided.  oops.
2019-04-16 08:08:18 +00:00
mrg
a9f3ed48cb mknative-gcc for riscv64. 2019-04-16 08:01:36 +00:00
mrg
1b3d5424d9 list a bunch of soft-fp as present in the current risc64 libgcc defs.mk.
this makes mknative-gcc work without breaking maya's manual work.
2019-04-16 07:50:05 +00:00
mrg
04325e9757 regen mknative-gcc for GCC 7 and ppc64. libgcc still has problems. 2019-04-16 07:37:56 +00:00
mrg
b55068e0f5 avoid differences to linux64.h that aren't needed.
merge the rs6000_abi_name check for netbsd into the linux/freebsd section.
2019-04-16 07:36:55 +00:00
mrg
292122e2f9 no clone() on netbsd. 2019-04-16 07:34:54 +00:00
mrg
b543e834b1 regen for mknative-binutils for riscv64. 2019-04-16 06:19:54 +00:00
mrg
1532ab65e0 fix merge botch - remove duplicated case statement (not in configure) 2019-04-16 02:10:09 +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
kamil
ea81bf5e10 Sync GetPcSpBp() with GCC9 (and recent LLVM)
Unify all NetBSD ports in a single ifdef.
2019-04-16 01:40:16 +00:00
maya
172e5eac59 Remove unused definition. 2019-04-15 21:13:36 +00:00
maya
8684462788 Re-do previous:
emulate the addition of NETBSD_SUBTARGET_EXTRA_SPECS usually done by
SUBTARGET_EXTRA_SPECS (not used in risc-v) with EXTRA_SPECS.
Go back to using %(netbsd_link_spec) in our link spec, now that it's
a valid string.

Try to mimic other riscv OSes in our LINK_SPEC. they all start with
"-melf" XLEN_SPEC "lriscv" LD_EMUL_SUFFIX

and a definition of LD_EMUL_SUFFIX,
let's copy the LD_EMUL_SUFFIX linux uses.

Now we can link executables.
2019-04-15 18:49:07 +00:00
maya
dbcdc1e748 Provide riscv implementation.
XXX this is MI, why not use it for everyone?
2019-04-15 15:58:23 +00:00
maya
04b98926d2 more fake mknative 2019-04-15 14:51:23 +00:00
maya
ab65834a8e don't redefine types.
UINTMAX_TYPE / INTMAX_TYPE are mostly not redefined on netbsd.
These choices contradict typical 64bit archs, perhaps we don't want them.

XXX is the SIZE_TYPE default for riscv reasonable?
(long unsigned int for 64bit abi, unsigned int for 32bit abi)
2019-04-15 14:19:20 +00:00
maya
fc3e881944 Fake mknative 2019-04-15 14:02:23 +00:00
christos
213dbbf596 add missing files 2019-04-13 18:04:23 +00:00
christos
6e1bd08549 regen 2019-04-13 18:04:04 +00:00
christos
d02c3a6c2b fix typo, unused variable 2019-04-13 18:02:37 +00:00
christos
c9793efd5f fix core stack traces (missing register 25) 2019-04-13 18:02:05 +00:00
maya
fe5c6b2efc Fake mknative. enough to build libc, with other changes pending 2019-04-13 15:54:07 +00:00
maya
76f8d190e0 use NETBSD_LINK_SPEC_ELF rather than netbsd_link_spec.
My current guess as to why it makes a difference is that riscv, unlike other
targets, doesn't use the macro SUBTARGET_EXTRA_SPECS for anything meaningful

Fixes linking libgcc_s.so, which is now emitted as a dynamic library, not
a static object (which fails, as it has undefined references)

XXX there might be a better way of doing this
2019-04-13 15:53:32 +00:00
mrg
b73d549731 be sure to keep cc1_cpu the CC1*_SPEC.
fixes x86 -mtune=native without killing -cxx-isystem.
2019-04-11 00:17:44 +00:00
maya
7845a6d414 revert previous 2019-04-10 20:06:26 +00:00
maya
d3f779a9e1 Remove lingering references to NETBSD_CC1_AND_CC1PLUS_SPEC.
Not actually tested.
2019-04-10 16:15:11 +00:00
maya
6ad38d9708 remove bogus specs redefinition.
fixes the use of -march=native
2019-04-10 16:11:06 +00:00
maya
575b128d66 Claim ifunc support on a number of architectures.
(Architecture list taken from src/tests/libexec/ld.elf_so/t_ifunc.c)

This is needed for attribute target_clones to work.

Non-functional until a mknative run. Tested by doing a regular GCC build.
2019-04-07 14:26:26 +00:00
maya
b5a049a897 don't append to nbsd_tm_file. This is the sole definition so fine to do.
Only done to reduce diff to upstream.
2019-04-07 14:14:05 +00:00
maya
518582be7b Reduce diff to upstream (in config.gcc):
Make the NETBSD_ENABLE_PTHREADS unconditional (we don't use the else case)
2019-04-07 14:11:23 +00:00
maya
2cea6cc9bf Make the post-netbsd 2.0 case the only case. NFC.
(Reducing diff to upstream)
2019-04-07 14:08:35 +00:00
mrg
36f30ad7ad switch hppa to GCC 7.
note vax atf fails same as GCC 6.  hppa mostly works but has an
atf issue also unrelated to the compiler version

note ia64 mostly builds, but the kernel fails earlier than GCC 6.
2019-04-04 21:31:28 +00:00
mrg
af34d1bb77 - fix missing else in SUBSUBTARGET_OVERRIDE_OPTIONS
- remove obsolete defines, and move stuff to be more like freebsd64.h
- remove common / already correctly defined overrides
2019-04-03 08:31:57 +00:00
mrg
13f13ab7f0 fix error in previous 2019-04-03 02:13:56 +00:00
mrg
5436994bfb make ia64 build with gcc7:
- catch up tmake_file list for ia64-netbsd to gcc 7 standards
- don't build the "tf" extra size version on ia64 like x86.
- regen mknative files
2019-04-02 21:29:46 +00:00
christos
3f8860fbac regen 2019-04-02 14:17:55 +00:00
christos
c3d72cab2c add a missing file 2019-04-02 14:17:36 +00:00
christos
c745dd35cf remove debugging code 2019-04-02 03:47:30 +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
e5309b49fe bump libstdc++.so.
unfortunately, we attempted to do this for netbsd-8 but we did
not actually end up having any ABI incompatibility with that,
as turning off dual ABI in libstdc++ means *only* enabling the
old ABI.  however, enabling dual ABI with C11 defaults (ie,
a forward looking ABI) *is* an ABI-change for some special
cases and thus we should have bumped this a couple of weeks
ago when we re-enabled dual ABI.

call this "nb3 20190319".

mknative-gcc regen all switched ports and almost all of the
unswitched ports.
2019-03-20 05:09:26 +00:00
mrg
cc64e9ea3d default oabi to strongarm. fixes build.sh -a arm builds. 2019-03-19 23:55:28 +00:00
mrg
44d3eb23e0 enable the workarounds for cortex a53 errata 835769 and 843419 by default. 2019-03-19 05:55:00 +00:00
mrg
7cace13896 update reality on switched ports and commited fixes. 2019-03-04 01:16:33 +00:00
mrg
adef1dae34 #if 0 the x and y symbols in GLIBCXX_3.4 namespace. they cause
duplicate symbols on netbsd.  see PR#54027.

with this disabled, turn on using the symver-config.h for the
gnu.ver processing so that other defines are handled.

fix some depends for gnu.ver processing.
2019-03-01 08:15:23 +00:00
mrg
e97586ab89 basic mknative bootstrap-libgcc for riscv64 2019-02-28 09:49:14 +00:00
mrg
32c963babf rework some commented code so it is easier to enable. 2019-02-28 01:11:04 +00:00
mrg
ee6b12caee partial mknative-gcc for riscv32/64. 2019-02-27 08:22:43 +00:00
mrg
c8240a8d80 avoid hand maintained lists but use values mknative pulls out.
unfortunately, somefiles have hand coded rules.
2019-02-27 08:21:42 +00:00
mrg
2b0e069250 mknative-gcc for most platforms again after recent tools/gcc/Makefile change. 2019-02-27 08:19:49 +00:00
christos
06535a6e22 regen i386 2019-02-26 21:24:44 +00:00
christos
fd53ae5e9e regen 2019-02-26 21:16:03 +00:00
joerg
be7b2c4eb4 Properly extract the emulation path from the linker script template. 2019-02-25 19:55:35 +00:00
mrg
9709f9a6a8 various updates for reality.
- arm64, powerpc switched
- arm, hppa, sh3 is ready to switch
- vax dynamic binaries have a problem
2019-02-17 06:22:58 +00:00
mrg
36422d2e0c regen mknative with symver no longer disabled. 2019-02-17 00:24:15 +00:00
mrg
70e3d17cd2 apply -std=gnu++98 to some more files.
state that some hard coded stuff here should be pulled out with mknative.
2019-02-17 00:05:11 +00:00
mrg
5b04a93ad5 put joerg's varasm.c patch back with additional upstream fixes. now
crtbegin.o has a read-only .eh_frame, and libstdc++ builds.


2017-09-01  Joerg Sonnenberger  <joerg@bec.de>
            Jeff Law  <law@redhat.com>

        * varasm.c (bss_initializer_p): Do not put constants into .bss
        (categorize_decl_for_section): Handle bss_initializer_p returning
        false when DECL_INITIAL is NULL.

2017-11-27  Jakub Jelinek  <jakub@redhat.com>

        PR target/83100
        * varasm.c (bss_initializer_p): Return true for DECL_COMMON
        TREE_READONLY decls.

2018-02-09  Jakub Jelinek  <jakub@redhat.com>

        PR middle-end/84237
        * output.h (bss_initializer_p): Add NAMED argument, defaulted to false.
        * varasm.c (bss_initializer_p): Add NAMED argument, if true, ignore
        TREE_READONLY bit.
        (get_variable_section): For decls in named .bss* sections pass true as
        second argument to bss_initializer_p.
2019-02-14 10:29:58 +00:00
mrg
d5c4011b2c partial mknative-gcc for gcc7 and riscv. only libgcc-bootstrap works so
far as libgcc-bootstrap actually doesn't work so building real libs fails.
2019-02-10 07:57:22 +00:00
mrg
8dc00095fb remove stuff provided by netbsd-stdint.h. 2019-02-10 07:56:21 +00:00
mrg
0276ea74da riscv wants netbsd-stdint.h's CHAR_FAST8=1 and SHORT_FAST16=1. 2019-02-10 07:55:57 +00:00
maya
2d1c9dccee Fake mknative for riscv64, enough to complete a tools build. 2019-02-09 21:03:24 +00:00
maya
71bd56fe32 s/TARGET_HARD_FLOAT_ABI/TARGET_HARD_FLOAT, the latter has the
benefit of existing. Inspired by mips/netbsd.h.

remove some redefinitions. There are still a few left, but these ones
seem to match.
2019-02-09 21:00:41 +00:00
maya
c43be0834e We also need t-riscv (for riscv-builtins.o) 2019-02-09 20:57:17 +00:00
maya
dd2e62178a Revert all riscv-related local patches.
As for the libbfd.h change: the definitions seem to mostly exist, but we
had duplicated them.

Fixes riscv64 binutils build.
2019-02-09 19:40:32 +00:00
mrg
7f3d4089fc make sure Makefile.inc is included before Makefile.driver.
allows removing a depend hack and may also fix dtrace/ctf builds.
2019-02-09 07:32:50 +00:00
mrg
bbaa4a4045 - build the gthr*.h files to be installed on the fly, instead of
having dozens of copies of the same thing in the tree.
- don't fetch any gthr*.h files.
- delete ancient gthr-tpf.h that was removed in GCC 4.8 or so.

this should fix the call_once tests for real now.
2019-02-09 03:57:00 +00:00
mrg
db06f203b4 fix the previous - it's __NetBSD__, not __NetBSD. 2019-02-09 02:43:11 +00:00
mrg
f2b804bcea remove old comment. 2019-02-09 02:36:56 +00:00
mrg
5b0105b4d4 update switched lists. 2019-02-09 01:29:38 +00:00
christos
0166c051fe Follow suit with FreeBSD and solaris for the __gthread_active_p()
implementation. Fixes the atf call_once unit tests.
2019-02-09 01:27:43 +00:00
mrg
07cbfd6044 put config/posix first in the path so that the right lock.c is used. 2019-02-09 00:48:59 +00:00
mrg
928cce347f define CAN_SANITIZE_UB properly: libasan and libtsan need to not
have it set, libubsan needs to have it set.

fixes almost all the new atf failures from GCC 7 switch.
2019-02-08 22:06:12 +00:00
mrg
3330ae4f37 IA64_NO_LIBGCC_TFMODE is no more. 2019-02-08 09:42:13 +00:00
mrg
424610db8d clean all the temporary and other files in a build. 2019-02-08 03:59:34 +00:00
mrg
053817057e - earm* seems to work now
- sun2 an vax build now
- mips*, powerpc, and sparc64 are ready to switch
- mac68k has an untested and an uncommited change to build
- everything else except ia64 and powerpc64 builds
2019-02-08 02:04:29 +00:00
mrg
1aa3d81bd8 regen to give "earm" a v5 default again. 2019-02-08 01:29:44 +00:00
mrg
bd3caebfe8 give netbsd/arm a v5 default again. 2019-02-08 01:29:11 +00:00
mrg
290f0433dd regen mknative-gcc and GCC 7 for earm targets: use generic unwind 2019-02-07 10:46:32 +00:00
mrg
bcf3b19768 - don't use arm unwind code for netbsd/earm. conflicts with native unwind. 2019-02-07 10:45:48 +00:00
mrg
d12e291051 - don't just undefine INIT_SECTION_ASM_OP and FINI_SECTION_ASM_OP,
define them to "" so that libgcc doesn't define __CTOR_LIST__.
2019-02-07 10:45:17 +00:00
mrg
7eece953b5 apply -O0 to a few more files for vax. 2019-02-07 05:28:38 +00:00
mrg
4b4e7cf07c fix merge botch. 2019-02-07 05:28:12 +00:00