Commit Graph

52 Commits

Author SHA1 Message Date
Iain Buclaw
1e78c638a7 libphobos: Merge upstream druntime 5bb8ce19
Synchronizes extern(C) bindings with latest release.

Reviewed-on: https://github.com/dlang/druntime/pull/2741

libphobos/ChangeLog:

	* libdruntime/Makefile.am (DRUNTIME_DSOURCES_BIONIC): Add
	core/sys/bionic/string.d.
	(DRUNTIME_DSOURCES_DARWIN): Add core/sys/darwin/string.d.
	(DRUNTIME_DSOURCES_DRAGONFLYBSD): Add core/sys/dragonflybsd/string.d,
	core/sys/dragonflybsd/sys/socket.d.
	(DRUNTIME_DSOURCES_FREEBSD): Add core/sys/freebsd/string.d.
	(DRUNTIME_DSOURCES_LINUX): Add core/sys/linux/string.d.
	(DRUNTIME_DSOURCES_NETBSD): Add core/sys/netbsd/string.d,
	core/sys/netbsd/sys/featuretest.d.
	* libdruntime/Makefile.in: Regenerate.

From-SVN: r274773
2019-08-21 07:54:34 +00:00
Iain Buclaw
0234a9176c libphobos: Merge upstream druntime 94686651
Adds extern(C) bindings for version OpenBSD.

Reviewed-on: https://github.com/dlang/druntime/pull/2748

libphobos/ChangeLog:

	* libdruntime/Makefile.am (DRUNTIME_DSOURCES_OPENBSD): Add
	core/sys/openbsd/sys/cdefs.d, core/sys/openbsd/sys/elf.d,
	core/sys/openbsd/sys/elf32.d, core/sys/openbsd/sys/elf64.d,
	core/sys/openbsd/sys/elf_common.d, core/sys/openbsd/sys/link_elf.d,
	core/sys/openbsd/sys/mman.d, core/sys/openbsd/time.d.
	* libdruntime/Makefile.in: Regenerate.

From-SVN: r274772
2019-08-21 07:54:19 +00:00
Iain Buclaw
e5d0ba591e d/dmd: Merge upstream dmd f8e38c001
Fixes bug where foreach(int) doesn't work on BigEndian targets by
deprecating the use of index types smaller than a size_t/ptrdiff_t.

Reviewed-on: https://github.com/dlang/dmd/pull/10009

From-SVN: r272350
2019-06-16 07:50:07 +00:00
Iain Buclaw
ca0ddb398f libphobos: Fix multilib builds for s390x-linux-gnu
Merges upstream druntime aab44549, phobos 3dc363783.

Reviewed-on: https://github.com/dlang/druntime/pull/2590
	     https://github.com/dlang/phobos/pull/6983

libphobos/ChangeLog:

2019-04-28  Iain Buclaw  <ibuclaw@gdcproject.org>

	* libdruntime/gcc/sections/elf_shared.d (IBMZ_Any): Define when
	version S390 or SystemZ.  Use condition instead of SystemZ.
	(getTLSRange): Return null on GNU_EMUTLS targets.

From-SVN: r270639
2019-04-29 05:42:48 +00:00
Iain Buclaw
be79ec008e libphobos: Backport minimal MinGW support patches.
Merges upstream druntime 1ca80e4e, phobos b5e9661a0.

Reviewed-on: https://github.com/dlang/druntime/pull/2587
	     https://github.com/dlang/phobos/pull/6981

From-SVN: r270638
2019-04-29 05:42:36 +00:00
Iain Buclaw
9125dc3292 libphobos: Fix segfault in runtime caused by unexpected GC of TLS data.
libphobos/ChangeLog:

2019-04-25  Iain Buclaw  <ibuclaw@gdcproject.org>

	PR d/90250
	* libdruntime/gcc/sections/elf_shared.d (initTLSRanges): Populate
	_tlsRanges in every startup thread.
	* testsuite/libphobos.thread/thread.exp: Load libphobos-dg.exp.
	* testsuite/libphobos.thread/tlsgc_sections.d: New test.

From-SVN: r270576
2019-04-25 15:31:35 +00:00
Johannes Pfau
9168f22057 D: Implement GCC emutls in druntime
* libdruntime/Makefile.am: Add emutls and gthread files.
* libdruntime/Makefile.in: Regenerate.
* libdruntime/gcc/emutls.d: New file. Implement GC-compatible emutls.
* libdruntime/gcc/gthread.d: New file.
* libdruntime/gcc/sections/elf_shared.d: Integrate emutls support.
* testsuite/libphobos.allocations/tls_gc_integration.d: New test for
TLS.

From-SVN: r270568
2019-04-25 11:11:39 +00:00
Iain Buclaw
2493e71815 libphobos: Fix linker warning and SEGV in core.thread tests.
The monolithic core/threadasm.S source has been removed, and split into
multiple parts, one for each intended target CPU/OS.

Added .type and .size directives for all asm implementations of
fiber_switchContent and callWithStackShell where they were missing.

