Commit Graph

2368 Commits

Author SHA1 Message Date
kamil
543accdbd7 Undo local patch having no impact
/tmp is picked from P_tmpdir earlier.
2020-10-06 21:49:22 +00:00
kamil
fef5fe3a2a Undo local NFC patch 2020-10-06 21:39:53 +00:00
christos
67dafae820 Apply by hand a patch to fix http://r6.ca/blog/20200929T023701Z.html
aka "the memcmp bug", from a patch for gcc-10 in
https://gcc.gnu.org/bugzilla/show_bug.cgi?id=95189
Tested on x86_64 by running a full build, install and running it.
Testing that the problem has been fixed with one of the unit tests provided.
2020-10-04 14:44:47 +00:00
kamil
4d7b5ca9b5 Do not assume that _lwp_getprivate() returns unbiased private pointer
Cherry-pick and adapt:

From 2a9ce60de98e53198047daaeeec3cf09ece4e693 Mon Sep 17 00:00:00 2001
From: Kamil Rytarowski <n54@gmx.com>
Date: Fri, 2 Oct 2020 16:13:09 +0200
Subject: [PATCH] [compiler-rt] [netbsd] Improve the portability of
 ThreadSelfTlsTcb

Use __lwp_gettcb_fast() and __lwp_getprivate_fast(), as _lwp_getprivate()
can be a biased pointer and invalid for use in this function on all CPUs.
2020-10-02 14:36:54 +00:00
christos
5093c1f669 Add the generated version file 2020-09-24 14:54:03 +00:00
christos
bc11a54ebd Add version.cc 2020-09-24 14:53:35 +00:00
kamil
2c7c316aa6 Make gdbserver almost work
The only missing thing is the lack of generated version.c.
2020-09-24 03:06:01 +00:00
christos
70699dff37 Add build glue (does not link) 2020-09-23 23:36:59 +00:00
mrg
4cb0ef6be7 fix missing deps for cow-fs_dir* and cow-fs_ops*.
should fix build issues reported on current-users.
2020-09-21 20:00:44 +00:00
mrg
e9f99204c3 make depend files also depend on the generated headers.
fixes build issues.
2020-09-21 06:48:48 +00:00
christos
d2c8b54685 zero out the sockaddr, so that the length it guaranteed to be 0. 2020-09-20 21:18:45 +00:00
christos
eceb233b9b regen 2020-09-20 20:34:42 +00:00
christos
4d342c046e regen 2020-09-20 16:54:16 +00:00
christos
853ce42ed3 disable -Wstack-usage since some targets like vax don't support it 2020-09-20 16:41:25 +00:00
christos
ad295f62b7 undo previous, it was correct 2020-09-20 16:00:56 +00:00
christos
f80dfe5994 Don't read data from sections without contents on NetBSD. We end up reading
0's and svr4_exec_displacement read phdrs_target successfully, and we
end up in the rabbit-hole of 0 displacement for pie binaries and then we
can't load our shared libaries from the core file.
2020-09-20 14:39:26 +00:00
christos
10aefa730d remove mis-merged code and make the auxv core offset 0. Now loading auxv
from core files works.
2020-09-19 21:47:03 +00:00
christos
8ac0bbd165 The lid of the main thread == pid now. Should we fix the kernel to return
this? Now debugging live programs work.
2020-09-19 21:45:45 +00:00
christos
43893e6090 Provide better guesses for bsd systems, otherwise we end up calling
recursively opendir and gettimeofday until we run out of stack...
2020-09-18 17:46:47 +00:00
christos
e6d52d512c fix build. 2020-09-17 20:26:22 +00:00
christos
808b1dd7da commit generated man pages 2020-09-17 20:13:20 +00:00
christos
eff0df4904 Generate ctf-error.h 2020-09-17 16:45:35 +00:00
christos
c14ca8fd28 Add new libraries 2020-09-17 16:38:10 +00:00
christos
19ad82eb24 Add new libraries, adjust old ones 2020-09-17 16:36:38 +00:00
christos
6b8c077795 remove obsolete 2020-09-17 16:07:39 +00:00
christos
7ea3f33ef5 Avoid name conflict 2020-09-17 16:06:27 +00:00
christos
fbd0cba2e1 Avoid re-definitions 2020-09-17 16:05:14 +00:00
kamil
e849e4aef2 Use internal_ptrace() instead of ptrace()
Cherry-pick:

commit 0008fb343704bafc3469703be930b8a65d7c47fa
Author: Kamil Rytarowski <n54@gmx.com>
Date:   Mon Sep 14 10:10:49 2020 +0200

    [compiler-rt] [netbsd] Use internal_ptrace() instead of ptrace()
