libphobos: Use libdruntime as a convenience library for libphobos.
authorIain Buclaw <ibuclaw@gdcproject.org>
Fri, 10 Apr 2020 07:35:09 +0000 (09:35 +0200)
committerIain Buclaw <ibuclaw@gdcproject.org>
Fri, 10 Apr 2020 10:46:12 +0000 (12:46 +0200)
As a prerequesite for PR94304, it becomes easier to manage selectively
compiling sublibraries when there's only one library to link to.

So a druntime convenience library is built to be part of phobos, however
separate druntime library is still built and installed, to allow linking
only to the core runtime explicitly, rather than pulling in the entire
standard library with it.

The gdc driver no longer generates an '-lgdruntime' option, and the
inclusion of the libdruntime library path has been removed from the
testsuite.

gcc/d/ChangeLog:

* d-spec.cc (LIBDRUNTIME): Remove.
(LIBDRUNTIME_PROFILE): Remove.
(lang_specific_driver): Don't link in libgdruntime.

gcc/testsuite/ChangeLog:

* lib/gdc.exp (gdc_link_flags): Remove libdruntime library path.

libphobos/ChangeLog:

* d_rules.am (libdgruntime_la_LINK): Move to libdruntime/Makefile.am.
(libgphobos_la_LINK): Move to src/Makefile.am
* libdruntime/Makefile.am: Add libgdruntime_convenience library.
* libdruntime/Makefile.in: Regenerate.
* src/Makefile.am (libgphobos_la_LIBADD): Add libgdruntime_convenience
library.
(libgphobos_la_DEPENDENCIES): Likewise.
* src/Makefile.in: Regenerate.
* testsuite/lib/libphobos.exp: Remove libdruntime library paths.
* testsuite/testsuite_flags.in: Likewise.

12 files changed:
gcc/d/ChangeLog
gcc/d/d-spec.cc
gcc/testsuite/ChangeLog
gcc/testsuite/lib/gdc.exp
libphobos/ChangeLog
libphobos/d_rules.am
libphobos/libdruntime/Makefile.am
libphobos/libdruntime/Makefile.in
libphobos/src/Makefile.am
libphobos/src/Makefile.in
libphobos/testsuite/lib/libphobos.exp
libphobos/testsuite/testsuite_flags.in

index 73fd18449545345c413ec19ecab6a0958d4ba22d..5f7e9672866c6fc3de80591836195e3a1fc0c1af 100644 (file)
@@ -1,3 +1,9 @@
+2020-04-10  Iain Buclaw  <ibuclaw@gdcproject.org>
+
+       * d-spec.cc (LIBDRUNTIME): Remove.
+       (LIBDRUNTIME_PROFILE): Remove.
+       (lang_specific_driver): Don't link in libgdruntime.
+
 2020-04-07  Iain Buclaw  <ibuclaw@gdcproject.org>
 
        PR d/94425
index 8a0c7ca471cfa79faf9d6428476075eb3c5c23d2..e0844222520aa3ec84eba057bd0fe939ab30c8b3 100644 (file)
@@ -44,13 +44,6 @@ along with GCC; see the file COPYING3.  If not see
 #define LIBPHOBOS_PROFILE LIBPHOBOS
 #endif
 
