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
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.
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.
- 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
- 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
- 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
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.
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.
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)
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
(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.
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.
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.
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.
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.
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.
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.
- 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
- add 'switched' column to port list
- update many working ports
- add a second list of cpus vs. ports that have been tested to build
remaining issues:
- eabi arm vs libgcc
- vax-gcc ICE
- ppc64-gcc ICE
- sun2 build
- ia64 libgcc
- sh3 vs. compiler_rt: udivmoddi4.c:190: undefined reference to `abort'
- x68k memswitch triggers new warnings
- sun3 bloated
- mips64* has ./usr/lib/64/libgomp.so.2 as a missing file in sets
/*
* NetBSD/sparc64 long ago defined signed and unsigned fast{8,16,32} to be
* different to the common sparc64 definitions, and they are not the same
* size for the same bitsize. GCC 7 introduced checks that they are the
* same size below that trigger here.
*
* NETBSD_TOOLS/NETBSD_NATIVE is wrong for this, but it will do for now.
*/
- alpha, i386, powerpc, sparc64 all seem to work too, though sparc64
has a caveat with signed vs. unsigned "fast" integer types, and its
ramdisk overflows.
- hppa almost works. 1 uncommited change, ramdisk overflows.
- m68k begins to work.
replies upon an uncommited (yet) change to not assert if the size
of unsigned and signed 'fast' integer types are not the same.
we don't have them as the same for 8, 16 and 32 bit for some reason.
otherwise seems to work.
- move -std=* handling, besides the list in CXX11_ALWAYS, to
libsupc++/Makefile.common
- include the arch defs.mk to obtain ${G_*_SOURCES} and use them
for -std= setting
- make sure VER_CPPFLAGS is applied to all required files
- add ADD_FRONTEND_LIBRARY to avoid linking libfrontend, while
using the rest of this fragment
to build with GCC7:
revision 1.3
date: 2017-07-22 13:52:52 -0700; author: joerg; state: Exp; lines: +2 -1; commitid: gesFYL8PorhYCg0A;
One more missing check for DECL_INITIAL being non-NULL.
revision 1.2
date: 2017-07-17 12:53:10 -0700; author: joerg; state: Exp; lines: +2149 -1573; commitid: fxGaJg3EuIcnsCZz;
branches: 1.2.2;
A const declaration with explicit section attribute should create a
read-only section, whether it is initialized or not.
XXX: i may have merged them wrongly into gcc7, but AFAICT, they're
expecting to use named BSS sections, so this seems wrong now anyway.
joerg, please feel free to check :-)
gthr-default.h source be found. fix installing the symlink.
- -Wno-error=incompatible-pointer-types needed for libgomp/lock.c
- build new libsupc++ files with -std=gnu++1z
- install new libstdc++ bits files. (XXX use bits_sup_headers
from libstdc++/include/Makefile.am with mknative-gccm)
- start to get libstdc++ to build: various flag updates.
The non-standard C++0x type traits has_trivial_default_constructor,
has_trivial_copy_constructor and has_trivial_copy_assign have been
removed.
On ARM targets (arm*-*-*), a bug introduced in GCC 5 that affects
conformance to the procedure call standard (AAPCS) has been fixed.
Many optimiser improvements
DWARF-5 support.
Many new and enhanced warnings.
Warnings about format strings now underline the pertinent part of
the string, and can offer suggested fixes.
Several new warnings related to buffer overflows and buffer
truncation.
New __builtin_add_overflow_p, __builtin_sub_overflow_p,
__builtin_mul_overflow_p built-ins added that test for overflow.
The C++ front end has experimental support for all of the current
C++17 draft.
The -fverbose-asm option has been expanded to prints comments
showing the source lines that correspond to the assembly.
The gcc and g++ driver programs will now provide suggestions for
misspelled arguments to command-line options.
AArch64 specific:
GCC has been updated to the latest revision of the procedure call
standard (AAPCS64) to provide support for parameter passing when
data types have been over-aligned.
The ARMv8.2-A and ARMv8.3-A architecture are now supported.
ARM specific:
Support for the ARMv5 and ARMv5E architectures has been
deprecated (which have no known implementations).
A new command-line option -mpure-code has been added. It does not
allow constant data to be placed in code sections.
x86 specific:
Support for the AVX-512 4FMAPS, 4VNNIW, VPOPCNTDQ and Software
Guard Extensions (SGX) ISA extensions has been added.
PPC specific:
GCC now diagnoses inline assembly that clobbers register r2.
RISC-V specific:
Support for the RISC-V instruction set has been added.
SH specific:
Support for SH5/SH64 has been removed.
Support for SH2A has been enhanced.
PR toolchain/53684
PR toolchain/53685
No one defines TARGET_DEFAULT_CPU anymore. Use ENABLE_SHARED_LIBGCC
instead to determine whether GCC is configured for m68k or m68000.
This fixes C++ binaries on m68k, that require libgcc_s.
OK mrg
- move MD lwp "md_ktf" member into struct pcb. the pcb is used by
the gdb "bsd-kvm" target code to find the stack of each thread
and needs to be available in a well known location.
- implement aarch64_nbsd_supply_pcb() in GDB. makes basic gdb work
on a crash dump.
- remove '#if L_MD_KTF + 8 == L_MD_CPACR' conditional code, as there
is no more L_MD_KTF.
with this gdb has minimal working functionality with "target kvm",
and crash can at least "ps" on a crash dump.
ok skrll.
- publish per-cpu data
- publish a whole bunch of info in struct aarch64_sysctl_cpu_id
instead of various individual nodes (there are 16 total.)
- add MIDR extractor bits
- define ARMv8.2-A id_aa64mmfr2_el1 and id_aa64zfr0_el1 regs,
but avoid using them until we make sure they exist. (these
members are added to aarch64_sysctl_cpu_id to avoid future
compat issues.)
the arm32 and aarch32 version of these need to be adjusted as
well (and aarch32 data published at all.) still trying to
work out how to make the same userland binary running on a
real arm32 or an aarch32 system can work sanely here.
ok ryo@.
2.31.1 Release point.
2018-07-18 Nick Clifton <nickc@redhat.com>
* (DEVO_SUPPORT): Fix typo in previous delta.
(do_proto_toplev): Add --quiet option to configure command line.
2018-07-16 Nick Clifton <nickc@redhat.com>
* src-release.sh (DEVO_SUPPORT): Add test-driver and ar-lib.
2018-07-06 Sebastian Huber <sebastian.huber@embedded-brains.de>
* config.sub: Sync with upstream version 2018-07-03.
2018-07-05 Sebastian Huber <sebastian.huber@embedded-brains.de>
* config.guess: Sync with upstream version 2018-06-26.
* config.sub: Sync with upstream version 2018-07-02.
2018-06-24 Nick Clifton <nickc@redhat.com>
* configure: Regenerate.
2018-06-19 Simon Marchi <simon.marchi@ericsson.com>
* libtool.m4: Use AC_LANG_SOURCE.
* configure.ac: Remove AC_PREREQ, use AC_LANG_SOURCE.
* README-maintainer-mode: Update version requirements.
* ar-lib: New file.
* test-driver: New file.
* configure: Re-generate.
2018-06-18 Eric Botcazou <ebotcazou@adacore.com>
* Makefile.def (fortran): Add check-target-libgomp-fortran.
* Makefile.tpl (check-target-libgomp-fortran): New phony target.
* Makefile.in: Regenerate.
* configure: Regenerate.
2018-06-18 Simon Marchi <simon.marchi@ericsson.com>
* configure.ac: Sync with GCC, remove MPX-related things.
2018-05-01 Nick Clifton <nickc@redhat.com>
* config.guess: Synchronize with config project master sources.
* config.sub: Likewise.
2018-05-01 Francois H. Theron <francois.theron@netronome.com>
* configure.ac: Added "nfp" target.
* configure: Regenerate.
2018-02-13 Maciej W. Rozycki <macro@mips.com>
* configure.ac <wasm32-*-*> (noconfigdirs): Add `ld'.
* configure: Regenerate.
2018-01-30 Nick Clifton <nickc@redhat.com>
* src-release.sh (do_proto_toplev): Add patterns for more junk files
to delete before creating the tarball.
2018-01-29 Nick Clifton <nickc@redhat.com>
* src-release.sh (do_proto_toplev): Strip patch remnant files from
the sources before creating the tarball.
2018-01-13 Nick Clifton <nickc@redhat.com>
* src-release.sh: Update copyright notice. Change reference to devo
to be a reference to root.
--
redo mknative-gcc for all ports. main changes include:
- "#define HAVE_CC_TLS 1" for most/all ports, thanks maya@
- "#define _GLIBCXX_HAVE_LDEXPL 1" and "#define _GLIBCXX_HAVE_TGMATH_H 1"
for many ports
- arm64 and amd64 had a broken c++config.h that disabled many things
- configargs.h has more normalisation
- ppc64 has a few things fixed, must have missed several mknative rounds
--
regen to pull out INTERNAL_CFLAGS.
--
pull -DHAVE_CC_TLS out of $(INTERNAL_CFLAGS) if it is there, and add
it to CPPFLAGS.
this fixes PR#53567 for me.
- "#define HAVE_CC_TLS 1" for most/all ports, thanks maya@
- "#define _GLIBCXX_HAVE_LDEXPL 1" and "#define _GLIBCXX_HAVE_TGMATH_H 1"
for many ports
- arm64 and amd64 had a broken c++config.h that disabled many things
- configargs.h has more normalisation
- ppc64 has a few things fixed, must have missed several mknative rounds
This currently results in most binaries being broken. Give more time to
debug without -current being badly broken.
The reverted commit message was:
PT_PHDR is useful without PT_INTERP, i.e. for static PIE. It removes the
need for platform-specific computations of _DYNAMIC and friends.
ok martin, mrg
Committed By: christos
Date: Sun Jul 8 16:53:56 UTC 2018
Modified Files:
src/external/gpl3/binutils/dist/bfd: config.bfd
src/external/gpl3/binutils/lib/libbfd/arch/i386: defs.mk
Log Message:
enable coff/pe executable vectors for i386 for the efi bootblocks.
XXX: pullup-8
to binutils.old (which is what i386 is using). Should unbreak the build.