2020-09-17 15:43:24 +00:00
kamil
81809f8a14 Undo setting _KERNTYPES
The sparc ptrace(2) headers were fixed to work without defined _KERNTYPES.
2020-09-17 15:42:17 +00:00
christos
58eb0ebe66 regen for x86_64 and start fixing the Makefiles (does not link yet) 2020-09-17 02:17:51 +00:00
christos
2536a35811 Add back accidentally missed file 2020-09-17 02:12:31 +00:00
mrg
4102322db0 fix dependencies for bits/largefile-config.h. the .cc files don't
depend on it, the outputs of those do.  should fix build issue
reported by otis@.
2020-09-16 21:24:30 +00:00
mrg
aa4e3817c0 switch sparc* and mips* to GCC 9. 2020-09-15 09:27:25 +00:00
mrg
d6c9d56cbc all mips and powerpc and sh3 build now.
sparc64 seems ok.
2020-09-15 08:44:02 +00:00
mrg
ebc1bdaad3 actually, disable tsan on everything but amd64.
it fails to build on mips64 and arm64 for me as well as others..
2020-09-15 07:00:03 +00:00
mrg
1137d45026 powerpc64, sh3 and vax builds now work.
sh3 and vax now works (workarounds commited.)
2020-09-15 05:21:46 +00:00
mrg
37f5d06eba make build and work on sh3 and vax. 2020-09-15 05:19:34 +00:00
mrg
af229fff5a merge generic changes in eg rs6000/freebsd64.h into netbsd64.h 2020-09-15 05:06:56 +00:00
martin
911eea2386 Do not build libtsan on sparc64 2020-09-15 04:55:23 +00:00
christos
db9b8011e5 merge conflicts 2020-09-15 02:05:15 +00:00
christos
8dffb485a1 Import head of gdb as of 2020-09-14 requested by Kamil
2020-07-24  Aaron Merey  <amerey@redhat.com>

	* configure: Rebuild.
	* configure.ac: Remove AC_DEBUGINFOD.

2020-07-04  Nick Clifton  <nickc@redhat.com>

	Binutils 2.35 branch created.

2020-04-21  Stephen Casner  <casner@acm.org>

	PR 25830
	* configure.ac (noconfigdirs): Exclude gdb & gprof for pdp11.
	* configure: Rebuild.

2020-03-12  Tom Tromey  <tom@tromey.com>

	* Makefile.in: Rebuild.
	* Makefile.def (gdbserver): Depend on gdbsupport.

2020-03-12  Tom Tromey  <tom@tromey.com>

	* Makefile.in: Rebuild.
	* Makefile.def (gdbsupport): Don't depend on bfd.

2020-03-12  Tom Tromey  <tom@tromey.com>

	* Makefile.in: Rebuild.
	* Makefile.def (gdbsupport): Depend on intl.

2020-02-17  Tom Tromey  <tom@tromey.com>

	* configure: Rebuild.
	* configure.ac (configdirs): Add gnulib and gdbsupport when building
	gdbserver.

2020-02-14  Tom Tromey  <tom@tromey.com>

	* Makefile.in: Rebuild.
	* Makefile.def: Make gdbserver require gnulib and libiberty.

2020-02-07  Tom Tromey  <tom@tromey.com>
	    Pedro Alves  <palves@redhat.com>

	* src-release.sh (GDB_SUPPORT_DIRS): Add gdbserver.
	* gdbserver: New directory, moved from gdb/gdbserver.
	* configure.ac (host_tools): Add gdbserver.
	Only build gdbserver on certain systems.
	* Makefile.in, configure: Rebuild.
	* Makefile.def (host_modules, dependencies): Add gdbserver.
	* MAINTAINERS: Add gdbserver.

2020-01-28  Sergio Durigan Junior  <sergiodj@redhat.com>

	* src-release.sh (getver): Look for gdbsupport's
	create-version.sh script at the current directory if tool is
	"gdb".

2020-01-19  Simon Marchi  <simon.marchi@polymtl.ca>

	* remote-sim.c (gdbsim_target::wait): Return
	sim_data->remote_sim_ptid instead of inferior_ptid.

2020-01-18  Nick Clifton  <nickc@redhat.com>

	Binutils 2.34 branch created.