-#ifndef LIBDRUNTIME
-#define LIBDRUNTIME "gdruntime"
-#endif
-#ifndef LIBDRUNTIME_PROFILE
-#define LIBDRUNTIME_PROFILE LIBDRUNTIME
-#endif
-
 /* What do with libgphobos.  */
 enum phobos_action
 {
@@ -322,7 +315,7 @@ lang_specific_driver (cl_decoded_option **in_decoded_options,
 
   /* Make sure to have room for the trailing NULL argument.
      - needstdcxx might add `-lstdcxx'
-     - libphobos adds `-Bstatic -lphobos -ldruntime -Bdynamic'
+     - libphobos adds `-Bstatic -lphobos -Bdynamic'
      - only_source adds 1 more arg, also maybe add `-o'.  */
   num_args = argc + need_stdcxx + shared_libgcc + need_phobos * 4 + 2;
   new_decoded_options = XNEWVEC (cl_decoded_option, num_args);
@@ -442,11 +435,6 @@ lang_specific_driver (cl_decoded_option **in_decoded_options,
                       CL_DRIVER, &new_decoded_options[j]);
       added_libraries++;
       j++;
-      generate_option (OPT_l,
-                      saw_profile_flag ? LIBDRUNTIME_PROFILE : LIBDRUNTIME, 1,
-                      CL_DRIVER, &new_decoded_options[j]);
-      added_libraries++;
-      j++;
 
 #ifdef HAVE_LD_STATIC_DYNAMIC
       if (phobos_library == PHOBOS_DYNAMIC && static_link)
index 72e0d519bb95d80d4f4f5a556250bec0fdb15ce2..bced3e27d86de08fa273ff941592ac363ad33ae3 100644 (file)
@@ -1,3 +1,7 @@
+2020-04-10  Iain Buclaw  <ibuclaw@gdcproject.org>
+
+       * lib/gdc.exp (gdc_link_flags): Remove libdruntime library paths.
+
 2020-04-10  Bin Cheng  <bin.cheng@linux.alibaba.com>
 
        * g++.dg/coroutines/co-await-syntax-10.C: New test.
index ddc6d9026a2baaae4627c0949d49732529cb5381..3912d9c1e2196d839c1f5c7279fb3f2a06a90dbf 100644 (file)
@@ -146,16 +146,11 @@ proc gdc_link_flags { paths } {
            append flags "-L${gccpath}/libphobos/src/.libs "
            append ld_library_path ":${gccpath}/libphobos/src/.libs"
        }
-       if { [file exists "${gccpath}/libphobos/libdruntime/.libs/libgdruntime.a"] \
-            || [file exists "${gccpath}/libphobos/libdruntime/.libs/libgdruntime.${shlib_ext}"] } {
-           append flags "-L${gccpath}/libphobos/libdruntime/.libs "
-           append ld_library_path ":${gccpath}/libphobos/libdruntime/.libs"
-       }
        # Static linking is default. If only the shared lib is available adjust
        # flags to always use it. If both are available, set SHARED_OPTION which
        # will be added to PERMUTE_ARGS
-       if { [file exists "${gccpath}/libphobos/libdruntime/.libs/libgdruntime.${shlib_ext}"] } {
-           if { [file exists "${gccpath}/libphobos/libdruntime/.libs/libgdruntime.a"] } {
+       if { [file exists "${gccpath}/libphobos/src/.libs/libgphobos.${shlib_ext}"] } {
+           if { [file exists "${gccpath}/libphobos/src/.libs/libgphobos.a"] } {
                set SHARED_OPTION "-shared-libphobos"
            } else {
                append flags "-shared-libphobos "
@@ -181,11 +176,6 @@ proc gdc_link_flags { paths } {
            append flags "-B${libphobos} -L${libphobos} "
            append ld_library_path ":${libphobos}"
        }
-       set libdruntime [lookfor_file ${tool_root_dir} libgdruntime]
-       if { $libdruntime != "" } {
-           append flags "-L${libdruntime} "
-           append ld_library_path ":${libdruntime}"
-       }
        set libiberty [lookfor_file ${tool_root_dir} libiberty]
        if { $libiberty != "" } {
            append flags "-L${libiberty} "
index dc19a19851f69e8b1caedaf3e9afffaf5e4cc580..653f48115bdf49aab37372070761cee734deaebe 100644 (file)
@@ -1,3 +1,16 @@
+2020-04-10  Iain Buclaw  <ibuclaw@gdcproject.org>
+
+       * d_rules.am (libdgruntime_la_LINK): Move to libdruntime/Makefile.am.
+       (libgphobos_la_LINK): Move to src/Makefile.am
+       * libdruntime/Makefile.am: Add libgdruntime_convenience library.
+       * libdruntime/Makefile.in: Regenerate.
+       * src/Makefile.am (libgphobos_la_LIBADD): Add libgdruntime_convenience
+       library.
+       (libgphobos_la_DEPENDENCIES): Likewise.
+       * src/Makefile.in: Regenerate.
+       * testsuite/lib/libphobos.exp: Remove libdruntime library paths.
+       * testsuite/testsuite_flags.in: Likewise.
+
 2020-04-09  Iain Buclaw  <ibuclaw@gdcproject.org>
 
        * configure: Regenerate.
index 979142b09d39c0fce38df2ba5b205ad539778a16..c05c8e8c6909ccc7d77d3ee374be13433e76b318 100644 (file)
@@ -32,14 +32,3 @@ toolexeclibdir = $(libphobos_toolexeclibdir)
 
 LTDCOMPILE = $(LIBTOOL) --tag=D $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
        --mode=compile $(GDC) $(AM_DFLAGS)
-
-# Also override library link commands: This is not strictly
-# required, but we want to record additional dependencies such
-# as pthread in the library
-libgdruntime_la_LINK = $(LIBTOOL) --tag=D $(AM_LIBTOOLFLAGS) \
-       $(LIBTOOLFLAGS) --mode=link $(GDC) $(AM_CFLAGS) $(CFLAGS) \
-       $(libgdruntime_la_LDFLAGS) $(LDFLAGS) -o $@
-
-libgphobos_la_LINK = $(LIBTOOL) --tag=D $(libgphobos_la_LIBTOOLFLAGS) \
-       $(LIBTOOLFLAGS) --mode=link $(GDC) $(AM_CFLAGS) $(CFLAGS) \
-       $(libgphobos_la_LDFLAGS) $(LDFLAGS) -o $@
index c1c446d14fd657360f112c50a2a09e42afe0064f..e1a38153de0fd23e1c254d950799c92c54d2f786 100644 (file)
@@ -119,6 +119,8 @@ DRUNTIME_DSOURCES_GENERATED = gcc/config.d gcc/libbacktrace.d
 ALL_DRUNTIME_SOURCES = $(DRUNTIME_DSOURCES) $(DRUNTIME_CSOURCES) \
        $(DRUNTIME_SOURCES_CONFIGURED) $(DRUNTIME_DSOURCES_GENERATED)
 
+# Need this library to both be part of libgphobos.a, and installed separately.
+# 1) separate libgdruntime.la
 toolexeclib_LTLIBRARIES = libgdruntime.la
 libgdruntime_la_SOURCES = $(ALL_DRUNTIME_SOURCES)
 libgdruntime_la_LIBTOOLFLAGS =
@@ -126,6 +128,21 @@ libgdruntime_la_LDFLAGS = -Wc,-nophoboslib,-dstartfiles,-B../src,-Bgcc \
     -version-info $(libtool_VERSION)
 libgdruntime_la_LIBADD = $(LIBATOMIC) $(LIBBACKTRACE)
 libgdruntime_la_DEPENDENCIES = $(DRTSTUFF)
+# Also override library link commands: This is not strictly
+# required, but we want to record additional dependencies such
+# as pthread in the library
+libgdruntime_la_LINK = $(LIBTOOL) --tag=D $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(GDC) $(AM_CFLAGS) $(CFLAGS) \
+       $(libgdruntime_la_LDFLAGS) $(LDFLAGS) -o $@
+
+# 2) integrated libgdruntime_convenience.la that is to be part of libgphobos.a
+noinst_LTLIBRARIES = libgdruntime_convenience.la
+libgdruntime_convenience_la_SOURCES = $(libgdruntime_la_SOURCES)
+libgdruntime_convenience_la_LIBTOOLFLAGS = $(libgdruntime_la_LIBTOOLFLAGS)
+libgdruntime_convenience_la_LDFLAGS = $(libgdruntime_la_LDFLAGS)
+libgdruntime_convenience_la_LIBADD = $(libgdruntime_la_LIBADD)
+libgdruntime_convenience_la_DEPENDENCIES = $(libgdruntime_la_DEPENDENCIES)
+libgdruntime_convenience_la_LINK = $(libgdruntime_la_LINK)
 
 # Handles generated files as well
 install-data-local:
index 9cb3b60520d308097d261083e30ef2f10383f3d8..3bb023ffc976d78f7d3471321f44fb8496639fae 100644 (file)
@@ -181,7 +181,7 @@ am__uninstall_files_from_dir = { \
   }
 am__installdirs = "$(DESTDIR)$(toolexeclibdir)" \
        "$(DESTDIR)$(toolexeclibdir)"
-LTLIBRARIES = $(toolexeclib_LTLIBRARIES)
+LTLIBRARIES = $(noinst_LTLIBRARIES) $(toolexeclib_LTLIBRARIES)
 am__DEPENDENCIES_1 =
 am__dirstamp = $(am__leading_dot)dirstamp
 am__objects_1 = core/atomic.lo core/attribute.lo core/bitop.lo \
@@ -459,6 +459,30 @@ 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__DEPENDENCIES_2 = $(am__DEPENDENCIES_1) $(am__DEPENDENCIES_1)
+am__objects_35 = core/stdc/libgdruntime_convenience_la-errno_.lo
+@DRUNTIME_CPU_AARCH64_TRUE@am__objects_36 = config/aarch64/libgdruntime_convenience_la-switchcontext.lo
+@DRUNTIME_CPU_ARM_TRUE@am__objects_37 = config/arm/libgdruntime_convenience_la-switchcontext.lo
+@DRUNTIME_CPU_MIPS_TRUE@am__objects_38 = config/mips/libgdruntime_convenience_la-switchcontext.lo
+@DRUNTIME_CPU_POWERPC_TRUE@am__objects_39 = config/powerpc/libgdruntime_convenience_la-switchcontext.lo
+@DRUNTIME_CPU_POWERPC64_TRUE@am__objects_40 = config/powerpc64/libgdruntime_convenience_la-callwithstack.lo
+@DRUNTIME_CPU_X86_TRUE@@DRUNTIME_OS_MINGW_TRUE@am__objects_41 = config/mingw/libgdruntime_convenience_la-switchcontext.lo
+@DRUNTIME_CPU_X86_TRUE@@DRUNTIME_OS_MINGW_FALSE@am__objects_42 = config/x86/libgdruntime_convenience_la-switchcontext.lo
+@DRUNTIME_CPU_SYSTEMZ_TRUE@am__objects_43 = config/systemz/libgdruntime_convenience_la-get_tls_offset.lo
+@DRUNTIME_CPU_S390_TRUE@am__objects_44 = config/s390/libgdruntime_convenience_la-get_tls_offset.lo
+am__objects_45 = $(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_36) $(am__objects_37) \
+       $(am__objects_38) $(am__objects_39) $(am__objects_40) \
+       $(am__objects_41) $(am__objects_42) $(am__objects_43) \
+       $(am__objects_44)
+am__objects_46 = $(am__objects_1) $(am__objects_35) $(am__objects_45) \
+       $(am__objects_33)
+am__objects_47 = $(am__objects_46)
+am_libgdruntime_convenience_la_OBJECTS = $(am__objects_47)
+libgdruntime_convenience_la_OBJECTS =  \
+       $(am_libgdruntime_convenience_la_OBJECTS)
 AM_V_P = $(am__v_P_@AM_V@)
 am__v_P_ = $(am__v_P_@AM_DEFAULT_V@)
 am__v_P_0 = false
@@ -505,7 +529,8 @@ AM_V_CCLD = $(am__v_CCLD_@AM_V@)
 am__v_CCLD_ = $(am__v_CCLD_@AM_DEFAULT_V@)
 am__v_CCLD_0 = @echo "  CCLD    " $@;
 am__v_CCLD_1 = 
-SOURCES = $(libgdruntime_la_SOURCES)
+SOURCES = $(libgdruntime_la_SOURCES) \
+       $(libgdruntime_convenience_la_SOURCES)
 am__can_run_installinfo = \
   case $$AM_UPDATE_INFO_DIR in \
     n|no|NO) false;; \
@@ -689,18 +714,6 @@ LTDCOMPILE = $(LIBTOOL) --tag=D $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
        --mode=compile $(GDC) $(AM_DFLAGS)
 
 
-# Also override library link commands: This is not strictly
-# required, but we want to record additional dependencies such
-# as pthread in the library
-libgdruntime_la_LINK = $(LIBTOOL) --tag=D $(AM_LIBTOOLFLAGS) \
-       $(LIBTOOLFLAGS) --mode=link $(GDC) $(AM_CFLAGS) $(CFLAGS) \
-       $(libgdruntime_la_LDFLAGS) $(LDFLAGS) -o $@
-
-libgphobos_la_LINK = $(LIBTOOL) --tag=D $(libgphobos_la_LIBTOOLFLAGS) \
-       $(LIBTOOLFLAGS) --mode=link $(GDC) $(AM_CFLAGS) $(CFLAGS) \
-       $(libgphobos_la_LDFLAGS) $(LDFLAGS) -o $@
-
-
 # Include D build rules
 
 # Make sure GDC can find libdruntime include files
@@ -741,6 +754,9 @@ DRUNTIME_DSOURCES_GENERATED = gcc/config.d gcc/libbacktrace.d
 ALL_DRUNTIME_SOURCES = $(DRUNTIME_DSOURCES) $(DRUNTIME_CSOURCES) \
        $(DRUNTIME_SOURCES_CONFIGURED) $(DRUNTIME_DSOURCES_GENERATED)
 
+
+# Need this library to both be part of libgphobos.a, and installed separately.
+# 1) separate libgdruntime.la
 toolexeclib_LTLIBRARIES = libgdruntime.la
 libgdruntime_la_SOURCES = $(ALL_DRUNTIME_SOURCES)
 libgdruntime_la_LIBTOOLFLAGS = 
@@ -749,6 +765,22 @@ libgdruntime_la_LDFLAGS = -Wc,-nophoboslib,-dstartfiles,-B../src,-Bgcc \
 
 libgdruntime_la_LIBADD = $(LIBATOMIC) $(LIBBACKTRACE)
 libgdruntime_la_DEPENDENCIES = $(DRTSTUFF)
+# Also override library link commands: This is not strictly
+# required, but we want to record additional dependencies such
+# as pthread in the library
+libgdruntime_la_LINK = $(LIBTOOL) --tag=D $(AM_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(GDC) $(AM_CFLAGS) $(CFLAGS) \
+       $(libgdruntime_la_LDFLAGS) $(LDFLAGS) -o $@
+
+
+# 2) integrated libgdruntime_convenience.la that is to be part of libgphobos.a
+noinst_LTLIBRARIES = libgdruntime_convenience.la
+libgdruntime_convenience_la_SOURCES = $(libgdruntime_la_SOURCES)
+libgdruntime_convenience_la_LIBTOOLFLAGS = $(libgdruntime_la_LIBTOOLFLAGS)
+libgdruntime_convenience_la_LDFLAGS = $(libgdruntime_la_LDFLAGS)
+libgdruntime_convenience_la_LIBADD = $(libgdruntime_la_LIBADD)
+libgdruntime_convenience_la_DEPENDENCIES = $(libgdruntime_la_DEPENDENCIES)
+libgdruntime_convenience_la_LINK = $(libgdruntime_la_LINK)
 
 # Source file definitions. Boring stuff, auto-generated with
 # https://gist.github.com/jpf91/8ad1dbc9902d6ad876313f134c6527d1
@@ -1024,6 +1056,17 @@ $(ACLOCAL_M4): @MAINTAINER_MODE_TRUE@ $(am__aclocal_m4_deps)
        cd $(top_builddir) && $(MAKE) $(AM_MAKEFLAGS) am--refresh
 $(am__aclocal_m4_deps):
 
+clean-noinstLTLIBRARIES:
+       -test -z "$(noinst_LTLIBRARIES)" || rm -f $(noinst_LTLIBRARIES)
+       @list='$(noinst_LTLIBRARIES)'; \
+       locs=`for p in $$list; do echo $$p; done | \
+             sed 's|^[^/]*$$|.|; s|/[^/]*$$||; s|$$|/so_locations|' | \
+             sort -u`; \
+       test -z "$$locs" || { \
+         echo rm -f $${locs}; \
+         rm -f $${locs}; \
+       }
+
 install-toolexeclibLTLIBRARIES: $(toolexeclib_LTLIBRARIES)
        @$(NORMAL_INSTALL)
        @list='$(toolexeclib_LTLIBRARIES)'; test -n "$(toolexeclibdir)" || list=; \
@@ -1745,6 +1788,29 @@ gcc/libbacktrace.lo: gcc/$(am__dirstamp)
 
 libgdruntime.la: $(libgdruntime_la_OBJECTS) $(libgdruntime_la_DEPENDENCIES) $(EXTRA_libgdruntime_la_DEPENDENCIES) 
        $(AM_V_GEN)$(libgdruntime_la_LINK) -rpath $(toolexeclibdir) $(libgdruntime_la_OBJECTS) $(libgdruntime_la_LIBADD) $(LIBS)
+core/stdc/libgdruntime_convenience_la-errno_.lo:  \
+       core/stdc/$(am__dirstamp)
+config/aarch64/libgdruntime_convenience_la-switchcontext.lo:  \
+       config/aarch64/$(am__dirstamp)
+config/arm/libgdruntime_convenience_la-switchcontext.lo:  \
+       config/arm/$(am__dirstamp)
+config/mips/libgdruntime_convenience_la-switchcontext.lo:  \
+       config/mips/$(am__dirstamp)
+config/powerpc/libgdruntime_convenience_la-switchcontext.lo:  \
+       config/powerpc/$(am__dirstamp)
+config/powerpc64/libgdruntime_convenience_la-callwithstack.lo:  \
+       config/powerpc64/$(am__dirstamp)
+config/mingw/libgdruntime_convenience_la-switchcontext.lo:  \
+       config/mingw/$(am__dirstamp)
+config/x86/libgdruntime_convenience_la-switchcontext.lo:  \
+       config/x86/$(am__dirstamp)
+config/systemz/libgdruntime_convenience_la-get_tls_offset.lo:  \
+       config/systemz/$(am__dirstamp)
+config/s390/libgdruntime_convenience_la-get_tls_offset.lo:  \
+       config/s390/$(am__dirstamp)
+
+libgdruntime_convenience.la: $(libgdruntime_convenience_la_OBJECTS) $(libgdruntime_convenience_la_DEPENDENCIES) $(EXTRA_libgdruntime_convenience_la_DEPENDENCIES) 
+       $(AM_V_GEN)$(libgdruntime_convenience_la_LINK)  $(libgdruntime_convenience_la_OBJECTS) $(libgdruntime_convenience_la_LIBADD) $(LIBS)
 
 mostlyclean-compile:
        -rm -f *.$(OBJEXT)
@@ -1888,6 +1954,33 @@ config/systemz/libgdruntime_la-get_tls_offset.lo: config/systemz/get_tls_offset.
 config/s390/libgdruntime_la-get_tls_offset.lo: config/s390/get_tls_offset.S
        $(AM_V_CPPAS)$(LIBTOOL) $(AM_V_lt) $(libgdruntime_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -c -o config/s390/libgdruntime_la-get_tls_offset.lo `test -f 'config/s390/get_tls_offset.S' || echo '$(srcdir)/'`config/s390/get_tls_offset.S
 
+config/aarch64/libgdruntime_convenience_la-switchcontext.lo: config/aarch64/switchcontext.S
+       $(AM_V_CPPAS)$(LIBTOOL) $(AM_V_lt) $(libgdruntime_convenience_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -c -o config/aarch64/libgdruntime_convenience_la-switchcontext.lo `test -f 'config/aarch64/switchcontext.S' || echo '$(srcdir)/'`config/aarch64/switchcontext.S
+
+config/arm/libgdruntime_convenience_la-switchcontext.lo: config/arm/switchcontext.S
+       $(AM_V_CPPAS)$(LIBTOOL) $(AM_V_lt) $(libgdruntime_convenience_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -c -o config/arm/libgdruntime_convenience_la-switchcontext.lo `test -f 'config/arm/switchcontext.S' || echo '$(srcdir)/'`config/arm/switchcontext.S
+
+config/mips/libgdruntime_convenience_la-switchcontext.lo: config/mips/switchcontext.S
+       $(AM_V_CPPAS)$(LIBTOOL) $(AM_V_lt) $(libgdruntime_convenience_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -c -o config/mips/libgdruntime_convenience_la-switchcontext.lo `test -f 'config/mips/switchcontext.S' || echo '$(srcdir)/'`config/mips/switchcontext.S
+
+config/powerpc/libgdruntime_convenience_la-switchcontext.lo: config/powerpc/switchcontext.S
+       $(AM_V_CPPAS)$(LIBTOOL) $(AM_V_lt) $(libgdruntime_convenience_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -c -o config/powerpc/libgdruntime_convenience_la-switchcontext.lo `test -f 'config/powerpc/switchcontext.S' || echo '$(srcdir)/'`config/powerpc/switchcontext.S
+
+config/powerpc64/libgdruntime_convenience_la-callwithstack.lo: config/powerpc64/callwithstack.S
+       $(AM_V_CPPAS)$(LIBTOOL) $(AM_V_lt) $(libgdruntime_convenience_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -c -o config/powerpc64/libgdruntime_convenience_la-callwithstack.lo `test -f 'config/powerpc64/callwithstack.S' || echo '$(srcdir)/'`config/powerpc64/callwithstack.S
+
+config/mingw/libgdruntime_convenience_la-switchcontext.lo: config/mingw/switchcontext.S
+       $(AM_V_CPPAS)$(LIBTOOL) $(AM_V_lt) $(libgdruntime_convenience_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -c -o config/mingw/libgdruntime_convenience_la-switchcontext.lo `test -f 'config/mingw/switchcontext.S' || echo '$(srcdir)/'`config/mingw/switchcontext.S
+
+config/x86/libgdruntime_convenience_la-switchcontext.lo: config/x86/switchcontext.S
+       $(AM_V_CPPAS)$(LIBTOOL) $(AM_V_lt) $(libgdruntime_convenience_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -c -o config/x86/libgdruntime_convenience_la-switchcontext.lo `test -f 'config/x86/switchcontext.S' || echo '$(srcdir)/'`config/x86/switchcontext.S
+
+config/systemz/libgdruntime_convenience_la-get_tls_offset.lo: config/systemz/get_tls_offset.S
+       $(AM_V_CPPAS)$(LIBTOOL) $(AM_V_lt) $(libgdruntime_convenience_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -c -o config/systemz/libgdruntime_convenience_la-get_tls_offset.lo `test -f 'config/systemz/get_tls_offset.S' || echo '$(srcdir)/'`config/systemz/get_tls_offset.S
+
+config/s390/libgdruntime_convenience_la-get_tls_offset.lo: config/s390/get_tls_offset.S
+       $(AM_V_CPPAS)$(LIBTOOL) $(AM_V_lt) $(libgdruntime_convenience_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CCAS) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CCASFLAGS) $(CCASFLAGS) -c -o config/s390/libgdruntime_convenience_la-get_tls_offset.lo `test -f 'config/s390/get_tls_offset.S' || echo '$(srcdir)/'`config/s390/get_tls_offset.S
+
 .c.o:
        $(AM_V_CC)$(COMPILE) -c -o $@ $<
 
@@ -1900,6 +1993,9 @@ config/s390/libgdruntime_la-get_tls_offset.lo: config/s390/get_tls_offset.S
 core/stdc/libgdruntime_la-errno_.lo: core/stdc/errno_.c
        $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgdruntime_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o core/stdc/libgdruntime_la-errno_.lo `test -f 'core/stdc/errno_.c' || echo '$(srcdir)/'`core/stdc/errno_.c
 
+core/stdc/libgdruntime_convenience_la-errno_.lo: core/stdc/errno_.c
+       $(AM_V_CC)$(LIBTOOL) $(AM_V_lt) --tag=CC $(libgdruntime_convenience_la_LIBTOOLFLAGS) $(LIBTOOLFLAGS) --mode=compile $(CC) $(DEFS) $(DEFAULT_INCLUDES) $(INCLUDES) $(AM_CPPFLAGS) $(CPPFLAGS) $(AM_CFLAGS) $(CFLAGS) -c -o core/stdc/libgdruntime_convenience_la-errno_.lo `test -f 'core/stdc/errno_.c' || echo '$(srcdir)/'`core/stdc/errno_.c
+
 mostlyclean-libtool:
        -rm -f *.lo
 
@@ -2117,8 +2213,8 @@ maintainer-clean-generic:
        @echo "it deletes files that may require special tools to rebuild."
 clean: clean-am
 
-clean-am: clean-generic clean-libtool clean-toolexeclibLTLIBRARIES \
-       mostlyclean-am
+clean-am: clean-generic clean-libtool clean-noinstLTLIBRARIES \
+       clean-toolexeclibLTLIBRARIES mostlyclean-am
 
 distclean: distclean-am
        -rm -f Makefile
@@ -2189,8 +2285,9 @@ uninstall-am: uninstall-toolexeclibDATA \
 .MAKE: install-am install-strip
 
 .PHONY: CTAGS GTAGS TAGS all all-am check check-am clean clean-generic \
-       clean-libtool clean-toolexeclibLTLIBRARIES cscopelist-am ctags \
-       ctags-am distclean distclean-compile distclean-generic \
+       clean-libtool clean-noinstLTLIBRARIES \
+       clean-toolexeclibLTLIBRARIES cscopelist-am ctags ctags-am \
+       distclean distclean-compile distclean-generic \
        distclean-libtool distclean-tags dvi dvi-am html html-am info \
        info-am install install-am install-data install-data-am \
        install-data-local install-dvi install-dvi-am install-exec \
index d2418a8ca83e0d6fc157a7ee2bc3427f02e80869..51e3f5015654c9db9d99d1d961be8e123da08c8a 100644 (file)
@@ -42,8 +42,17 @@ libgphobos_la_SOURCES = $(ALL_PHOBOS_SOURCES)
 libgphobos_la_LIBTOOLFLAGS =
 libgphobos_la_LDFLAGS = -Wc,-nophoboslib,-dstartfiles,-B../libdruntime/gcc \
     -version-info $(libtool_VERSION)
-libgphobos_la_LIBADD = ../libdruntime/libgdruntime.la $(LIBZ)
-libgphobos_la_DEPENDENCIES = libgphobos.spec
+libgphobos_la_LIBADD = \
+    ../libdruntime/libgdruntime_convenience.la $(LIBZ)
+libgphobos_la_DEPENDENCIES = \
+    ../libdruntime/libgdruntime_convenience.la libgphobos.spec
+
+# Also override library link commands: This is not strictly
+# required, but we want to record additional dependencies such
+# as pthread in the library
+libgphobos_la_LINK = $(LIBTOOL) --tag=D $(libgphobos_la_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(GDC) $(AM_CFLAGS) $(CFLAGS) \
+       $(libgphobos_la_LDFLAGS) $(LDFLAGS) -o $@
 
 # Handles generated files as well
 install-data-local:
index 45651672e1eb0bd25ac0e58eea302cfad85c5048..da9ba834c4bf657431433d107c3726307e2feb07 100644 (file)
@@ -419,18 +419,6 @@ LTDCOMPILE = $(LIBTOOL) --tag=D $(AM_LIBTOOLFLAGS) $(LIBTOOLFLAGS) \
        --mode=compile $(GDC) $(AM_DFLAGS)
 
 
-# Also override library link commands: This is not strictly
-# required, but we want to record additional dependencies such
-# as pthread in the library
-libgdruntime_la_LINK = $(LIBTOOL) --tag=D $(AM_LIBTOOLFLAGS) \
-       $(LIBTOOLFLAGS) --mode=link $(GDC) $(AM_CFLAGS) $(CFLAGS) \
-       $(libgdruntime_la_LDFLAGS) $(LDFLAGS) -o $@
-
-libgphobos_la_LINK = $(LIBTOOL) --tag=D $(libgphobos_la_LIBTOOLFLAGS) \
-       $(LIBTOOLFLAGS) --mode=link $(GDC) $(AM_CFLAGS) $(CFLAGS) \
-       $(libgphobos_la_LDFLAGS) $(LDFLAGS) -o $@
-
-
 # Include D build rules
 
 # Make sure GDC can find libdruntime and libphobos include files
@@ -459,8 +447,20 @@ libgphobos_la_LIBTOOLFLAGS =
 libgphobos_la_LDFLAGS = -Wc,-nophoboslib,-dstartfiles,-B../libdruntime/gcc \
     -version-info $(libtool_VERSION)
 
-libgphobos_la_LIBADD = ../libdruntime/libgdruntime.la $(LIBZ)
-libgphobos_la_DEPENDENCIES = libgphobos.spec
+libgphobos_la_LIBADD = \
+    ../libdruntime/libgdruntime_convenience.la $(LIBZ)
+
+libgphobos_la_DEPENDENCIES = \
+    ../libdruntime/libgdruntime_convenience.la libgphobos.spec
+
+
+# Also override library link commands: This is not strictly
+# required, but we want to record additional dependencies such
+# as pthread in the library
+libgphobos_la_LINK = $(LIBTOOL) --tag=D $(libgphobos_la_LIBTOOLFLAGS) \
+       $(LIBTOOLFLAGS) --mode=link $(GDC) $(AM_CFLAGS) $(CFLAGS) \
+       $(libgphobos_la_LDFLAGS) $(LDFLAGS) -o $@
+
 
 # Source file definitions. Boring stuff, auto-generated with
 # https://gist.github.com/jpf91/8744acebc9dcf1e9d1a35cdff20afbb2
index 3ac0ccb3c1b9bde4aca0bc87f6a4bd035ff6bc4a..7e6e53e9d5c350a7d760ef33d8ed0c76f2756337 100644 (file)
@@ -162,10 +162,6 @@ proc libphobos_init { args } {
        append ld_library_path ":${gccdir}"
     }
 
-    if { [file exists "${blddir}/libdruntime/.libs/libgdruntime.${shlib_ext}"] } {
-       append ld_library_path ":${blddir}/libdruntime/.libs"
-    }
-
     if { [file exists "${blddir}/src/.libs/libgphobos.${shlib_ext}"] } {
        append ld_library_path ":${blddir}/src/.libs"
     }
index 808dde30993f74cb2d844b5a10b388088fbdf502..c5dcac2054f6c007d81e98c167cc9c10cc683768 100755 (executable)
@@ -42,7 +42,6 @@ case ${query} in
     --gdcldflags)
       GDCLDFLAGS="-B${BUILD_DIR}/src
                   -B${BUILD_DIR}/libdruntime/gcc
-                  -L${BUILD_DIR}/libdruntime/.libs
                   -L${BUILD_DIR}/src/.libs"
       echo ${GDCLDFLAGS}
       ;;