libphobos/ChangeLog:

2019-04-25  Iain Buclaw  <ibuclaw@gdcproject.org>

	PR d/90086
	* m4/druntime/cpu.m4 (DRUNTIME_CPU_SOURCES): New macro.
	* configure.ac: Use it.
	* configure: Regenerate.
	* libdruntime/Makefile.am: Add new config sources to
	DRUNTIME_SOURCES_CONFIGURED.
	* libdruntime/Makefile.in: Regenerate.
	* libdruntime/config/aarch64/switchcontext.S: New file.
	* libdruntime/config/arm/switchcontext.S: New file.
	* libdruntime/config/common/threadasm.S: New file.
	* libdruntime/config/mingw/switchcontext.S: New file.
	* libdruntime/config/mips/switchcontext.S: New file.
	* libdruntime/config/powerpc/switchcontext.S: New file.
	* libdruntime/config/powerpc64/callwithstack.S: New file.
	* libdruntime/config/x86/switchcontext.S: New file.
	* libdruntime/core/threadasm.S: Remove.

From-SVN: r270560
2019-04-24 22:46:59 +00:00
Iain Buclaw
58990c4d3a libphobos: Fix FAIL phobos.exp/core.time on CentOS 5.11, Linux 2.6.18
Merges upstream druntime e03164b5.

Reviewed-on: https://github.com/dlang/druntime/pull/2581

libphobos/ChangeLog:

2019-04-24  Iain Buclaw  <ibuclaw@gdcproject.org>

	PR d/89432
	* testsuite/lib/libphobos.exp (check_effective_target_linux_pre_2639):
	New proc.
	* testsuite/libphobos.druntime/druntime.exp: Add compiler flag
	-fversion=Linux_Pre_2639 if target is linux_pre_2639.
	* testsuite/libphobos.druntime_shared/druntime_shared.exp: Likewise.

From-SVN: r270554
2019-04-24 18:57:36 +00:00
Iain Buclaw
9e1558d322 libphobos: Fix assert in core.sys.posix.sys.stat for aarch64/ilp32.
Merges upstream druntime 51365217.

Reviewed-on: https://github.com/dlang/druntime/pull/2579

From-SVN: r270541
2019-04-24 11:04:22 +00:00
Iain Buclaw
130cc10e21 libphobos: Add D support for S/390 Linux
gcc/d/ChangeLog:

2019-04-23  Iain Buclaw  <ibuclaw@gdcproject.org>
	    Robin Dapp  <rdapp@linux.ibm.com>

	* typeinfo.cc (create_typeinfo): Write typeinfo flags as uint.

gcc/testsuite/ChangeLog:

2019-04-23  Iain Buclaw  <ibuclaw@gdcproject.org>
	    Robin Dapp  <rdapp@linux.ibm.com>

	* gdc.dg/link.d: Test if target d_runtime.
	* gdc.dg/runnable.d: Fix tests to work on BigEndian.
	* gdc.dg/simd.d: Likewise.

libphobos/ChangeLog:

2019-04-23  Iain Buclaw  <ibuclaw@gdcproject.org>
	    Robin Dapp  <rdapp@linux.ibm.com>

	* configure.tgt: Add s390*-linux* as a supported target.
	* libdruntime/gcc/sections/elf_shared.d: import gcc.builtins.
	(__tls_get_addr_internal): Declare.
	(TLS_DTV_OFFSET): Define as zero on SystemZ.
	(getTLSRange): Support getting TLS on SystemZ.
	* testsuite/libphobos.typeinfo/struct-align.d: New test.

Co-Authored-By: Robin Dapp <rdapp@linux.ibm.com>

From-SVN: r270523
2019-04-23 22:53:25 +00:00
Iain Buclaw
d9392bfa03 libphobos: Add D support for RISC-V Linux
2019-04-23  Iain Buclaw  <ibuclaw@gdcproject.org>

	* configure.tgt: Add riscv*-*-linux* as supported target.
	* libdruntime/gcc/sections/elf_shared.d (getDependencies): Adjust
	dlpi_addr on RISCV32 and RISCV64.
	* src/std/math.d: Add IEEE FPU control support for RISCV.

From-SVN: r270522
2019-04-23 22:53:12 +00:00
Iain Buclaw
c7bfed18df re PR d/90079 (SEGV in _aaKeys, _aaValues on 32-bit SPARC)
PR d/90079
libphobos: Fix SEGV in _aaKeys, _aaValues on 32-bit SPARC

Merges upstream druntime b43203a1

Reviewed-on: https://github.com/dlang/druntime/pull/2572