2020-01-18  Nick Clifton  <nickc@redhat.com>

	Synchronize top level configure files with master version:

	2020-01-01  Ben Elliston  <bje@gnu.org>

	* config.guess: Update copyright years.
	* config.sub: Likewise.

	2019-12-21  Ben Elliston  <bje@gnu.org>

	* config.guess (set_cc_for_build): Prevent multiple calls by
	checking if $tmp is already set. We can't check CC_FOR_BUILD as
	the user may set it externally. Thanks to Torbjörn Granlund for
	the bug report.

	2019-12-21  Torbjörn Granlund  <tg@gmplib.org>

	* config.guess (alpha:Linux:*:*): Guard against missing
	/proc/cpuinfo by redirecting standard error to /dev/null.

	2019-09-12  Daniel Bittman  <danielbittman1@gmail.com>

	* config.guess (*:Twizzler:*:*): New.
	* config.sub (-twizzler*): New.

	2019-07-24  Ben Elliston  <bje@gnu.org>

	* config.guess (mips:OSF1:*.*): Whitespace cleanup.

	2019-06-30  Ben Elliston  <bje@gnu.org>

	* config.sub (case $os): Match nsk* and powerunix. Don't later
	match nsk* and set os=nsk which removes the OS version number.

	2019-06-30  Ben Elliston  <bje@gnu.org>

	* config.sub: Recognise os108*.

	2019-06-26  Ben Elliston  <bje@gnu.org>

	* config.sub (hp300): Set $os to hpux.

	2019-06-26  Ben Elliston  <bje@gnu.org>

	* config.sub (vsta): Move into alphabetical order.

	2019-06-10  Ben Elliston  <bje@gnu.org>

	* config.guess (*:OS108:*:*): Recognise new OS.

	2019-05-28  Ben Elliston  <bje@gnu.org>

	* config.guess (*:Darwin:*:*): Run xcode-select to determine if a
	system compiler is installed. If not, do not run set_cc_for_build,
	as the default cc will open a dialog box asking to install
	Xcode. If no C compiler is available, guess based on uname -p and
	uname -m.

	2019-05-28  Ben Elliston  <bje@gnu.org>

	* config.guess (*:Darwin:*:*): Simplify UNAME_PROCESSOR.

2020-01-17  Simon Marchi  <simon.marchi@efficios.com>

	* Makefile.def: Add dependencies of all-gdbsupport on all-bfd.
	* Makefile.in: Re-generate.

2020-01-14  Tom Tromey  <tom@tromey.com>

	* src-release.sh (GDB_SUPPORT_DIRS): Add gdbsupport.
	* MAINTAINERS: Add gdbsupport.
	* configure: Rebuild.
	* configure.ac (configdirs): Add gdbsupport.
	* gdbsupport: New directory, move from gdb/gdbsupport.
	* Makefile.def (host_modules, dependencies): Add gnulib.
	* Makefile.in: Rebuild.

2020-01-09  Aaron Merey  <amerey@redhat.com>

        * config/debuginfod.m4: New file. Add macro AC_DEBUGINFOD. Adds
        new configure option --with-debuginfod.
        * configure: Regenerate.
        * configure.ac: Call AC_DEBUGINFOD.

2019-12-26  Christian Biesinger  <cbiesinger@google.com>

	* .gitignore: Add perf.data and perf.data.old.

2019-10-17  Sergio Durigan Junior  <sergiodj@redhat.com>

	* src-release.sh (GDB_SUPPORT_DIRS): Add libctf.

2019-10-17  Alan Modra  <amodra@gmail.com>

	PR 29
	* src-release.sh (getver): Replace "head -1" with "head -n 1".

2019-07-30  Nick Alcock  <nick.alcock@oracle.com>

	* Makefile.def (host_modules): libctf is no longer no_install.
	* Makefile.in: Regenerated.

2019-07-13  Nick Alcock  <nick.alcock@oracle.com>

	* Makefile.def (dependencies): all-ld depends on all-libctf.
	* Makefile.in: Regenerated.

2019-09-09  Phil Blundell  <pb@pbcl.net>

	binutils 2.33 branch created

2019-08-19  Tom Tromey  <tom@tromey.com>

	* configure: Rebuild.
	* configure.ac: Add --with-static-standard-libraries.

