From: Iain Buclaw Date: Thu, 9 Apr 2020 15:07:43 +0000 (+0200) Subject: libphobos: Remove --enable-druntime-gc configure option. X-Git-Url: https://git.libre-soc.org/?a=commitdiff_plain;h=bbb0de4a4ac9d6b6b6ca6be4755913bf4379d51a;p=gcc.git libphobos: Remove --enable-druntime-gc configure option. This is yet another old option that would have been somewhat useful back before the D front-end implementation was able to support compiling without the Druntime library. Now however, -fno-druntime makes the gcstub package redundant, so the option has been removed, along with the package itself. libphobos/ChangeLog: * configure: Regenerate. * libdruntime/Makefile.am (ALL_DRUNTIME_INSTALL_DSOURCES): Remove DRUNTIME_DSOURCES_GC and DRUNTIME_DSOURCES_GCSTUB. (DRUNTIME_DSOURCES): Add gc/*.d sources. (DRUNTIME_DSOURCES_GC): Remove. (DRUNTIME_DSOURCES_GCSTUB): Remove. * libdruntime/Makefile.in: Regenerate. * libdruntime/gcstub/gc.d: Remove. * m4/druntime.m4 (DRUNTIME_GC): Remove. --- diff --git a/libphobos/ChangeLog b/libphobos/ChangeLog index 5b9fe432bb9..dc19a19851f 100644 --- a/libphobos/ChangeLog +++ b/libphobos/ChangeLog @@ -1,3 +1,15 @@ +2020-04-09 Iain Buclaw + + * configure: Regenerate. + * libdruntime/Makefile.am (ALL_DRUNTIME_INSTALL_DSOURCES): Remove + DRUNTIME_DSOURCES_GC and DRUNTIME_DSOURCES_GCSTUB. + (DRUNTIME_DSOURCES): Add gc/*.d sources. + (DRUNTIME_DSOURCES_GC): Remove. + (DRUNTIME_DSOURCES_GCSTUB): Remove. + * libdruntime/Makefile.in: Regenerate. + * libdruntime/gcstub/gc.d: Remove. + * m4/druntime.m4 (DRUNTIME_GC): Remove. + 2020-04-09 Iain Buclaw PR d/94305 diff --git a/libphobos/configure b/libphobos/configure index af597b2525b..a6f5aec2bfd 100755 --- a/libphobos/configure +++ b/libphobos/configure @@ -701,8 +701,6 @@ DRUNTIME_CPU_ARM_FALSE DRUNTIME_CPU_ARM_TRUE DRUNTIME_CPU_AARCH64_FALSE DRUNTIME_CPU_AARCH64_TRUE -DRUNTIME_GC_ENABLE_FALSE -DRUNTIME_GC_ENABLE_TRUE libphobos_srcdir libphobos_builddir get_gcc_base_ver @@ -835,7 +833,6 @@ with_gnu_ld enable_libtool_lock with_gcc_major_version_only enable_werror -enable_druntime_gc with_libatomic with_libbacktrace with_target_system_zlib @@ -1485,7 +1482,6 @@ Optional Features: optimize for fast installation [default=yes] --disable-libtool-lock avoid locking (might break parallel builds) --enable-werror turns on -Werror [default=no] - --enable-druntime-gc enable D runtime garbage collector (default: yes) --enable-version-specific-runtime-libs Specify that runtime libraries should be installed in a compiler-specific directory @@ -11649,7 +11645,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11652 "configure" +#line 11648 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -11755,7 +11751,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 11758 "configure" +#line 11754 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -13981,24 +13977,7 @@ fi WERROR_FLAG="-Werror" fi - - # Check whether --enable-druntime-gc was given. -if test "${enable_druntime_gc+set}" = set; then : - enableval=$enable_druntime_gc; enable_druntime_gc=no -else - enable_druntime_gc=yes -fi - - - if test "$enable_druntime_gc" = "yes"; then - DRUNTIME_GC_ENABLE_TRUE= - DRUNTIME_GC_ENABLE_FALSE='#' -else - DRUNTIME_GC_ENABLE_TRUE='#' - DRUNTIME_GC_ENABLE_FALSE= -fi - - +DRUNTIME_GC druntime_target_cpu_parsed="" case "$target_cpu" in @@ -15510,10 +15489,6 @@ if test -z "${MAINTAINER_MODE_TRUE}" && test -z "${MAINTAINER_MODE_FALSE}"; then as_fn_error $? "conditional \"MAINTAINER_MODE\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 fi -if test -z "${DRUNTIME_GC_ENABLE_TRUE}" && test -z "${DRUNTIME_GC_ENABLE_FALSE}"; then - as_fn_error $? "conditional \"DRUNTIME_GC_ENABLE\" was never defined. -Usually this means the macro was only invoked conditionally." "$LINENO" 5 -fi if test -z "${DRUNTIME_CPU_AARCH64_TRUE}" && test -z "${DRUNTIME_CPU_AARCH64_FALSE}"; then as_fn_error $? "conditional \"DRUNTIME_CPU_AARCH64\" was never defined. Usually this means the macro was only invoked conditionally." "$LINENO" 5 diff --git a/libphobos/libdruntime/Makefile.am b/libphobos/libdruntime/Makefile.am index c7b03a5967d..c1c446d14fd 100644 --- a/libphobos/libdruntime/Makefile.am +++ b/libphobos/libdruntime/Makefile.am @@ -28,7 +28,6 @@ AM_DFLAGS= \ # Install all D and DI files ALL_DRUNTIME_INSTALL_DSOURCES = $(DRUNTIME_DSOURCES) \ - $(DRUNTIME_DSOURCES_GC) $(DRUNTIME_DSOURCES_GCSTUB) \ $(DRUNTIME_DSOURCES_BIONIC) $(DRUNTIME_DSOURCES_DARWIN) \ $(DRUNTIME_DSOURCES_DRAGONFLYBSD) $(DRUNTIME_DSOURCES_FREEBSD) \ $(DRUNTIME_DSOURCES_LINUX) $(DRUNTIME_DSOURCES_NETBSD) \ @@ -40,12 +39,6 @@ ALL_DRUNTIME_INSTALL_DSOURCES = $(DRUNTIME_DSOURCES) \ # Setup source files depending on configure DRUNTIME_SOURCES_CONFIGURED = -# GC sources -if DRUNTIME_GC_ENABLE - DRUNTIME_SOURCES_CONFIGURED += $(DRUNTIME_DSOURCES_GC) -else - DRUNTIME_SOURCES_CONFIGURED += $(DRUNTIME_DSOURCES_GCSTUB) -endif # OS specific sources if DRUNTIME_OS_POSIX DRUNTIME_SOURCES_CONFIGURED += $(DRUNTIME_DSOURCES_POSIX) @@ -168,7 +161,9 @@ DRUNTIME_DSOURCES = core/atomic.d core/attribute.d core/bitop.d \ core/stdc/wctype.d core/sync/barrier.d core/sync/condition.d \ core/sync/config.d core/sync/exception.d core/sync/mutex.d \ core/sync/rwmutex.d core/sync/semaphore.d core/thread.d core/time.d \ - core/vararg.d gcc/attribute.d gcc/backtrace.d gcc/builtins.d gcc/deh.d \ + core/vararg.d gc/bits.d gc/config.d gc/gcinterface.d \ + gc/impl/conservative/gc.d gc/impl/manual/gc.d gc/os.d gc/pooltable.d \ + gc/proxy.d gcc/attribute.d gcc/backtrace.d gcc/builtins.d gcc/deh.d \ gcc/emutls.d gcc/gthread.d gcc/sections/android.d \ gcc/sections/elf_shared.d gcc/sections/osx.d gcc/sections/package.d \ gcc/sections/win32.d gcc/sections/win64.d gcc/unwind/arm.d \ @@ -199,12 +194,6 @@ DRUNTIME_DSOURCES = core/atomic.d core/attribute.d core/bitop.d \ DRUNTIME_DSOURCES_STDCXX = core/stdcpp/exception.d \ core/stdcpp/typeinfo.d -DRUNTIME_DSOURCES_GC = gc/bits.d gc/config.d gc/gcinterface.d \ - gc/impl/conservative/gc.d gc/impl/manual/gc.d gc/os.d gc/pooltable.d \ - gc/proxy.d - -DRUNTIME_DSOURCES_GCSTUB = gcstub/gc.d - DRUNTIME_DSOURCES_BIONIC = core/sys/bionic/fcntl.d \ core/sys/bionic/string.d core/sys/bionic/unistd.d diff --git a/libphobos/libdruntime/Makefile.in b/libphobos/libdruntime/Makefile.in index e0688e25c81..9cb3b60520d 100644 --- a/libphobos/libdruntime/Makefile.in +++ b/libphobos/libdruntime/Makefile.in @@ -108,30 +108,27 @@ build_triplet = @build@ host_triplet = @host@ target_triplet = @target@ -# GC sources -@DRUNTIME_GC_ENABLE_TRUE@am__append_1 = $(DRUNTIME_DSOURCES_GC) -@DRUNTIME_GC_ENABLE_FALSE@am__append_2 = $(DRUNTIME_DSOURCES_GCSTUB) # OS specific sources -@DRUNTIME_OS_POSIX_TRUE@am__append_3 = $(DRUNTIME_DSOURCES_POSIX) -@DRUNTIME_OS_DARWIN_TRUE@am__append_4 = $(DRUNTIME_DSOURCES_DARWIN) -@DRUNTIME_OS_DRAGONFLYBSD_TRUE@am__append_5 = $(DRUNTIME_DSOURCES_DRAGONFLYBSD) -@DRUNTIME_OS_ANDROID_TRUE@am__append_6 = $(DRUNTIME_DSOURCES_BIONIC) -@DRUNTIME_OS_FREEBSD_TRUE@am__append_7 = $(DRUNTIME_DSOURCES_FREEBSD) -@DRUNTIME_OS_NETBSD_TRUE@am__append_8 = $(DRUNTIME_DSOURCES_NETBSD) -@DRUNTIME_OS_OPENBSD_TRUE@am__append_9 = $(DRUNTIME_DSOURCES_OPENBSD) -@DRUNTIME_OS_LINUX_TRUE@am__append_10 = $(DRUNTIME_DSOURCES_LINUX) -@DRUNTIME_OS_MINGW_TRUE@am__append_11 = $(DRUNTIME_DSOURCES_WINDOWS) -@DRUNTIME_OS_SOLARIS_TRUE@am__append_12 = $(DRUNTIME_DSOURCES_SOLARIS) +@DRUNTIME_OS_POSIX_TRUE@am__append_1 = $(DRUNTIME_DSOURCES_POSIX) +@DRUNTIME_OS_DARWIN_TRUE@am__append_2 = $(DRUNTIME_DSOURCES_DARWIN) +@DRUNTIME_OS_DRAGONFLYBSD_TRUE@am__append_3 = $(DRUNTIME_DSOURCES_DRAGONFLYBSD) +@DRUNTIME_OS_ANDROID_TRUE@am__append_4 = $(DRUNTIME_DSOURCES_BIONIC) +@DRUNTIME_OS_FREEBSD_TRUE@am__append_5 = $(DRUNTIME_DSOURCES_FREEBSD) +@DRUNTIME_OS_NETBSD_TRUE@am__append_6 = $(DRUNTIME_DSOURCES_NETBSD) +@DRUNTIME_OS_OPENBSD_TRUE@am__append_7 = $(DRUNTIME_DSOURCES_OPENBSD) +@DRUNTIME_OS_LINUX_TRUE@am__append_8 = $(DRUNTIME_DSOURCES_LINUX) +@DRUNTIME_OS_MINGW_TRUE@am__append_9 = $(DRUNTIME_DSOURCES_WINDOWS) +@DRUNTIME_OS_SOLARIS_TRUE@am__append_10 = $(DRUNTIME_DSOURCES_SOLARIS) # CPU specific sources -@DRUNTIME_CPU_AARCH64_TRUE@am__append_13 = config/aarch64/switchcontext.S -@DRUNTIME_CPU_ARM_TRUE@am__append_14 = config/arm/switchcontext.S -@DRUNTIME_CPU_MIPS_TRUE@am__append_15 = config/mips/switchcontext.S -@DRUNTIME_CPU_POWERPC_TRUE@am__append_16 = config/powerpc/switchcontext.S -@DRUNTIME_CPU_POWERPC64_TRUE@am__append_17 = config/powerpc64/callwithstack.S -@DRUNTIME_CPU_X86_TRUE@@DRUNTIME_OS_MINGW_TRUE@am__append_18 = config/mingw/switchcontext.S -@DRUNTIME_CPU_X86_TRUE@@DRUNTIME_OS_MINGW_FALSE@am__append_19 = config/x86/switchcontext.S -@DRUNTIME_CPU_SYSTEMZ_TRUE@am__append_20 = config/systemz/get_tls_offset.S -@DRUNTIME_CPU_S390_TRUE@am__append_21 = config/s390/get_tls_offset.S +@DRUNTIME_CPU_AARCH64_TRUE@am__append_11 = config/aarch64/switchcontext.S +@DRUNTIME_CPU_ARM_TRUE@am__append_12 = config/arm/switchcontext.S +@DRUNTIME_CPU_MIPS_TRUE@am__append_13 = config/mips/switchcontext.S +@DRUNTIME_CPU_POWERPC_TRUE@am__append_14 = config/powerpc/switchcontext.S +@DRUNTIME_CPU_POWERPC64_TRUE@am__append_15 = config/powerpc64/callwithstack.S +@DRUNTIME_CPU_X86_TRUE@@DRUNTIME_OS_MINGW_TRUE@am__append_16 = config/mingw/switchcontext.S +@DRUNTIME_CPU_X86_TRUE@@DRUNTIME_OS_MINGW_FALSE@am__append_17 = config/x86/switchcontext.S +@DRUNTIME_CPU_SYSTEMZ_TRUE@am__append_18 = config/systemz/get_tls_offset.S +@DRUNTIME_CPU_S390_TRUE@am__append_19 = config/s390/get_tls_offset.S subdir = libdruntime ACLOCAL_M4 = $(top_srcdir)/aclocal.m4 am__aclocal_m4_deps = $(top_srcdir)/../config/acx.m4 \ @@ -205,7 +202,9 @@ am__objects_1 = core/atomic.lo core/attribute.lo core/bitop.lo \ core/sync/condition.lo core/sync/config.lo \ core/sync/exception.lo core/sync/mutex.lo core/sync/rwmutex.lo \ core/sync/semaphore.lo core/thread.lo core/time.lo \ - core/vararg.lo gcc/attribute.lo gcc/backtrace.lo \ + core/vararg.lo gc/bits.lo gc/config.lo gc/gcinterface.lo \ + gc/impl/conservative/gc.lo gc/impl/manual/gc.lo gc/os.lo \ + gc/pooltable.lo gc/proxy.lo gcc/attribute.lo gcc/backtrace.lo \ gcc/builtins.lo gcc/deh.lo gcc/emutls.lo gcc/gthread.lo \ gcc/sections/android.lo gcc/sections/elf_shared.lo \ gcc/sections/osx.lo gcc/sections/package.lo \ @@ -241,13 +240,7 @@ am__objects_1 = core/atomic.lo core/attribute.lo core/bitop.lo \ rt/util/container/treap.lo rt/util/random.lo \ rt/util/typeinfo.lo rt/util/utf.lo am__objects_2 = core/stdc/libgdruntime_la-errno_.lo -am__objects_3 = gc/bits.lo gc/config.lo gc/gcinterface.lo \ - gc/impl/conservative/gc.lo gc/impl/manual/gc.lo gc/os.lo \ - gc/pooltable.lo gc/proxy.lo -@DRUNTIME_GC_ENABLE_TRUE@am__objects_4 = $(am__objects_3) -am__objects_5 = gcstub/gc.lo -@DRUNTIME_GC_ENABLE_FALSE@am__objects_6 = $(am__objects_5) -am__objects_7 = core/sys/posix/aio.lo core/sys/posix/arpa/inet.lo \ +am__objects_3 = core/sys/posix/aio.lo core/sys/posix/arpa/inet.lo \ core/sys/posix/config.lo core/sys/posix/dirent.lo \ core/sys/posix/dlfcn.lo core/sys/posix/fcntl.lo \ core/sys/posix/grp.lo core/sys/posix/iconv.lo \ @@ -272,8 +265,8 @@ am__objects_7 = core/sys/posix/aio.lo core/sys/posix/arpa/inet.lo \ core/sys/posix/syslog.lo core/sys/posix/termios.lo \ core/sys/posix/time.lo core/sys/posix/ucontext.lo \ core/sys/posix/unistd.lo core/sys/posix/utime.lo -@DRUNTIME_OS_POSIX_TRUE@am__objects_8 = $(am__objects_7) -am__objects_9 = core/sys/darwin/crt_externs.lo \ +@DRUNTIME_OS_POSIX_TRUE@am__objects_4 = $(am__objects_3) +am__objects_5 = core/sys/darwin/crt_externs.lo \ core/sys/darwin/dlfcn.lo core/sys/darwin/execinfo.lo \ core/sys/darwin/mach/dyld.lo core/sys/darwin/mach/getsect.lo \ core/sys/darwin/mach/kern_return.lo \ @@ -283,8 +276,8 @@ am__objects_9 = core/sys/darwin/crt_externs.lo \ core/sys/darwin/netinet/in_.lo core/sys/darwin/pthread.lo \ core/sys/darwin/string.lo core/sys/darwin/sys/cdefs.lo \ core/sys/darwin/sys/event.lo core/sys/darwin/sys/mman.lo -@DRUNTIME_OS_DARWIN_TRUE@am__objects_10 = $(am__objects_9) -am__objects_11 = core/sys/dragonflybsd/dlfcn.lo \ +@DRUNTIME_OS_DARWIN_TRUE@am__objects_6 = $(am__objects_5) +am__objects_7 = core/sys/dragonflybsd/dlfcn.lo \ core/sys/dragonflybsd/execinfo.lo \ core/sys/dragonflybsd/netinet/in_.lo \ core/sys/dragonflybsd/pthread_np.lo \ @@ -301,11 +294,11 @@ am__objects_11 = core/sys/dragonflybsd/dlfcn.lo \ core/sys/dragonflybsd/sys/mman.lo \ core/sys/dragonflybsd/sys/socket.lo \ core/sys/dragonflybsd/time.lo -@DRUNTIME_OS_DRAGONFLYBSD_TRUE@am__objects_12 = $(am__objects_11) -am__objects_13 = core/sys/bionic/fcntl.lo core/sys/bionic/string.lo \ +@DRUNTIME_OS_DRAGONFLYBSD_TRUE@am__objects_8 = $(am__objects_7) +am__objects_9 = core/sys/bionic/fcntl.lo core/sys/bionic/string.lo \ core/sys/bionic/unistd.lo -@DRUNTIME_OS_ANDROID_TRUE@am__objects_14 = $(am__objects_13) -am__objects_15 = core/sys/freebsd/dlfcn.lo \ +@DRUNTIME_OS_ANDROID_TRUE@am__objects_10 = $(am__objects_9) +am__objects_11 = core/sys/freebsd/dlfcn.lo \ core/sys/freebsd/execinfo.lo core/sys/freebsd/netinet/in_.lo \ core/sys/freebsd/pthread_np.lo core/sys/freebsd/string.lo \ core/sys/freebsd/sys/_bitset.lo \ @@ -316,23 +309,23 @@ am__objects_15 = core/sys/freebsd/dlfcn.lo \ core/sys/freebsd/sys/event.lo core/sys/freebsd/sys/link_elf.lo \ core/sys/freebsd/sys/mman.lo core/sys/freebsd/sys/mount.lo \ core/sys/freebsd/time.lo core/sys/freebsd/unistd.lo -@DRUNTIME_OS_FREEBSD_TRUE@am__objects_16 = $(am__objects_15) -am__objects_17 = core/sys/netbsd/dlfcn.lo core/sys/netbsd/execinfo.lo \ +@DRUNTIME_OS_FREEBSD_TRUE@am__objects_12 = $(am__objects_11) +am__objects_13 = core/sys/netbsd/dlfcn.lo core/sys/netbsd/execinfo.lo \ core/sys/netbsd/string.lo core/sys/netbsd/sys/elf.lo \ core/sys/netbsd/sys/elf32.lo core/sys/netbsd/sys/elf64.lo \ core/sys/netbsd/sys/elf_common.lo core/sys/netbsd/sys/event.lo \ core/sys/netbsd/sys/featuretest.lo \ core/sys/netbsd/sys/link_elf.lo core/sys/netbsd/sys/mman.lo \ core/sys/netbsd/time.lo -@DRUNTIME_OS_NETBSD_TRUE@am__objects_18 = $(am__objects_17) -am__objects_19 = core/sys/openbsd/dlfcn.lo core/sys/openbsd/string.lo \ +@DRUNTIME_OS_NETBSD_TRUE@am__objects_14 = $(am__objects_13) +am__objects_15 = core/sys/openbsd/dlfcn.lo core/sys/openbsd/string.lo \ core/sys/openbsd/sys/cdefs.lo core/sys/openbsd/sys/elf.lo \ core/sys/openbsd/sys/elf32.lo core/sys/openbsd/sys/elf64.lo \ core/sys/openbsd/sys/elf_common.lo \ core/sys/openbsd/sys/link_elf.lo core/sys/openbsd/sys/mman.lo \ core/sys/openbsd/time.lo -@DRUNTIME_OS_OPENBSD_TRUE@am__objects_20 = $(am__objects_19) -am__objects_21 = core/sys/linux/config.lo core/sys/linux/dlfcn.lo \ +@DRUNTIME_OS_OPENBSD_TRUE@am__objects_16 = $(am__objects_15) +am__objects_17 = core/sys/linux/config.lo core/sys/linux/dlfcn.lo \ core/sys/linux/elf.lo core/sys/linux/epoll.lo \ core/sys/linux/errno.lo core/sys/linux/execinfo.lo \ core/sys/linux/fcntl.lo core/sys/linux/ifaddrs.lo \ @@ -348,8 +341,8 @@ am__objects_21 = core/sys/linux/config.lo core/sys/linux/dlfcn.lo \ core/sys/linux/termios.lo core/sys/linux/time.lo \ core/sys/linux/timerfd.lo core/sys/linux/tipc.lo \ core/sys/linux/unistd.lo -@DRUNTIME_OS_LINUX_TRUE@am__objects_22 = $(am__objects_21) -am__objects_23 = core/sys/windows/accctrl.lo \ +@DRUNTIME_OS_LINUX_TRUE@am__objects_18 = $(am__objects_17) +am__objects_19 = core/sys/windows/accctrl.lo \ core/sys/windows/aclapi.lo core/sys/windows/aclui.lo \ core/sys/windows/basetsd.lo core/sys/windows/basetyps.lo \ core/sys/windows/cderr.lo core/sys/windows/cguid.lo \ @@ -432,8 +425,8 @@ am__objects_23 = core/sys/windows/accctrl.lo \ core/sys/windows/winspool.lo core/sys/windows/winsvc.lo \ core/sys/windows/winuser.lo core/sys/windows/winver.lo \ core/sys/windows/wtsapi32.lo core/sys/windows/wtypes.lo -@DRUNTIME_OS_MINGW_TRUE@am__objects_24 = $(am__objects_23) -am__objects_25 = core/sys/solaris/dlfcn.lo core/sys/solaris/elf.lo \ +@DRUNTIME_OS_MINGW_TRUE@am__objects_20 = $(am__objects_19) +am__objects_21 = core/sys/solaris/dlfcn.lo core/sys/solaris/elf.lo \ core/sys/solaris/execinfo.lo core/sys/solaris/libelf.lo \ core/sys/solaris/link.lo core/sys/solaris/sys/elf.lo \ core/sys/solaris/sys/elf_386.lo \ @@ -444,27 +437,27 @@ am__objects_25 = core/sys/solaris/dlfcn.lo core/sys/solaris/elf.lo \ core/sys/solaris/sys/priocntl.lo \ core/sys/solaris/sys/procset.lo core/sys/solaris/sys/types.lo \ core/sys/solaris/time.lo -@DRUNTIME_OS_SOLARIS_TRUE@am__objects_26 = $(am__objects_25) -@DRUNTIME_CPU_AARCH64_TRUE@am__objects_27 = config/aarch64/libgdruntime_la-switchcontext.lo -@DRUNTIME_CPU_ARM_TRUE@am__objects_28 = config/arm/libgdruntime_la-switchcontext.lo -@DRUNTIME_CPU_MIPS_TRUE@am__objects_29 = config/mips/libgdruntime_la-switchcontext.lo -@DRUNTIME_CPU_POWERPC_TRUE@am__objects_30 = config/powerpc/libgdruntime_la-switchcontext.lo -@DRUNTIME_CPU_POWERPC64_TRUE@am__objects_31 = config/powerpc64/libgdruntime_la-callwithstack.lo -@DRUNTIME_CPU_X86_TRUE@@DRUNTIME_OS_MINGW_TRUE@am__objects_32 = config/mingw/libgdruntime_la-switchcontext.lo -@DRUNTIME_CPU_X86_TRUE@@DRUNTIME_OS_MINGW_FALSE@am__objects_33 = config/x86/libgdruntime_la-switchcontext.lo -@DRUNTIME_CPU_SYSTEMZ_TRUE@am__objects_34 = config/systemz/libgdruntime_la-get_tls_offset.lo -@DRUNTIME_CPU_S390_TRUE@am__objects_35 = config/s390/libgdruntime_la-get_tls_offset.lo -am__objects_36 = $(am__objects_4) $(am__objects_6) $(am__objects_8) \ +@DRUNTIME_OS_SOLARIS_TRUE@am__objects_22 = $(am__objects_21) +@DRUNTIME_CPU_AARCH64_TRUE@am__objects_23 = config/aarch64/libgdruntime_la-switchcontext.lo +@DRUNTIME_CPU_ARM_TRUE@am__objects_24 = config/arm/libgdruntime_la-switchcontext.lo +@DRUNTIME_CPU_MIPS_TRUE@am__objects_25 = config/mips/libgdruntime_la-switchcontext.lo +@DRUNTIME_CPU_POWERPC_TRUE@am__objects_26 = config/powerpc/libgdruntime_la-switchcontext.lo +@DRUNTIME_CPU_POWERPC64_TRUE@am__objects_27 = config/powerpc64/libgdruntime_la-callwithstack.lo +@DRUNTIME_CPU_X86_TRUE@@DRUNTIME_OS_MINGW_TRUE@am__objects_28 = config/mingw/libgdruntime_la-switchcontext.lo +@DRUNTIME_CPU_X86_TRUE@@DRUNTIME_OS_MINGW_FALSE@am__objects_29 = config/x86/libgdruntime_la-switchcontext.lo +@DRUNTIME_CPU_SYSTEMZ_TRUE@am__objects_30 = config/systemz/libgdruntime_la-get_tls_offset.lo +@DRUNTIME_CPU_S390_TRUE@am__objects_31 = config/s390/libgdruntime_la-get_tls_offset.lo +am__objects_32 = $(am__objects_4) $(am__objects_6) $(am__objects_8) \ $(am__objects_10) $(am__objects_12) $(am__objects_14) \ $(am__objects_16) $(am__objects_18) $(am__objects_20) \ - $(am__objects_22) $(am__objects_24) $(am__objects_26) \ - $(am__objects_27) $(am__objects_28) $(am__objects_29) \ - $(am__objects_30) $(am__objects_31) $(am__objects_32) \ - $(am__objects_33) $(am__objects_34) $(am__objects_35) -am__objects_37 = gcc/config.lo gcc/libbacktrace.lo -am__objects_38 = $(am__objects_1) $(am__objects_2) $(am__objects_36) \ - $(am__objects_37) -am_libgdruntime_la_OBJECTS = $(am__objects_38) + $(am__objects_22) $(am__objects_23) $(am__objects_24) \ + $(am__objects_25) $(am__objects_26) $(am__objects_27) \ + $(am__objects_28) $(am__objects_29) $(am__objects_30) \ + $(am__objects_31) +am__objects_33 = gcc/config.lo gcc/libbacktrace.lo +am__objects_34 = $(am__objects_1) $(am__objects_2) $(am__objects_32) \ + $(am__objects_33) +am_libgdruntime_la_OBJECTS = $(am__objects_34) libgdruntime_la_OBJECTS = $(am_libgdruntime_la_OBJECTS) AM_V_P = $(am__v_P_@AM_V@) am__v_P_ = $(am__v_P_@AM_DEFAULT_V@) @@ -721,7 +714,6 @@ AM_DFLAGS = \ # Install all D and DI files ALL_DRUNTIME_INSTALL_DSOURCES = $(DRUNTIME_DSOURCES) \ - $(DRUNTIME_DSOURCES_GC) $(DRUNTIME_DSOURCES_GCSTUB) \ $(DRUNTIME_DSOURCES_BIONIC) $(DRUNTIME_DSOURCES_DARWIN) \ $(DRUNTIME_DSOURCES_DRAGONFLYBSD) $(DRUNTIME_DSOURCES_FREEBSD) \ $(DRUNTIME_DSOURCES_LINUX) $(DRUNTIME_DSOURCES_NETBSD) \ @@ -738,8 +730,7 @@ DRUNTIME_SOURCES_CONFIGURED = $(am__append_1) $(am__append_2) \ $(am__append_9) $(am__append_10) $(am__append_11) \ $(am__append_12) $(am__append_13) $(am__append_14) \ $(am__append_15) $(am__append_16) $(am__append_17) \ - $(am__append_18) $(am__append_19) $(am__append_20) \ - $(am__append_21) + $(am__append_18) $(am__append_19) # Provide __start_minfo, __stop_minfo if linker doesn't. @DRUNTIME_OS_MINFO_BRACKETING_FALSE@DRTSTUFF = gcc/drtbegin.o gcc/drtend.o @@ -779,7 +770,9 @@ DRUNTIME_DSOURCES = core/atomic.d core/attribute.d core/bitop.d \ core/stdc/wctype.d core/sync/barrier.d core/sync/condition.d \ core/sync/config.d core/sync/exception.d core/sync/mutex.d \ core/sync/rwmutex.d core/sync/semaphore.d core/thread.d core/time.d \ - core/vararg.d gcc/attribute.d gcc/backtrace.d gcc/builtins.d gcc/deh.d \ + core/vararg.d gc/bits.d gc/config.d gc/gcinterface.d \ + gc/impl/conservative/gc.d gc/impl/manual/gc.d gc/os.d gc/pooltable.d \ + gc/proxy.d gcc/attribute.d gcc/backtrace.d gcc/builtins.d gcc/deh.d \ gcc/emutls.d gcc/gthread.d gcc/sections/android.d \ gcc/sections/elf_shared.d gcc/sections/osx.d gcc/sections/package.d \ gcc/sections/win32.d gcc/sections/win64.d gcc/unwind/arm.d \ @@ -810,11 +803,6 @@ DRUNTIME_DSOURCES = core/atomic.d core/attribute.d core/bitop.d \ DRUNTIME_DSOURCES_STDCXX = core/stdcpp/exception.d \ core/stdcpp/typeinfo.d -DRUNTIME_DSOURCES_GC = gc/bits.d gc/config.d gc/gcinterface.d \ - gc/impl/conservative/gc.d gc/impl/manual/gc.d gc/os.d gc/pooltable.d \ - gc/proxy.d - -DRUNTIME_DSOURCES_GCSTUB = gcstub/gc.d DRUNTIME_DSOURCES_BIONIC = core/sys/bionic/fcntl.d \ core/sys/bionic/string.d core/sys/bionic/unistd.d @@ -1132,6 +1120,23 @@ core/sync/semaphore.lo: core/sync/$(am__dirstamp) core/thread.lo: core/$(am__dirstamp) core/time.lo: core/$(am__dirstamp) core/vararg.lo: core/$(am__dirstamp) +gc/$(am__dirstamp): + @$(MKDIR_P) gc + @: > gc/$(am__dirstamp) +gc/bits.lo: gc/$(am__dirstamp) +gc/config.lo: gc/$(am__dirstamp) +gc/gcinterface.lo: gc/$(am__dirstamp) +gc/impl/conservative/$(am__dirstamp): + @$(MKDIR_P) gc/impl/conservative + @: > gc/impl/conservative/$(am__dirstamp) +gc/impl/conservative/gc.lo: gc/impl/conservative/$(am__dirstamp) +gc/impl/manual/$(am__dirstamp): + @$(MKDIR_P) gc/impl/manual + @: > gc/impl/manual/$(am__dirstamp) +gc/impl/manual/gc.lo: gc/impl/manual/$(am__dirstamp) +gc/os.lo: gc/$(am__dirstamp) +gc/pooltable.lo: gc/$(am__dirstamp) +gc/proxy.lo: gc/$(am__dirstamp) gcc/$(am__dirstamp): @$(MKDIR_P) gcc @: > gcc/$(am__dirstamp) @@ -1239,27 +1244,6 @@ rt/util/random.lo: rt/util/$(am__dirstamp) rt/util/typeinfo.lo: rt/util/$(am__dirstamp) rt/util/utf.lo: rt/util/$(am__dirstamp) core/stdc/libgdruntime_la-errno_.lo: core/stdc/$(am__dirstamp) -gc/$(am__dirstamp): - @$(MKDIR_P) gc - @: > gc/$(am__dirstamp) -gc/bits.lo: gc/$(am__dirstamp) -gc/config.lo: gc/$(am__dirstamp) -gc/gcinterface.lo: gc/$(am__dirstamp) -gc/impl/conservative/$(am__dirstamp): - @$(MKDIR_P) gc/impl/conservative - @: > gc/impl/conservative/$(am__dirstamp) -gc/impl/conservative/gc.lo: gc/impl/conservative/$(am__dirstamp) -gc/impl/manual/$(am__dirstamp): - @$(MKDIR_P) gc/impl/manual - @: > gc/impl/manual/$(am__dirstamp) -gc/impl/manual/gc.lo: gc/impl/manual/$(am__dirstamp) -gc/os.lo: gc/$(am__dirstamp) -gc/pooltable.lo: gc/$(am__dirstamp) -gc/proxy.lo: gc/$(am__dirstamp) -gcstub/$(am__dirstamp): - @$(MKDIR_P) gcstub - @: > gcstub/$(am__dirstamp) -gcstub/gc.lo: gcstub/$(am__dirstamp) core/sys/posix/$(am__dirstamp): @$(MKDIR_P) core/sys/posix @: > core/sys/posix/$(am__dirstamp) @@ -1856,8 +1840,6 @@ mostlyclean-compile: -rm -f gcc/sections/*.lo -rm -f gcc/unwind/*.$(OBJEXT) -rm -f gcc/unwind/*.lo - -rm -f gcstub/*.$(OBJEXT) - -rm -f gcstub/*.lo -rm -f rt/*.$(OBJEXT) -rm -f rt/*.lo -rm -f rt/typeinfo/*.$(OBJEXT) @@ -1969,7 +1951,6 @@ clean-libtool: -rm -rf gcc/.libs gcc/_libs -rm -rf gcc/sections/.libs gcc/sections/_libs -rm -rf gcc/unwind/.libs gcc/unwind/_libs - -rm -rf gcstub/.libs gcstub/_libs -rm -rf rt/.libs rt/_libs -rm -rf rt/typeinfo/.libs rt/typeinfo/_libs -rm -rf rt/util/.libs rt/util/_libs @@ -2126,7 +2107,6 @@ distclean-generic: -rm -f gcc/$(am__dirstamp) -rm -f gcc/sections/$(am__dirstamp) -rm -f gcc/unwind/$(am__dirstamp) - -rm -f gcstub/$(am__dirstamp) -rm -f rt/$(am__dirstamp) -rm -f rt/typeinfo/$(am__dirstamp) -rm -f rt/util/$(am__dirstamp) diff --git a/libphobos/libdruntime/gcstub/gc.d b/libphobos/libdruntime/gcstub/gc.d deleted file mode 100644 index 9124a78ef53..00000000000 --- a/libphobos/libdruntime/gcstub/gc.d +++ /dev/null @@ -1,388 +0,0 @@ -/** - * This module contains a minimal garbage collector implementation according to - * published requirements. This library is mostly intended to serve as an - * example, but it is usable in applications which do not rely on a garbage - * collector to clean up memory (ie. when dynamic array resizing is not used, - * and all memory allocated with 'new' is freed deterministically with - * 'delete'). - * - * Please note that block attribute data must be tracked, or at a minimum, the - * FINALIZE bit must be tracked for any allocated memory block because calling - * rt_finalize on a non-object block can result in an access violation. In the - * allocator below, this tracking is done via a leading uint bitmask. A real - * allocator may do better to store this data separately, similar to the basic - * GC. - * - * Copyright: Copyright Sean Kelly 2005 - 2009. - * License: $(WEB www.boost.org/LICENSE_1_0.txt, Boost License 1.0). - * Authors: Sean Kelly - */ - -/* Copyright Sean Kelly 2005 - 2009. - * Distributed under the Boost Software License, Version 1.0. - * (See accompanying file LICENSE or copy at - * http://www.boost.org/LICENSE_1_0.txt) - */ -module gc.gc; - -private -{ - import core.stdc.stdlib; - import core.stdc.stdio; - - static import core.memory; - private alias BlkAttr = core.memory.GC.BlkAttr; - private alias BlkInfo = core.memory.GC.BlkInfo; - - extern (C) void thread_init(); - extern (C) void onOutOfMemoryError(void* pretend_sideffect = null) @trusted pure nothrow @nogc; /* dmd @@@BUG11461@@@ */ - - struct Proxy - { - extern (C) void function() gc_enable; - extern (C) void function() gc_disable; - extern (C) void function() gc_collect; - extern (C) void function() gc_minimize; - - extern (C) uint function(void*) gc_getAttr; - extern (C) uint function(void*, uint) gc_setAttr; - extern (C) uint function(void*, uint) gc_clrAttr; - - extern (C) void* function(size_t, uint, const TypeInfo) gc_malloc; - extern (C) BlkInfo function(size_t, uint, const TypeInfo) gc_qalloc; - extern (C) void* function(size_t, uint, const TypeInfo) gc_calloc; - extern (C) void* function(void*, size_t, uint ba, const TypeInfo) gc_realloc; - extern (C) size_t function(void*, size_t, size_t, const TypeInfo) gc_extend; - extern (C) size_t function(size_t) gc_reserve; - extern (C) void function(void*) gc_free; - - extern (C) void* function(void*) gc_addrOf; - extern (C) size_t function(void*) gc_sizeOf; - - extern (C) BlkInfo function(void*) gc_query; - - extern (C) void function(void*) gc_addRoot; - extern (C) void function(void*, size_t, const TypeInfo ti) gc_addRange; - - extern (C) void function(void*) gc_removeRoot; - extern (C) void function(void*) gc_removeRange; - extern (C) void function(in void[]) gc_runFinalizers; - - extern (C) bool function() gc_inFinalizer; - } - - __gshared Proxy pthis; - __gshared Proxy* proxy; - - void initProxy() - { - pthis.gc_enable = &gc_enable; - pthis.gc_disable = &gc_disable; - pthis.gc_collect = &gc_collect; - pthis.gc_minimize = &gc_minimize; - - pthis.gc_getAttr = &gc_getAttr; - pthis.gc_setAttr = &gc_setAttr; - pthis.gc_clrAttr = &gc_clrAttr; - - pthis.gc_malloc = &gc_malloc; - pthis.gc_qalloc = &gc_qalloc; - pthis.gc_calloc = &gc_calloc; - pthis.gc_realloc = &gc_realloc; - pthis.gc_extend = &gc_extend; - pthis.gc_reserve = &gc_reserve; - pthis.gc_free = &gc_free; - - pthis.gc_addrOf = &gc_addrOf; - pthis.gc_sizeOf = &gc_sizeOf; - - pthis.gc_query = &gc_query; - - pthis.gc_addRoot = &gc_addRoot; - pthis.gc_addRange = &gc_addRange; - - pthis.gc_removeRoot = &gc_removeRoot; - pthis.gc_removeRange = &gc_removeRange; - pthis.gc_runFinalizers = &gc_runFinalizers; - - pthis.gc_inFinalizer = &gc_inFinalizer; - } - - __gshared void** roots = null; - __gshared size_t nroots = 0; - - struct Range - { - void* pos; - size_t len; - TypeInfo ti; // should be tail const, but doesn't exist for references - } - - __gshared Range* ranges = null; - __gshared size_t nranges = 0; -} - -extern (C) void gc_init() -{ - // NOTE: The GC must initialize the thread library before its first - // collection, and always before returning from gc_init(). - thread_init(); - initProxy(); -} - -extern (C) void gc_term() -{ - free( roots ); - free( ranges ); -} - -extern (C) void gc_enable() -{ - if ( proxy is null ) - return; - return proxy.gc_enable(); -} - -extern (C) void gc_disable() -{ - if ( proxy is null ) - return; - return proxy.gc_disable(); -} - -extern (C) void gc_collect() -{ - if ( proxy is null ) - return; - return proxy.gc_collect(); -} - -extern (C) void gc_minimize() -{ - if ( proxy is null ) - return; - return proxy.gc_minimize(); -} - -extern (C) uint gc_getAttr( void* p ) -{ - if ( proxy is null ) - return 0; - return proxy.gc_getAttr( p ); -} - -extern (C) uint gc_setAttr( void* p, uint a ) -{ - if ( proxy is null ) - return 0; - return proxy.gc_setAttr( p, a ); -} - -extern (C) uint gc_clrAttr( void* p, uint a ) -{ - if ( proxy is null ) - return 0; - return proxy.gc_clrAttr( p, a ); -} - -extern (C) void* gc_malloc( size_t sz, uint ba = 0, const TypeInfo ti = null ) -{ - if ( proxy is null ) - { - void* p = malloc( sz ); - - if ( sz && p is null ) - onOutOfMemoryError(); - return p; - } - return proxy.gc_malloc( sz, ba, ti ); -} - -extern (C) BlkInfo gc_qalloc( size_t sz, uint ba = 0, const TypeInfo ti = null ) -{ - if ( proxy is null ) - { - BlkInfo retval; - retval.base = gc_malloc(sz, ba); - retval.size = sz; - retval.attr = ba; - return retval; - } - return proxy.gc_qalloc( sz, ba, ti ); -} - -extern (C) void* gc_calloc( size_t sz, uint ba = 0, const TypeInfo ti = null ) -{ - if ( proxy is null ) - { - void* p = calloc( 1, sz ); - - if ( sz && p is null ) - onOutOfMemoryError(); - return p; - } - return proxy.gc_calloc( sz, ba, ti ); -} - -extern (C) void* gc_realloc( void* p, size_t sz, uint ba = 0, const TypeInfo ti = null ) -{ - if ( proxy is null ) - { - p = realloc( p, sz ); - - if ( sz && p is null ) - onOutOfMemoryError(); - return p; - } - return proxy.gc_realloc( p, sz, ba, ti ); -} - -extern (C) size_t gc_extend( void* p, size_t mx, size_t sz, const TypeInfo ti = null ) -{ - if ( proxy is null ) - return 0; - return proxy.gc_extend( p, mx, sz, ti ); -} - -extern (C) size_t gc_reserve( size_t sz ) -{ - if ( proxy is null ) - return 0; - return proxy.gc_reserve( sz ); -} - -extern (C) void gc_free( void* p ) -{ - if ( proxy is null ) - return free( p ); - return proxy.gc_free( p ); -} - -extern (C) void* gc_addrOf( void* p ) -{ - if ( proxy is null ) - return null; - return proxy.gc_addrOf( p ); -} - -extern (C) size_t gc_sizeOf( void* p ) -{ - if ( proxy is null ) - return 0; - return proxy.gc_sizeOf( p ); -} - -extern (C) BlkInfo gc_query( void* p ) -{ - if ( proxy is null ) - return BlkInfo.init; - return proxy.gc_query( p ); -} - -extern (C) void gc_addRoot( void* p ) -{ - if ( proxy is null ) - { - void** r = cast(void**) realloc( roots, - (nroots+1) * roots[0].sizeof ); - if ( r is null ) - onOutOfMemoryError(); - r[nroots++] = p; - roots = r; - return; - } - return proxy.gc_addRoot( p ); -} - -extern (C) void gc_addRange( void* p, size_t sz, const TypeInfo ti = null ) -{ - //printf("gcstub::gc_addRange() proxy = %p\n", proxy); - if ( proxy is null ) - { - Range* r = cast(Range*) realloc( ranges, - (nranges+1) * ranges[0].sizeof ); - if ( r is null ) - onOutOfMemoryError(); - r[nranges].pos = p; - r[nranges].len = sz; - r[nranges].ti = cast()ti; - ranges = r; - ++nranges; - return; - } - return proxy.gc_addRange( p, sz, ti ); -} - -extern (C) void gc_removeRoot( void *p ) -{ - if ( proxy is null ) - { - for ( size_t i = 0; i < nroots; ++i ) - { - if ( roots[i] is p ) - { - roots[i] = roots[--nroots]; - return; - } - } - assert( false ); - } - return proxy.gc_removeRoot( p ); -} - -extern (C) void gc_removeRange( void *p ) -{ - if ( proxy is null ) - { - for ( size_t i = 0; i < nranges; ++i ) - { - if ( ranges[i].pos is p ) - { - ranges[i] = ranges[--nranges]; - return; - } - } - assert( false ); - } - return proxy.gc_removeRange( p ); -} - -extern (C) void gc_runFinalizers( in void[] segment ) -{ - if ( proxy !is null ) - proxy.gc_runFinalizers( segment ); -} - -extern (C) bool gc_inFinalizer() -{ - if ( proxy !is null ) - return proxy.gc_inFinalizer(); - return false; -} - -extern (C) Proxy* gc_getProxy() -{ - return &pthis; -} - -export extern (C) void gc_setProxy( Proxy* p ) -{ - if ( proxy !is null ) - { - // TODO: Decide if this is an error condition. - } - proxy = p; - foreach ( r; roots[0 .. nroots] ) - proxy.gc_addRoot( r ); - foreach ( r; ranges[0 .. nranges] ) - proxy.gc_addRange( r.pos, r.len, r.ti ); -} - -export extern (C) void gc_clrProxy() -{ - foreach ( r; ranges[0 .. nranges] ) - proxy.gc_removeRange( r.pos ); - foreach ( r; roots[0 .. nroots] ) - proxy.gc_removeRoot( r ); - proxy = null; -} diff --git a/libphobos/m4/druntime.m4 b/libphobos/m4/druntime.m4 index 3b6e474488d..7221712a888 100644 --- a/libphobos/m4/druntime.m4 +++ b/libphobos/m4/druntime.m4 @@ -116,19 +116,3 @@ AC_DEFUN([DRUNTIME_INSTALL_DIRECTORIES], gdc_include_dir='$(libdir)/gcc/${target_alias}/${gcc_version}/include/d' AC_SUBST(gdc_include_dir) ]) - - -# DRUNTIME_GC -# ----------- -# Add the --enable-druntime-gc option and create the -# DRUNTIME_GC_ENABLE conditional -AC_DEFUN([DRUNTIME_GC], -[ - dnl switch between gc and gcstub - AC_ARG_ENABLE(druntime-gc, - AC_HELP_STRING([--enable-druntime-gc], - [enable D runtime garbage collector (default: yes)]), - [enable_druntime_gc=no],[enable_druntime_gc=yes]) - - AM_CONDITIONAL([DRUNTIME_GC_ENABLE], [test "$enable_druntime_gc" = "yes"]) -])