From-SVN: r270514
2019-04-23 15:19:55 +00:00
Ramana Radhakrishnan
48528842bd re PR target/89093 (C++ exception handling clobbers d8 VFP register)
PR target/89093
	* config/arm/arm.c (aapcs_vfp_is_call_or_return_candidate): Diagnose
	if used with general-regs-only.
	(arm_conditional_register_usage): Don't add non-general regs if
	general-regs-only.
	(arm_valid_target_attribute_rec): Handle general-regs-only.
	* config/arm/arm.h (TARGET_HARD_FLOAT): Return false if
	general-regs-only.
	(TARGET_HARD_FLOAT_SUB): Define.
	(TARGET_SOFT_FLOAT): Define as negation of TARGET_HARD_FLOAT_SUB.
	(TARGET_REALLY_IWMMXT): Add && !TARGET_GENERAL_REGS_ONLY.
	(TARGET_REALLY_IWMMXT2): Likewise.
	* config/arm/arm.opt: Add -mgeneral-regs-only.
	* doc/extend.texi: Document ARM general-regs-only target.
	* doc/invoke.texi: Document ARM -mgeneral-regs-only.
libgcc/
	* config/arm/pr-support.c: Add #pragma GCC target("general-regs-only").
	* config/arm/unwind-arm.c: Likewise.
	* unwind-c.c (PERSONALITY_FUNCTION): Add general-regs-only target
	attribute for ARM.
libobjc/
	* exception.c (PERSONALITY_FUNCTION): Add general-regs-only target
	attribute for ARM.
libphobos/
	* libdruntime/gcc/deh.d: Import gcc.attribute.
	(personality_fn_attributes): New enum.
	(scanLSDA, CONTINUE_UNWINDING, gdc_personality, __gdc_personality):
	Add @personality_fn_attributes.
libstdc++-v3/
	* libsupc++/eh_personality.cc (PERSONALITY_FUNCTION): Add
	general-regs-only target attribute for ARM.

Co-Authored-By: Bernd Edlinger <bernd.edlinger@hotmail.de>
Co-Authored-By: Jakub Jelinek <jakub@redhat.com>

From-SVN: r270504
2019-04-23 12:03:41 +02:00
Iain Buclaw
eb5f748a81 libphobos: Merge upstream druntime 109f0f2e
Backports more extern(C) bindings and platform ports.

Reviewed-on: https://github.com/dlang/druntime/pull/2569

From-SVN: r270490
2019-04-22 13:46:13 +00:00
Iain Buclaw
6d679a7d9d libphobos: Merge upstream druntime 4b2674b3
Adds version (BacktraceExternal) for using libexecinfo instead of
internal implementation on FreeBSD, NetBSD, and DragonFly.

Reviewed-on: https://github.com/dlang/druntime/pull/2560

From-SVN: r270482
2019-04-21 10:02:02 +00:00
Iain Buclaw
0aa94749cb libphobos: core.atomic should have fallback when there's no libatomic.
libphobos/ChangeLog:

2019-04-20  Iain Buclaw  <ibuclaw@gdcproject.org>

	PR d/89293
	* libdruntime/core/atomic.d (casImpl): Remove static assert for
	GNU_Have_Atomics, add static path to handle missing atomic support.
	(atomicLoad): Likewise.
	(atomicStore): Likewise.
	(atomicFence):  Likewise.
	(atomicMutexHandle, AtomicMutex): Declare types.
	(_getAtomicMutex): New function.
	(getAtomicMutex): Declare.

From-SVN: r270470
2019-04-20 17:14:50 +00:00
Iain Buclaw
7262646b3b Backport PRs 90059, 90060, 90062
PR d/90059
	PR d/90060
	PR d/90062
libphobos: Merge upstream druntime 70b9fea6

Backports fixes in the extern(C) bindings for the Solaris/SPARC port.

Initial patch by Rainer Orth.

Reviewed-on: https://github.com/dlang/druntime/pull/2555

From-SVN: r270372
2019-04-15 20:32:50 +00:00
Rainer Orth
235d1c467b Work around lack of dlpi_tls_modid before Solaris 11.5
2019-04-14  Rainer Orth  <ro@CeBiTec.Uni-Bielefeld.DE>
	    Iain Buclaw  <ibuclaw@gdcproject.org>

	PR d/88150
	* m4/druntime/os.m4 (DRUNTIME_OS_DLPI_TLS_MODID): New macro.
	* configure.ac: Use it.
	Call AC_USE_SYSTEM_EXTENSIONS.
	* configure: Regenerate.
	* Makefile.in, libdruntime/Makefile.in, src/Makefile.in,
	testsuite/Makefile.in: Regenerate.
	* libdruntime/gcc/config.d.in (OS_Have_Dlpi_Tls_Modid): Define.
	* libdruntime/gcc/sections/elf_shared.d: Import gcc.config.
	(scanSegments) <PT_TLS> [OS_Have_Dlpi_Tls_Modid]: Use
	dlpi_tls_modid.
	[Solaris]: Use dlinfo(RTLD_DI_LINKMAP) to get rt_tlsmodid.
	Otherwise clear pdso._tlsMod, pdso._tlsSize.
	(getTLSRange) [Solaris && !OS_Have_Dlpi_Tls_Modid]: Readjust mod.

Co-Authored-By: Iain Buclaw <ibuclaw@gdcproject.org>