2019-08-09  Nick Clifton  <nickc@redhat.com>

	* libiberty: Sync with gcc.  Bring in:
	2019-08-08  Martin Liska  <mliska@suse.cz>

	PR bootstrap/91352
	* lrealpath.c (is_valid_fd): New function.

	2019-07-24  Martin Liska  <mliska@suse.cz>

	PR lto/91228
	* simple-object-elf.c (simple_object_elf_copy_lto_debug_sections):
	Find first '\0' starting from gnu_lto + 1.

	2019-07-12  Ren Kimura  <rkx1209dev@gmail.com>

	* simple-object-elf.c (simple_object_elf_match): Check zero value shstrndx.
	This fixes a Bug 90924.

	2019-07-22  Martin Liska  <mliska@suse.cz>

	* simple-object-elf.c (simple_object_elf_copy_lto_debug_sections):
	Do not search for gnu_lto_v1, but search for first '\0'.

	2019-07-18  Eduard-Mihai Burtescu  <eddyb@lyken.rs>

	* cplus-dem.c: Include rust-demangle.h.
	* rust-demangle.c: Include rust-demangle.h.
	* rust-demangle.h: New file.

	2019-05-31  Michael Forney  <mforney@mforney.org>

	* cp-demangle.c: Don't define CP_DYNAMIC_ARRAYS if __STDC_NO_VLA__
	is non-zero.

	2019-04-30  Ben L  <bobsayshilol@live.co.uk>

	* d-demangle.c (dlang_parse_assocarray): Correctly handle error result.
	* testsuite/d-demangle-expected: Add testcase.

	* d-demangle.c (dlang_parse_tuple): Correctly handle error result.
	* testsuite/d-demangle-expected: Add testcase.

	* d-demangle.c (dlang_parse_structlit): Correctly handle error result.
	* testsuite/d-demangle-expected: Add testcase.

	* d-demangle.c (dlang_parse_arrayliteral): Correctly handle error result.
	* testsuite/d-demangle-expected: Add testcase.

	* d-demangle.c (dlang_parse_integer): Fix stack underflow.
	* testsuite/d-demangle-expected: Add testcase.

	* cp-demangle (d_print_comp_inner): Guard against a NULL 'typed_name'.
	* testsuite/demangle-expected: Add testcase.

	* cp-demangle.c (d_encoding): Guard against NULL return values from
	d_right (dc).
	* testsuite/demangle-expected: Add testcase.

	2019-04-29  Ben L  <bobsayshilol@live.co.uk>

	* cp-demangle.c (d_expression_1): Don't peek ahead unless the current
	char is valid.
	* testsuite/demangle-expected: Add testcase.

	2019-04-10  Nick Clifton  <nickc@redhat.com>

	PR 89394
	* cp-demangle.c (cplus_demangle_fill_name): Reject negative
	lengths.
	(d_count_templates_scopes): Replace num_templates and num_scopes
	parameters with a struct d_print_info pointer parameter.  Adjust
	body of the function accordingly.  Add recursion counter and check
	that the recursion limit is not reached.
	(d_print_init): Pass dpi parameter to d_count_templates_scopes.
	Reset recursion counter afterwards, unless the recursion limit was
	reached.

2019-07-13  Joel Brobecker  <brobecker@adacore.com>

	* src-release (getver): If $tool/gdbsupport/create-version.sh
	exists, use that to determine the version number.

2019-06-21  Andreas Schwab  <schwab@linux-m68k.org>

	* src-release.sh (GDB_SUPPORT_DIRS): Add gnulib.

2019-06-14  Tom Tromey  <tom@tromey.com>

	* MAINTAINERS: Add gnulib.
	* gnulib: New directory, move from gdb/gnulib.
	* configure.ac (host_libs): Add gnulib.
	* configure: Rebuild.
	* Makefile.def (host_modules, dependencies): Add gnulib.
	* Makefile.in: Rebuild.

2019-06-03  Nick Clifton  <nickc@redhat.com>

	Revert:
	2019-05-29  Nick Clifton  <nickc@redhat.com>

	* configure.ac (noconfigdirs): Add libctf if the target does not use
	the ELF file format.
	* configure: Regenerate.

2019-05-29  Nick Clifton  <nickc@redhat.com>

	* src-release.sh (do_proto_toplev): Add libctf to list of
	directories that can be disabled.

2019-05-29  Nick Clifton  <nickc@redhat.com>

	* configure.ac (noconfigdirs): Add libctf if the target does not use
	the ELF file format.
	* configure: Regenerate.

2019-05-28  Nick Alcock  <nick.alcock@oracle.com>

	* Makefile.def (dependencies): configure-libctf depends on all-bfd
	and all its deps.
	* Makefile.in: Regenerated.

2019-05-28  Nick Alcock  <nick.alcock@oracle.com>

	* MAINTAINERS: Add libctf.

2019-05-28  Nick Alcock  <nick.alcock@oracle.com>

	* Makefile.def (host_modules): Add libctf.
	* Makefile.def (dependencies): Likewise.
	libctf depends on zlib, libiberty, and bfd.
	* Makefile.in: Regenerated.
	* configure.ac (host_libs): Add libctf.
	* configure: Regenerated.

2019-05-23  Jose E. Marchesi  <jose.marchesi@oracle.com>

	* config.guess: Synchronize with config project master sources.
	* config.sub: Likewise.
	* readline/support/config.guess: Likewise.
	* readline/support/config.sub: Likewise.

