aboutsummaryrefslogtreecommitdiff
path: root/libphobos
diff options
context:
space:
mode:
authorIain Buclaw <ibuclaw@gdcproject.org>2019-04-24 02:04:04 +0000
committerIain Buclaw <ibuclaw@gcc.gnu.org>2019-04-24 02:04:04 +0000
commit9bedfe1899e6f29cb51a1bad06bab7d3082fe251 (patch)
tree964c193191e124b66ce1520beb4ce0c5eac618e1 /libphobos
parent0c1eb9639d942e66ac61fd09ad371bfd33facac0 (diff)
downloadgcc-9bedfe1899e6f29cb51a1bad06bab7d3082fe251.zip
gcc-9bedfe1899e6f29cb51a1bad06bab7d3082fe251.tar.gz
gcc-9bedfe1899e6f29cb51a1bad06bab7d3082fe251.tar.bz2
libphobos: Fix link build errors when compiling with unsupported options
The first compilation test to get baseline warnings was getting more messages due to a missing object.d file, compared to later configure tests where libphobos is in the include paths. Because there must always be an object module during compilation, let the tests themselves be an empty object module instead. libphobos/ChangeLog: 2019-04-24 Iain Buclaw <ibuclaw@gdcproject.org> PR d/88431 * configure: Regenerate. * m4/libtool.m4 (lt_simple_compile_test_code): Update to not have dependencies on libphobos. (lt_simple_link_test_code): Likewise. (GDCFLAGS): Don't override for D compiler tests. From-SVN: r270531
Diffstat (limited to 'libphobos')
-rw-r--r--libphobos/ChangeLog9
-rwxr-xr-xlibphobos/configure14
-rw-r--r--libphobos/m4/libtool.m414
3 files changed, 25 insertions, 12 deletions
diff --git a/libphobos/ChangeLog b/libphobos/ChangeLog
index 6f741ea..fa5f7b1 100644
--- a/libphobos/ChangeLog
+++ b/libphobos/ChangeLog
@@ -1,5 +1,14 @@
2019-04-24 Iain Buclaw <ibuclaw@gdcproject.org>
+ PR d/88431
+ * configure: Regenerate.
+ * m4/libtool.m4 (lt_simple_compile_test_code): Update to not have
+ dependencies on libphobos.
+ (lt_simple_link_test_code): Likewise.
+ (GDCFLAGS): Don't override for D compiler tests.
+
+2019-04-24 Iain Buclaw <ibuclaw@gdcproject.org>
+
* configure.tgt: Add aarch64*-*-linux* as a supported target.
2019-04-23 Iain Buclaw <ibuclaw@gdcproject.org>
diff --git a/libphobos/configure b/libphobos/configure
index 8079a73..7c01989 100755
--- a/libphobos/configure
+++ b/libphobos/configure
@@ -11981,10 +11981,16 @@ objext=o
objext_D=$objext
# Code to be used in simple compile tests
-lt_simple_compile_test_code="module mod; extern(C) int main() { return 0; }"
+lt_simple_compile_test_code="\
+ module object;
+ shared int some_variable = 0;
+"
# Code to be used in simple link tests
-lt_simple_link_test_code='module mod; extern(C) int main() { return 0; }'
+lt_simple_link_test_code="\
+ module object;
+ extern(C) int main() { return 0; }
+"
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
@@ -12020,12 +12026,9 @@ $RM -r conftest*
# Allow CC to be a program name with arguments.
lt_save_CC=$CC
lt_save_CFLAGS=$CFLAGS
-lt_save_DFLAGS=$GDCFLAGS
lt_save_GCC=$GCC
GCC=yes
CC=${GDC-"gdc"}
-# Need to specify location for object.d
-GDCFLAGS="-nophoboslib $GDCFLAGS"
CFLAGS=$GDCFLAGS
compiler=$CC
compiler_D=$CC
@@ -13867,7 +13870,6 @@ ac_compiler_gnu=$ac_cv_c_compiler_gnu
GCC=$lt_save_GCC
CC=$lt_save_CC
CFLAGS=$lt_save_CFLAGS
-GDCFLAGS=$lt_save_DFLAGS
GDCFLAGS=$gdc_save_DFLAGS
diff --git a/libphobos/m4/libtool.m4 b/libphobos/m4/libtool.m4
index 44ca572..0263a53 100644
--- a/libphobos/m4/libtool.m4
+++ b/libphobos/m4/libtool.m4
@@ -20,10 +20,16 @@ objext=o
_LT_TAGVAR(objext, $1)=$objext
# Code to be used in simple compile tests
-lt_simple_compile_test_code="module mod; extern(C) int main() { return 0; }"
+lt_simple_compile_test_code="\
+ module object;
+ shared int some_variable = 0;
+"
# Code to be used in simple link tests
-lt_simple_link_test_code='module mod; extern(C) int main() { return 0; }'
+lt_simple_link_test_code="\
+ module object;
+ extern(C) int main() { return 0; }
+"
# ltmain only uses $CC for tagged configurations so make sure $CC is set.
_LT_TAG_COMPILER
@@ -35,12 +41,9 @@ _LT_LINKER_BOILERPLATE
# Allow CC to be a program name with arguments.
lt_save_CC=$CC
lt_save_CFLAGS=$CFLAGS
-lt_save_DFLAGS=$GDCFLAGS
lt_save_GCC=$GCC
GCC=yes
CC=${GDC-"gdc"}
-# Need to specify location for object.d
-GDCFLAGS="-nophoboslib $GDCFLAGS"
CFLAGS=$GDCFLAGS
compiler=$CC
_LT_TAGVAR(compiler, $1)=$CC
@@ -74,5 +77,4 @@ AC_LANG_RESTORE
GCC=$lt_save_GCC
CC=$lt_save_CC
CFLAGS=$lt_save_CFLAGS
-GDCFLAGS=$lt_save_DFLAGS
])# _LT_LANG_D_CONFIG