From-SVN: r270347
2019-04-14 09:30:42 +00:00
Rainer Orth
ba838aa6c3 Work around Solaris ld bug linking __tls_get_addr on 64-bit x86
* m4/druntime/os.m4 (DRUNTIME_OS_LINK_SPEC): New macro.
	* configure.ac: Call it.
	* configure: Regenerate.
	* Makefile.in, libdruntime/Makefile.in, src/Makefile.in,
	testsuite/Makefile.in: Regenerate.
	* src/libgphobos.spec.in (*link): Append OS_LINK_SPEC.

From-SVN: r270346
2019-04-14 09:24:26 +00:00
Rainer Orth
4d51312053 Use gcc/sections/elf_shared.d on Solaris 11.5 (PR d/88150)
PR d/88150
	* libdruntime/gcc/sections/elf_shared.d [Solaris] (SharedELF): Set
	to true.
	Import core.sys.solaris.dlfcn, core.sys.solaris.link,
	core.sys.solaris.sys.elf, core.sys.solaris.sys.link.
	(dummy_ref): Declare.
	(initSections): Initialize dummy_ref.
	(getDependencies): Set strtab.
	(handleForName): Don't dlclose handle.
	(findDSOInfoForAddr): Set IterateManually.
	(getprogname): Declare.
	(progname): Use it.
	* libdruntime/gcc/sections/package.d [Solaris]: Import
	gcc.sections.elf_shared instead of gcc.sections.solaris.
	* libdruntime/gcc/sections/solaris.d: Remove.
	* libdruntime/Makefile.am (DRUNTIME_DSOURCES): Remove
	gcc/sections/solaris.d.

From-SVN: r270345
2019-04-14 09:18:42 +00:00
Iain Buclaw
8b6518285b libphobos: Move rt.sections modules to gcc.sections
These modules depend on a mixture between how the compiler emits
run-time module information, and what functions are exposed by the
platform to inquire about loaded global and thread-local data sections.

As the upstream implementation is written to work only with how the
reference D compiler writes out data, much of what is present does not
apply to the GCC D front-end.  So it has been moved to a non-upstream
location in the source tree, where most of it will be rewritten once
each port has been completed.

The only tested module sections/elf_shared.d has been cleaned up so that
all deprecated declarations have been removed, as well as the brittle
module collision checking, which required bss_sections.c.  All other
ports have been left unchanged apart from a commonizing of attributes.

libphobos/ChangeLog:

2019-04-13  Iain Buclaw  <ibuclaw@gdcproject.org>

	* libdruntime/Makefile.am (DRUNTIME_CSOURCES): Remove bss_sections.c.
	(DRUNTIME_DSOURCES): Rename rt/sections_* modules to gcc/sections/*.
	* libdruntime/Makefile.in: Regenerate.
	* libdruntime/gcc/sections/android.d: New file.
	* libdruntime/gcc/sections/elf_shared.d: New file.
	* libdruntime/gcc/sections/osx.d: New file.
	* libdruntime/gcc/sections/package.d: New file.
	* libdruntime/gcc/sections/solaris.d: New file.
	* libdruntime/gcc/sections/win32.d: New file.
	* libdruntime/gcc/sections/win64.d: New file.
	* libdruntime/rt/bss_section.c: Remove.
	* libdruntime/rt/sections.d: Publicly import gcc.sections.
	* libdruntime/rt/sections_android.d: Remove.
	* libdruntime/rt/sections_elf_shared.d: Remove.
	* libdruntime/rt/sections_osx.d: Remove.
	* libdruntime/rt/sections_solaris.d: Remove.
	* libdruntime/rt/sections_win32.d: Remove.
	* libdruntime/rt/sections_win64.d: Remove.

From-SVN: r270341
2019-04-13 15:29:15 +00:00
Iain Buclaw
d7e418a1d8 libphobos: Add subdir-objects to configure script.
Running autoreconf regenerates all files cleanly with autoconf2.69.

libphobos/ChangeLog:

2019-04-12  Iain Buclaw  <ibuclaw@gdcproject.org>

	* configure.ac (AM_INIT_AUTOMAKE): Add subdir-objects.
	* configure: Regenerate.
	* libdruntime/Makefile.in: Regenerate.

From-SVN: r270330
2019-04-12 21:50:42 +00:00
Iain Buclaw
bb50312e02 libphobos: Add target-zlib to top-level configure
Removes the building of zlib from within libphobos, using instead the
libz_convenience.a library.

ChangeLog:

2019-04-12  Iain Buclaw  <ibuclaw@gdcproject.org>

	* configure.ac: Add target-zlib to target_libraries.
	* configure: Regenerate.

gcc/ChangeLog:

2019-04-12  Iain Buclaw  <ibuclaw@gdcproject.org>

	* doc/install.texi: Document --with-target-system-zlib.

libphobos/ChangeLog:

2019-04-12  Iain Buclaw  <ibuclaw@gdcproject.org>

	* m4/druntime/libraries.m4 (DRUNTIME_LIBRARIES_ZLIB): Use
	libz_convenience.a if not using system zlib.
	* Makefile.in: Regenerate.
	* configure: Regenerate.
	* libdruntime/Makefile.in: Regenerate.
	* src/Makefile.am: Remove ZLIB_CSOURCES and AM_CFLAGS.
	* src/Makefile.in: Regenerate.
	* testsuite/Makefile.in: Regenerate.

From-SVN: r270328
2019-04-12 20:13:34 +00:00
Iain Buclaw
0d6aae249d libphobos: Replace library check programs with dg-runtest
Fixes multilib handling when running the libphobos testsuite.

libphobos/ChangeLog:

2019-04-12  Iain Buclaw  <ibuclaw@gdcproject.org>

	PR d/89255
	* configure.ac (ENABLE_SHARED, ENABLE_STATIC): Remove conditionals.
	* configure: Regenerate.
	* d_rules.am (%.t.lo, %.t.o): Remove rules.
	(unittest_static_LINK, unittest_LINK, libgdruntime_t_la_LINK,
	libgphobos_t_la_LINK): Remove variables.
	* libdruntime/Makefile.am (DRUNTIME_TEST_LOBJECTS,
	DRUNTIME_TEST_OBJECTS, check_PROGRAMS, check_LTLIBRARIES,
	unittest_static_SOURCES, unittest_static_LIBTOOLFLAGS,
	unittest_static_LDFLAGS, unittest_static_LDADD,
	EXTRA_unittest_static_DEPENDENCIES, libgdruntime_t_la_SOURCES,
	libgdruntime_t_la_LIBTOOLFLAGS, libgdruntime_t_la_LDFLAGS,
	libgdruntime_t_la_LIBADD, EXTRA_libgdruntime_t_la_DEPENDENCIES,
	unittest_SOURCES, unittest_LIBTOOLFLAGS, unittest_LDFLAGS,
	unittest_LDADD): Remove variables.
	(clean-local): Remove rule.
	* libdruntime/Makefile.in: Regenerate.
	* src/Makefile.am (PHOBOS_TEST_LOBJECTS,
	PHOBOS_TEST_OBJECTS, check_PROGRAMS, check_LTLIBRARIES,
	unittest_static_SOURCES, unittest_static_LIBTOOLFLAGS,
	unittest_static_LDFLAGS, unittest_static_LDADD,
	EXTRA_unittest_static_DEPENDENCIES, libgdruntime_t_la_SOURCES,
	libgdruntime_t_la_LIBTOOLFLAGS, libgdruntime_t_la_LDFLAGS,
	libgdruntime_t_la_LIBADD, EXTRA_libgdruntime_t_la_DEPENDENCIES,
	unittest_SOURCES, unittest_LIBTOOLFLAGS, unittest_LDFLAGS,
	unittest_LDADD): Remove variables.
	(clean-local): Remove rule.
	* src/Makefile.in: Regenerate.
	* testsuite/lib/libphobos.exp (libphobos_test_name): New global.
	(libphobos_init): Set libphobos_test_name.
	(libphobos-dg-test): Override name if libphobos_test_name is set.
	(filter_libphobos_unittests): New proc.
	* testsuite/libphobos.aa/aa.exp: Don't load libphobos-dg.exp.
	* testsuite/libphobos.cycles/cycles.exp: Set libphobos_test_name.
	* testsuite/libphobos.druntime/druntime.exp: New file.
	* testsuite/libphobos.druntime_shared/druntime_shared.exp: New file.
	* testsuite/libphobos.phobos/phobos.exp: New file.
	* testsuite/libphobos.phobos_shared/phobos_shared.exp: New file.
	* testsuite/libphobos.shared/shared.exp: Use dg-runtest to run tests.
	* testsuite/libphobos.hash/hash.exp: Don't load libphobos-dg.exp
	* testsuite/libphobos.init_fini/init_fini.exp: Likewise.
	* testsuite/libphobos.thread/thread.exp: Likewise.
	* testsuite/libphobos.typeinfo/typeinfo.exp: Likewise.
	* testsuite/libphobos.unittests/unittests.exp: Remove.
	* testsuite/test_runner.d: Remove.
	* testsuite/testsuite_flags.in: Add phobos to --gdcpaths.

From-SVN: r270302
2019-04-12 06:25:17 +00:00
Iain Buclaw
9607e404a5 libphobos: Merge upstream druntime 175bf5fc
Backports extern(C) bindings committed to upstream druntime since the
last sync.

Reviewed-on: https://github.com/dlang/druntime/pull/2552

From-SVN: r270295
2019-04-11 21:11:03 +00:00
Iain Buclaw
ca0f5734fe re PR d/88462 (All D execution tests FAIL on Solaris/SPARC)
PR d/88462
libphobos: Fix abort in pthread_mutex_init on Solaris.

Merges upstream druntime d57fa1ff.

Reviewed-on: https://github.com/dlang/druntime/pull/2534

From-SVN: r270057
2019-04-01 14:44:04 +00:00
Iain Buclaw
0da83a168f libphobos: Backport extern(C) bindings from druntime 2.085.
Merges upstream druntime b9564bef.

Reviewed-on: https://github.com/dlang/druntime/pull/2512

libphobos/ChangeLog:

2019-03-26  Iain Buclaw  <ibuclaw@gdcproject.org>

	* libdruntime/Makefile.am (DRUNTIME_DSOURCES_DARWIN): Add
	core/sys/darwin/crt_externs.d.
	(DRUNTIME_DSOURCES_FREEBSD): Add core/sys/freebsd/unistd.d.
	(DRUNTIME_DSOURCES_POSIX): Add core/sys/posix/spawn.d.
	* libdruntime/Makefile.in: Regenerate.

From-SVN: r269948
2019-03-26 15:18:19 +00:00
Bernd Edlinger
4f19d0e7af Makefile.am: Avoid the -D option which is not available with the install-sh fallback.
2019-02-19  Bernd Edlinger  <bernd.edlinger@hotmail.de>

        * src/Makefile.am: Avoid the -D option which is not available
        with the install-sh fallback.  Use $(MKDIR_P) instead.
        * libdruntime/Makefile.am: Likewise.
        * src/Makefile.in: Regenerated.
        * libdruntime/Makefile.in: Regenerated.

From-SVN: r269025
2019-02-19 18:21:26 +00:00
Johannes Pfau
36d7f1518f libphobos: Detect if qsort_r is available
Merges upstream druntime bbfb58e8.

libphobos/ChangeLog:

2019-02-19  Johannes Pfau  <johannespfau@gmail.com>

	PR d/88127
	* m4/druntime/libraries.m4 (DRUNTIME_LIBRARIES_CLIB): Add new macro.
	* configure.ac: Use DRUNTIME_LIBRARIES_CLIB.
	* configure: Regenerate
	* Makefile.in: Regenerate
	* libdruntime/gcc/config.d.in: Add Have_Qsort_R.
	* libdruntime/Makefile.in: Regenerate.
	* src/Makefile.in: Regenerate.
	* testsuite/Makefile.in: Regenerate.

From-SVN: r268999
2019-02-18 23:29:39 +00:00
Maya Rashish
2f2b8e4054 Add netbsd support for D compiler and runtime
Merges upstream druntime fb4bda91.

2019-02-14  Maya Rashish  <coypu@sdf.org>

gcc/ChangeLog:

	* config.gcc (*-*-netbsd*): Add netbsd-d.o
	* config/netbsd-d.c: New file.
	* config/t-netbsd: Add netbsd-d.o

gcc/d/ChangeLog:

	* d-system.h: NetBSD is POSIX.

libphobos/ChangeLog:

	* configure.tgt: Add netbsd/x86 as supported target.

From-SVN: r268905
2019-02-14 21:25:39 +00:00
Rainer Orth
0b6e3127e8 Provide __start_minfo/__stop_minfo for linkers that don't (PR d/87864)
libphobos:
	PR d/87864
	* configure.ac (DRTSTUFF_SPEC): New variable.
	Substitute it.
	* libdruntime/m4/druntime/os.m4 (DRUNTIME_OS_MINFO_BRACKETING):
	New automake conditional.
	* configure: Regenerate.
	* libdruntime/gcc/drtstuff.c: New file.
	* libdruntime/Makefile.am [!DRUNTIME_OS_MINFO_BRACKETING]
	(DRTSTUFF, toolexeclib_DATA): New variables.
	(gcc/drtbegin.lo, gcc/drtend.lo): New rules.
	(libgdruntime_la_LDFLAGS): Use -Wc instead of -Xcompiler.
	Add -dstartfiles -B../src -Bgcc.
	(libgdruntime_la_DEPENDENCIES): New variable.
	(unittest_static_LDFLAGS): Use -Wc instead of -Xcompiler.
	(libgdruntime_t_la_LDFLAGS): Likewise.
	(unittest_LDFLAGS): Likewise.
	* src/Makefile.am (libgphobos_la_LDFLAGS): Use -Wc instead of
	-Xcompiler.
	Add -dstartfiles -B../libdruntime/gcc.
	(unittest_static_LDFLAGS): Use -Wc instead of -Xcompiler.
	(libgphobos_t_la_LDFLAGS): Likewise.
	(unittest_LDFLAGS): Likewise.
	* libdruntime/Makefile.in, src/Makefile.in: Regenerate.
	* Makefile.in, testsuite/Makefile.in: Regenerate.
	* libdruntime/rt/sections_elf_shared.d (Minfo_Bracketing): Don't
	assert.
	* libdruntime/gcc/config.d.in (Minfo_Bracketing): Remove.
	* src/drtstuff.spec: New file.
	* src/libgphobos.spec.in (DRTSTUFF_SPEC): Substitute.
	(*lib): Only pass SPEC_PHOBOS_DEPS without -debuglib, -defaultlib,
	-nophoboslib.
	* testsuite/testsuite_flags.in <--gdcldflags> (GDCLDFLAGS): Add
	-B${BUILD_DIR}/libdruntime/gcc.

	gcc/d:
	PR d/87864
	* lang.opt (dstartfiles): New option.
	* d-spec.cc (need_spec): New variable.
	(lang_specific_driver) <OPT_dstartfiles>: Enable need_spec.
	(lang_specific_pre_link): Also load libgphobos.spec if need_spec.

	gcc/testsuite:
	PR d/87864
	* lib/gdc.exp (gdc_link_flags): Add path to drtbegin.o/drtend.o if
	present.

From-SVN: r268886
2019-02-14 17:47:49 +00:00
Iain Buclaw
5522686e52 libphobos: Fallback on UnwindBacktrace if LibBacktrace not defined.
In the gcc.backtrace module, either one of LibBacktrace or
UnwindBacktrace will always be defined.  Giving UnwindBacktrace a higher
precedence over the libc backtrace as the default handler because the
latter depends on a rt.backtrace module that is not compiled in.

libphobos/ChangeLog:

	* libdruntime/core/runtime.d (defaultTraceHandler): Give
	UnwindBacktrace handler precedence over backtrace.

From-SVN: r268836
2019-02-13 07:14:46 +00:00
Iain Buclaw
d8b1f499d9 libphobos: Merge upstream druntime 2f764ab6
Fixes hashing of complex reals, enabling testing of rt.util.typeinfo and
core.internal.hash.

Reviewed-on: https://github.com/dlang/druntime/pull/6837

libphobos/ChangeLog:

	* Makefile.in: Rebuild.
	* configure: Rebuild.
	* libdruntime/Makefile.am: Test rt.util.typeinfo and
	core.internal.convert.
	* libdruntime/Makefile.in: Rebuild.
	* src/Makefile.in: Rebuild.
	* testsuite/Makefile.in: Rebuild.
	* testsuite/libphobos.hash/test_hash.d: Update test.

From-SVN: r268755
2019-02-10 22:10:22 +00:00
Iain Buclaw
e613d99266 libphobos: Apply core.internal.hash updates from druntime
Backported from upstream druntime 2.084

Reviewed-on: https://github.com/dlang/druntime/pull/2469

libphobos/ChangeLog:

	* libdruntime/Makefile.am (DRUNTIME_DSOURCES): Remove rt/util/hash.d
	* libdruntime/Makefile.in: Rebuild.
	* testsuite/libphobos.aa/aa.exp: New file.
	* testsuite/libphobos.aa/test_aa.d: New test.
	* testsuite/libphobos.hash/hash.exp: New file.
	* testsuite/libphobos.hash/test_hash.d: New test.

From-SVN: r268754
2019-02-10 21:01:24 +00:00
Iain Buclaw
685ae5b871 libphobos: Merge phobos and druntime with upstream.
Commits merged from druntime.

    Fix struct tls_index definition on x32
    https://github.com/dlang/druntime/pull/2354

    Update SectionGroup signatures to match on all targets
    https://github.com/dlang/druntime/pull/2401

    Fix issue 19128 - argument to alloca may be too large
    https://github.com/dlang/druntime/pull/2409

    Define some common filesystem limits in core.stdc.limits
    https://github.com/dlang/druntime/pull/2460

    Use version Darwin instead of OSX in core.sys.posix.aio
    https://github.com/dlang/druntime/pull/2470

Commits merged from phobos.

    Don't run HardFloat tests on SoftFloat systems
    https://github.com/dlang/phobos/pull/5358

    Remove reliance on stdin, stdout, stderr being aliasable
    https://github.com/dlang/phobos/pull/5718

    Solaris: add import clock_gettime to currStdTime
    https://github.com/dlang/phobos/pull/5807

    Don't print debug messages when building unittests
    https://github.com/dlang/phobos/pull/6827

    Add HPPA support to phobos
    Fixes https://gcc.gnu.org/PR89054
    https://github.com/dlang/phobos/pull/6836

From-SVN: r268293
2019-01-26 13:41:26 +00:00
Iain Buclaw
151a199f29 libphobos: Add Fiber/Thread support for StackGrowsUp.
The StackGrowsDown version being turned off for hppa targets.

After other fixes in the compiler, this allows core.thread unittests to
all pass, as well as the garbage collector to work correctly.

Backported from upstream druntime 2.084.

Reviewed-on: https://github.com/dlang/druntime/pull/2410

From-SVN: r268056
2019-01-18 01:51:36 +00:00
Iain Buclaw
50deb97073 libphobos: Add platform bindings for hppa-linux-gnu.
Backported from upstream druntime 2.084

Reviewed-on: https://github.com/dlang/druntime/pull/2402

From-SVN: r268055
2019-01-18 00:48:51 +00:00
Iain Buclaw
5996efcd99 libphobos: Add OSX bindings for core.sys.posix.aio
Backported from upstream druntime 2.084

Reviewed-on: https://github.com/dlang/druntime/pull/2342

From-SVN: r268050
2019-01-18 00:05:51 +00:00
Jakub Jelinek
831a2e2f86 Remove svn:executable property from a couple of text files
which shouldn't be executable.

From-SVN: r267873
2019-01-12 01:20:04 +01:00
Jakub Jelinek
a554497024 Update copyright years.
From-SVN: r267494
2019-01-01 13:31:55 +01:00
Iain Buclaw
3b26756ba2 libphobos: Merge common version blocks for core.sys.posix.sys.msg.
This is a continuation of simplifying C bindings so there aren't dozens
of duplicated code for each architecture.  For this particular module,
it now more closely resembles how glibc arranges msq.h, fixing a couple
of targets in the process, notably X32.

Backport from upstream druntime 2.084.

Reviewed-on: https://github.com/dlang/druntime/pull/2362

From-SVN: r267192
2018-12-16 23:18:25 +00:00
Iain Buclaw
48428c1814 libphobos: Fix modify immutable error on Solaris.
Backported from upstream druntime 2.079.

Reviewed-on: https://github.com/dlang/druntime/pull/2089

From-SVN: r266950
2018-12-10 12:11:55 +00:00
Iain Buclaw
899b398116 libphobos: Add druntime bindings for SPARC/Solaris
Backported from upstream druntime master.

Initial patch by Rainer Orth.

Reviewed-on: https://github.com/dlang/druntime/pull/2344

From-SVN: r266935
2018-12-09 23:46:45 +00:00
Iain Buclaw
5a5129a0df libphobos: Add support for RISCV to glibc bindings
Backported from upstream druntime master.

Reviewed-on: https://github.com/dlang/druntime/pull/2355

From-SVN: r266713
2018-12-01 21:48:43 +00:00
Iain Buclaw
1568425022 libphobos: Merge common version blocks using arch_any conditions
This sets a precedence in upstream for merging architecture agnostic
C bindings into one block, rather than separate duplicated blocks.

A nice side-effect is it almost completes the C bindings for
s390-linux-gnu and sparc-linux-gnu, and fixes a bug on MIPS32 where
O_SYNC had the wrong value.

Backported from upstream druntime master.

Reviewed-on: https://github.com/dlang/druntime/pull/2357

From-SVN: r266593
2018-11-28 21:53:06 +00:00
Iain Buclaw
85041a5b77 Merge libphobos upstream version 2.076.1
Updated the library version to 76:3:0.

libphobos/ChangeLog:

2018-11-28  Iain Buclaw  <ibuclaw@gdcproject.org>

	* Makefile.in: Rebuild.
	* configure: Rebuild.
	* configure.ac (DRUNTIME_SOVERSION): Remove.
	(PHOBOS_SOVERSION): Remove.
	(libtool_VERSION): Add.
	* libdruntime/Makefile.am: Use libtool_VERSION.
	* libdruntime/Makefile.in: Rebuild.
	* src/Makefile.am: Use libtool_VERSION.
	* src/Makefile.in: Rebuild.
	* testsuite/Makefile.in: Rebuild.

From-SVN: r266572
2018-11-28 17:54:07 +00:00
Iain Buclaw
e20145f12c libphobos: Fix backtraces in Fibers on AArch64.
When throwing an Exception in the Fiber the backtrace generation
crashes.  This happens because backtrace does not func the stack bottom.
Using '.cfi_undefined x30' tells the debug info that the value in the lr
is unknown, which seems to be the nicest way to stop the unwinder.
Setting x30 to 0 is another option, however it still creates one invalid
frame in gdb, so the .cfi variant is used here instead.

Backport from upstream druntime 2.083.

Reviewed-on: https://github.com/dlang/druntime/pull/2308

From-SVN: r266470
2018-11-26 17:27:34 +00:00
Iain Buclaw
a0a57b074f libphobos: Add IEEE quadruple support to core.internal.convert
Backport from upstream druntime 2.083 for AArch64.

Reviewed-on: https://github.com/dlang/druntime/pull/2257

From-SVN: r266222
2018-11-16 21:17:33 +00:00
Iain Buclaw
ac67752d79 Fix libgphobos.spec in the wrong place with --enable-version-specific-runtime-libs
libphobos/ChangeLog:

2018-11-01  Iain Buclaw  <ibuclaw@gdcproject.org>

	PR d/87827
	* Makefile.in: Rebuild.
	* configure: Rebuild.
	* configure.ac: Properly set MULTISUBDIR.
	* d_rules.am: Set toolexecdir and toolexeclibdir.
	* libdruntime/Makefile.in: Rebuild.
	* m4/druntime.m4 (DRUNTIME_INSTALL_DIRECTORIES): Add
	--enable-version-specific-runtime-libs.
	* src/Makefile.in: Rebuild.
	* testsuite/Makefile.in: Rebuild.

From-SVN: r265742
2018-11-02 08:29:50 +00:00