2019-04-10  Nick Clifton  <nickc@redhat.com>

	* libiberty: Sync with gcc.  Bring in:
	2019-04-10  Nick Clifton  <nickc@redhat.com>

	PR 89394
	* cp-demangle.c (cplus_demangle_fill_name): Reject negative
	lengths.
	(d_count_templates_scopes): Replace num_templates and num_scopes
	parameters with a struct d_print_info pointer parameter.  Adjust
	body of the function accordingly.  Add recursion counter and check
	that the recursion limit is not reached.
	(d_print_init): Pass dpi parameter to d_count_templates_scopes.
	Reset recursion counter afterwards, unless the recursion limit was
	reached.

2018-06-24  Nick Clifton  <nickc@redhat.com>

	2.32 branch created.

2019-01-14  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>

	Merge from GCC:
	PR target/88535
	* config.guess: Import upstream version 2019-01-03.
	* config.sub: Import upstream version 2019-01-01.

2019-01-10  Nick Clifton  <nickc@redhat.com>

	* libiberty: Sync with gcc.  Bring in:
	2019-01-09  Sandra Loosemore  <sandra@codesourcery.com>

	PR other/16615

	* cp-demangle.c: Mechanically replace "can not" with "cannot".
	* floatformat.c: Likewise.
	* strerror.c: Likewise.

	2018-12-22  Jason Merrill  <jason@redhat.com>

	Remove support for demangling GCC 2.x era mangling schemes.
	* cplus-dem.c: Remove cplus_mangle_opname, cplus_demangle_opname,
	internal_cplus_demangle, and all subroutines.
	(libiberty_demanglers): Remove entries for ancient GNU (pre-3.0),
	Lucid, ARM, HP, and EDG demangling styles.
	(cplus_demangle): Remove 'work' variable.  Don't call
	internal_cplus_demangle.

2019-01-03  Дилян Палаузов  <dilyan.palauzov@aegee.org>

	* configure.ac: Don't configure readline if --with-system-readline is
	used.
	* configure: Re-generate.
2020-09-15 01:41:53 +00:00
skrll
c922664953 hppa status 2020-09-14 19:51:54 +00:00
kamil
84a821fc01 Consistently, always link sanitizer runtime with libm and libpthread
This reflects the behavior from LLVM and avoids issues with dlsym(3) APIs.
2020-09-14 15:01:57 +00:00
kamil
0d08acfb76 Undo local patch adding GNU-stack
This is unneeded on NetBSD.
2020-09-14 14:56:43 +00:00
kamil
1dee2ebd2c Avoid using dummy tsan_rtl_unimpl.cc
Instead of providing broken support, error during build to catch the
problem quickly.
2020-09-14 14:33:01 +00:00
kamil
9f140fc4da Catch unsupported LONG_JMP_SP_ENV_SLOT
A variation of this patch is pending upstream: https://reviews.llvm.org/D87602
2020-09-14 11:56:01 +00:00
rin
379e44a136 Sync with external/gpl3/gdb/dist/gdb by removing unused files:
- rust-exp.c is generated file.
- x86bsd-nat.[ch] were replaced by x86-bsd-nat.[ch] when 8.0.1 was merged.
2020-09-14 06:50:31 +00:00
mrg
eaf57fb942 fixed armv7-eb build issue; as not gcc related. 2020-09-14 01:19:50 +00:00
christos
47c37bc275 merge conflicts 2020-09-14 00:40:04 +00:00
christos
e148fee9e4 merge conflicts 2020-09-14 00:40:02 +00:00
christos
ae1832950f merge conflicts 2020-09-14 00:40:02 +00:00
christos
815e1b14f3 merge conflicts 2020-09-14 00:39:47 +00:00
mrg
c51a5adcd2 switch riscv and ia64 to GCC 9.
switch riscv to binutils 2.34.
2020-09-13 23:32:04 +00:00
mrg
08422490a2 riscv64 vs xorg-server is solved (non-gcc specific issue.) 2020-09-13 23:23:00 +00:00
christos
7f2ac4106a Import gdb-8.3 from the latest HEAD of the NetBSD tree with our local
modifications.
2020-09-13 21:44:03 +00:00
mrg
ed0af92660 note some platforms switched and some are ready to switch. 2020-09-13 21:21:04 +00:00
mrg
0d31d1b3fe regen for riscv32/riscv64 target emulation list. 2020-09-13 21:18:50 +00:00
mrg
5aa87be48b merge riscv*-netbsd* target support. 2020-09-13 21:14:01 +00:00
martin
7799f82205 Add missing dkbad.h include and define _KERNTYPES so we get all internal
types (like register_t) that we need for ptrace.
Fixes the build on sparc64.
2020-09-13 08:51:58 +00:00
kamil
e94bb09cf6 Sync netbsd_syscall_hooks.h with LLVM r. 74760bb00fb9b78a
Update the syscall definitionss from a snapshot 2.5 years old to the
current one.
2020-09-13 03:00:12 +00:00
kamil
4b3dee3027 Build and install GCC TSan for 64-bit CPUs 2020-09-13 02:37:31 +00:00
kamil
35d5e69e5a Always link TSan runtime with librt and libm
With these changes, TSan/amd64 works.
2020-09-12 23:04:44 +00:00
kamil
999ae5b7da Disable GetNamedMappingFd for NetBSD
Analogous logic is in LLVM rev. 74760bb00fb9b78a2fe122.

Removes undefined symbol linkage to shm_unlink and shm_open.
2020-09-12 22:52:24 +00:00
kamil
2f7e7363ca Ignore unused functions in tsan_interceptors.cc 2020-09-12 22:24:22 +00:00
kamil
e654846f5f Sync chunks of tsan_interceptors.cc with LLVM rev. 74760bb00fb9b78a2fe122
Sync tsan_interceptors.cc with upstream file tsan_interceptors_posix.cpp.

Changes:
 - define fileno_unlocked() for NetBSD
 - use defined __sanitizer_FILE for NetBSD
 - handle symbol indirection for vfork and nanosleep
 - delete sem_* API, currently moved to common code with sanitizers
 - undef SANITIZER_INTERCEPT_PTHREAD_SIGMASK to fix build
 - remove locally introduced SANITIZER_NETBSD

With these changes, TSan for GCC builds.
2020-09-12 22:23:57 +00:00
kamil
f6a496b345 Remove dead code block (from a local patch) 2020-09-12 21:30:36 +00:00
kamil
4bd8828721 Sync interceptors of sanitizers with LLVM rev. 00460ae520
Use the 2020-09-10 snapshot to replace two-years-old GCC9 copy of
interceptors.

With this change, ASan works with the locally patched GCC tree (as there
were IOCTL operations not properly defined).
2020-09-12 15:01:38 +00:00
mrg
c823d03c48 __mips64 does not mean 64 bit address space. also check _LP64. 2020-09-11 09:01:41 +00:00
rin
8f02e7cc73 Update table for alpha, m68000, m68k, and powerpc:
- alpha is running and no regression in ATF (tests in lib/libc/sys are
  skipped due to port-alpha/55652).

- m68000 is successfully built and running at a same level as before.

- m68k (amiga, mac68k, sun3) is running and no regression in a tiny
  subset of ATF (kernel, lib/libc/{gen,sys}).

- macppc (oea) and evbppc (booke, ibm4xx) are running and no regression
  in ATF.
2020-09-11 05:24:14 +00:00
kamil
fba137c2fa Add prototypes of internal_sigdelset() and internal_clone()
Cherry-pick the missing change from:

commit 983d7ddd0b278b45d815cbac9197205b39c4860a
Author: Kamil Rytarowski <n54@gmx.com>
Date:   Thu Jul 11 06:22:35 2019 +0000

    Add NetBSD LSan support

    Summary:
    Combine few relatively small changes into one:

     - implement internal_ptrace() and internal_clone() for NetBSD
     - add support for stoptheworld based on the ptrace(2) API
     - define COMPILER_RT_HAS_LSAN for NetBSD
     - enable tests for NetBSD/amd64

    Inspired by the original implementation by Christos Zoulas in netbsd/src for GCC.

    The implementation is in theory CPU independent through well defined macros
    across all NetBSD ports, however only the x86_64 version was tested.

    Reviewers: mgorny, dvyukov, vitalybuka, joerg, jfb

    Reviewed By: vitalybuka

    Subscribers: dexonsmith, jfb, srhines, kubamracek, llvm-commits, christos

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64057

    llvm-svn: 365735
2020-09-11 01:45:53 +00:00
kamil
a2d7733122 Add getauxval() compat for NetBSD
Cherry-pick and adapt:

commit 02519fc7a6f8c528f67975a9f78ce64dabf402b4
Author: Kamil Rytarowski <n54@gmx.com>
Date:   Thu Sep 12 18:57:58 2019 +0000

    Add getauxval() compat for NetBSD

    Summary:
    getauxval() is not available on NetBSD and there is no a direct equivalent.

    Add a function that implements the same semantics with NetBSD internals.

    Reorder the GetPageSize() functions to prefer the sysctl approach for NetBSD.
    It no longer makes a difference which approach is better. Avoid changing
    conditional code path.

    Reviewers: vitalybuka, dvyukov, mgorny, joerg

    Reviewed By: vitalybuka

    Subscribers: llvm-commits, #sanitizers

    Tags: #sanitizers, #llvm

    Differential Revision: https://reviews.llvm.org/D67329

    llvm-svn: 371758
2020-09-11 01:08:36 +00:00
kamil
6db3e45ad2 Use sysctl to implement GetPageSize()
Cherry-pick code chunk from newer LLVM compiler-rt.
2020-09-11 01:07:53 +00:00
kamil
69763b91ed Enable SANITIZER_CAN_USE_PREINIT_ARRAY on NetBSD
Cherry-pick:

commit 3a189bac9bb111c9a59339015ab0d4e2fed735f4
Author: Kamil Rytarowski <n54@gmx.com>
Date:   Thu Dec 19 03:21:46 2019 +0100

    [compiler-rt] Enable SANITIZER_CAN_USE_PREINIT_ARRAY on NetBSD

    .preinit_array is supported since 9.0.
2020-09-11 01:07:27 +00:00
kamil
86bc1e72b9 Adapt stop-the-world for ptrace changes in NetBSD-9.99.30
Cherry-pick and adapt:

commit fc356dcc11c10003ff22acff667b0a9f5e6c1e0f
Author: Kamil Rytarowski <n54@gmx.com>
Date:   Tue Dec 24 20:33:54 2019 +0100

    [compiler-rt] Adapt stop-the-world for ptrace changes in NetBSD-9.99.30

    Handle PT_LWPNEXT for newer kernels and keep PT_LWPINFO for older ones.
2020-09-11 01:07:00 +00:00
kamil
39b6a894c0 Add NetBSD LSan support
Cherry-pick and adapt:

commit 983d7ddd0b278b45d815cbac9197205b39c4860a
Author: Kamil Rytarowski <n54@gmx.com>
Date:   Thu Jul 11 06:22:35 2019 +0000

    Add NetBSD LSan support

    Summary:
    Combine few relatively small changes into one:

     - implement internal_ptrace() and internal_clone() for NetBSD
     - add support for stoptheworld based on the ptrace(2) API
     - define COMPILER_RT_HAS_LSAN for NetBSD
     - enable tests for NetBSD/amd64

    Inspired by the original implementation by Christos Zoulas in netbsd/src for GCC.

    The implementation is in theory CPU independent through well defined macros
    across all NetBSD ports, however only the x86_64 version was tested.

    Reviewers: mgorny, dvyukov, vitalybuka, joerg, jfb

    Reviewed By: vitalybuka

    Subscribers: dexonsmith, jfb, srhines, kubamracek, llvm-commits, christos

    Tags: #llvm

    Differential Revision: https://reviews.llvm.org/D64057

    llvm-svn: 365735
2020-09-11 01:05:28 +00:00
kamil
f445ab3a7e Stop tracking atexit/__cxa_atexit/pthread_atfork allocations in LSan/NetBSD
Cherry-pick and adapt:

commit 8827047551570b7ed7088765c3de2a8cce6823b8
Author: Kamil Rytarowski <n54@gmx.com>
Date:   Sat Sep 21 07:30:42 2019 +0000

    Stop tracking atexit/__cxa_atexit/pthread_atfork allocations in LSan/NetBSD

    Summary:
    The atexit(3) and __cxa_atexit() calls allocate internally memory and free on exit,
    after executing all callback. This causes false positives as DoLeakCheck() is called
    from the atexit handler. In the LSan/ASan tests there are strict checks triggering
    false positives here.

    Intercept all atexit(3) and __cxa_atexit() calls and disable LSan when calling the
    real functions.

    Stop tracing allocations in pthread_atfork(3) funtions, as there are performed
    internal allocations that are not freed for the time of running StopTheWorld()
    code. This avoids false-positives.

    The same changes have to be replicated in the ASan and LSan runtime.

    Non-NetBSD OSs are not tested and this code is restricted to NetBSD only.

    Reviewers: dvyukov, joerg, mgorny, vitalybuka, eugenis

    Reviewed By: vitalybuka

    Subscribers: jfb, llvm-commits, #sanitizers

    Tags: #sanitizers, #llvm

    Differential Revision: https://reviews.llvm.org/D67331

    llvm-svn: 372459
2020-09-11 01:04:33 +00:00
kamil
31e31781c6 Add __lsan::ScopedInterceptorDisabler for strerror(3)
Cherry-pick and adapt:

commit 1b58389428ed07a7322ba9c2bcaeec99807f9457
Author: Kamil Rytarowski <n54@gmx.com>
Date:   Sat Sep 21 07:45:02 2019 +0000

    Add __lsan::ScopedInterceptorDisabler for strerror(3)

    Summary:
    strerror(3) on NetBSD uses internally TSD with a destructor that is never
    fired for exit(3). It's correctly called for pthread_exit(3) scenarios.

    This is a case when a leak on exit(3) is expected, unavoidable and harmless.

    Reviewers: joerg, vitalybuka, dvyukov, mgorny

    Reviewed By: vitalybuka

    Subscribers: dmgreen, kristof.beyls, jfb, llvm-commits, #sanitizers

    Tags: #sanitizers, #llvm

    Differential Revision: https://reviews.llvm.org/D67337

    llvm-svn: 372461
2020-09-11 01:03:31 +00:00
kamil
a476aad3c2 Disable sanitizer_stoptheworld_linux_libcdep.cc for NetBSD 2020-09-11 01:01:14 +00:00
kamil
47333b4890 Avoid using internal RTLD/libpthread/libc symbol in sanitizers
Cherry-pick and adapt:

commit 0da15ff318480f30bbc90b9e8ecb9bb9431c7fd3
Author: Kamil Rytarowski <n54@gmx.com>
Date:   Fri Jan 3 02:35:33 2020 +0100

    [compiler-rt] [netbsd] Switch to syscall for ThreadSelfTlsTcb()

    This change avoids using internal, namespaced per-CPU calls that
    are not a stable interface to read the TSL base value.
2020-09-10 12:53:05 +00:00
mrg
02f683bda2 fix path for largefile-config.h 2020-09-09 09:52:16 +00:00
mrg
71ddf99ad7 add build rules for G_CPP17_SOURCES sources, and fix their build. 2020-09-09 09:49:16 +00:00
mrg
248797713d regen for sparc and binutils 2.34. 2020-09-09 09:10:52 +00:00
mrg
66bd25a419 regen gcc 9.3 / arm64eb for includes fixes.
also fixes a bunch of configuration (like finding acosf() etc.)
2020-09-09 08:22:04 +00:00
mrg
c5ada2fa0b mknative-gcc for everything except arm64be: includes fixes 2020-09-09 07:27:45 +00:00
mrg
154bfe8e08 install new libstdc++ pstl headers. remove some dead makefile
code and consolidate some of the header installation.
2020-09-09 07:23:45 +00:00
mrg
5d7c2fdd95 ia64 works, sun3 (m68k?) works, powerpc works, note powerpc64 issue,
evbarmv7-eb dtb issue, prep overflow issue, note that almost all
platform builds are now working for m68k/mips/ppc.
2020-09-07 23:47:02 +00:00
mrg
6b90dfb69d use the generic ppc64 LINK_GCC_C_SEQUENCE_SPEC. 2020-09-07 22:21:55 +00:00
dogcow
1a71ad483f Fix build.sh tools -j1 compilation, where bfd.h wasn't generated early
enough.
2020-09-07 19:46:45 +00:00
mrg
2bc6576ee5 more updates:
- more arm stuff builds
- 32 bit mips builds and kernels run
- mips64el builds
- powerpc (walnut) kernels run
2020-09-07 10:42:58 +00:00
mrg
e9ae3901e6 asan_interceptors.cc needs -O1 for mipsel/mipseb. 2020-09-07 09:09:40 +00:00
mrg
4dc66dd97f various updates:
- most builds are working
- arm64, amd64, sparc, evbmips64-eb, and armv7hf-el are known to be
  stable and work
- mips64-el needs new binutils, in testing
- vax, sh3*, riscv64 and mipse[lb] builds are broken in various ways
2020-09-07 07:43:36 +00:00
mrg
3aea87db6a avoid returning stack garbage on platforms that don't have either
__lwp_gettcb_fast() or __lwp_getprivate_fast().
2020-09-07 07:10:43 +00:00
mrg
79b5664c2b update status for several ports that now mostly build (perhaps with
some uncommited changes.)
2020-09-07 00:38:14 +00:00
mrg
ec02653d43 re-gen. 2020-09-07 00:37:23 +00:00
mrg
86288e60b9 apply -Wno-error=alloca-larger-than= for GCC 9. 2020-09-07 00:24:17 +00:00
mrg
3d9a34f72e fix for netbsd/mips. 2020-09-07 00:22:51 +00:00
jakllsch
d1868e6ec7 mknative-gcc for gcc 9.3.0 and aarch64eb 2020-09-06 23:23:21 +00:00
christos
dfab1b7eb2 comment out ioctl that is only defined for the kernel 2020-09-06 17:15:09 +00:00
mrg
701bf241fe note that aarch64, earm*, sh3*, sparc*, vax, and x86-64 are
slightly updated in status.  x86-64 and sparc and mips64-eb
all appear to work well enough to complete or get well into
an atf run (still going.)

note first ICE segv on sh3
2020-09-06 13:06:03 +00:00
mrg
472eadc88c re-port to netbsd/sparc*
fix build on non-constant pagesize platforms and for dkbad.
2020-09-06 10:55:16 +00:00