From 02ce382cd323097f9d02fbf91e0a3f59ebcd3d30 Mon Sep 17 00:00:00 2001 From: Sandra Loosemore Date: Wed, 12 Feb 2020 12:20:15 -0800 Subject: [PATCH] Use a non-empty test program to test ability to link. On bare-metal targets, I/O support is typically provided by a BSP and requires a linker script and/or hosting library to be specified on the linker command line. Linking an empty program with the default linker script may succeed, however, which confuses libstdc++ configuration when programs that probe for the presence of various I/O features fail with link errors. 2020-02-12 Sandra Loosemore PR libstdc++/79193 PR libstdc++/88999 config/ * no-executables.m4: Use a non-empty program to test for linker support. libgcc/ * configure: Regenerated. libgfortran/ * configure: Regenerated. libiberty/ * configure: Regenerated. libitm/ * configure: Regenerated. libobjc/ * configure: Regenerated. libquadmath/ * configure: Regenerated. libssp/ * configure: Regenerated. libstdc++v-3/ * configure: Regenerated. --- config/ChangeLog | 8 ++++++++ config/no-executables.m4 | 4 +++- libgcc/ChangeLog | 7 +++++++ libgcc/configure | 4 ++-- libgfortran/ChangeLog | 7 +++++++ libgfortran/configure | 4 ++-- libiberty/ChangeLog | 7 +++++++ libiberty/configure | 4 ++-- libitm/ChangeLog | 7 +++++++ libitm/configure | 0 libobjc/ChangeLog | 7 +++++++ libobjc/configure | 4 ++-- libquadmath/ChangeLog | 7 +++++++ libquadmath/configure | 4 ++-- libssp/ChangeLog | 7 +++++++ libssp/configure | 4 ++-- libstdc++-v3/ChangeLog | 7 +++++++ libstdc++-v3/configure | 4 ++-- 18 files changed, 81 insertions(+), 15 deletions(-) mode change 100644 => 100755 libitm/configure diff --git a/config/ChangeLog b/config/ChangeLog index f1fec81a0ca..01428dd04ee 100644 --- a/config/ChangeLog +++ b/config/ChangeLog @@ -1,3 +1,11 @@ +2020-02-12 Sandra Loosemore + + PR libstdc++/79193 + PR libstdc++/88999 + + * no-executables.m4: Use a non-empty program to test for linker + support. + 2020-02-01 Andrew Burgess * lib-link.m4 (AC_LIB_LINKFLAGS_BODY): Update shell syntax. diff --git a/config/no-executables.m4 b/config/no-executables.m4 index 90616245ef9..6842f84fba3 100644 --- a/config/no-executables.m4 +++ b/config/no-executables.m4 @@ -25,7 +25,9 @@ AC_BEFORE([$0], [_AC_COMPILER_EXEEXT]) AC_BEFORE([$0], [AC_LINK_IFELSE]) m4_define([_AC_COMPILER_EXEEXT], -[AC_LANG_CONFTEST([AC_LANG_PROGRAM()]) +[AC_LANG_CONFTEST([AC_LANG_PROGRAM( + [#include ], + [printf ("hello world\n");])]) # FIXME: Cleanup? AS_IF([AC_TRY_EVAL(ac_link)], [gcc_no_link=no], [gcc_no_link=yes]) if test x$gcc_no_link = xyes; then diff --git a/libgcc/ChangeLog b/libgcc/ChangeLog index 917d0e76568..7b46ccb40c9 100644 --- a/libgcc/ChangeLog +++ b/libgcc/ChangeLog @@ -1,3 +1,10 @@ +2020-02-12 Sandra Loosemore + + PR libstdc++/79193 + PR libstdc++/88999 + + * configure: Regenerated. + 2020-02-10 Jeff Law * config/frv/frvbegin.c: Use right flags for .ctors and .dtors diff --git a/libgcc/configure b/libgcc/configure index ab8d4713196..093036acf81 100755 --- a/libgcc/configure +++ b/libgcc/configure @@ -3553,11 +3553,11 @@ done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - +#include int main () { - +printf ("hello world\n"); ; return 0; } diff --git a/libgfortran/ChangeLog b/libgfortran/ChangeLog index fe7e48040cd..5632fbc8272 100644 --- a/libgfortran/ChangeLog +++ b/libgfortran/ChangeLog @@ -1,3 +1,10 @@ +2020-02-12 Sandra Loosemore + + PR libstdc++/79193 + PR libstdc++/88999 + + * configure: Regenerated. + 2020-01-24 Maciej W. Rozycki * configure.ac: Handle `--with-toolexeclibdir='. diff --git a/libgfortran/configure b/libgfortran/configure index 8ba6831c8b1..d01654e7c4b 100755 --- a/libgfortran/configure +++ b/libgfortran/configure @@ -4042,11 +4042,11 @@ done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - +#include int main () { - +printf ("hello world\n"); ; return 0; } diff --git a/libiberty/ChangeLog b/libiberty/ChangeLog index b3ec2314d89..84225ad969b 100644 --- a/libiberty/ChangeLog +++ b/libiberty/ChangeLog @@ -1,3 +1,10 @@ +2020-02-12 Sandra Loosemore + + PR libstdc++/79193 + PR libstdc++/88999 + + * configure: Regenerated. + 2020-02-05 Andrew Burgess * hashtab.c (htab_remove_elt): Make a parameter const. diff --git a/libiberty/configure b/libiberty/configure index 7a34dabec32..d2413f13acf 100755 --- a/libiberty/configure +++ b/libiberty/configure @@ -3310,11 +3310,11 @@ done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - +#include int main () { - +printf ("hello world\n"); ; return 0; } diff --git a/libitm/ChangeLog b/libitm/ChangeLog index feccd160330..9c70974776c 100644 --- a/libitm/ChangeLog +++ b/libitm/ChangeLog @@ -1,3 +1,10 @@ +2020-02-12 Sandra Loosemore + + PR libstdc++/79193 + PR libstdc++/88999 + + * configure: Regenerated. + 2020-01-24 Maciej W. Rozycki * configure.ac: Handle `--with-toolexeclibdir='. diff --git a/libitm/configure b/libitm/configure old mode 100644 new mode 100755 diff --git a/libobjc/ChangeLog b/libobjc/ChangeLog index db7fce7df17..b5bba604944 100644 --- a/libobjc/ChangeLog +++ b/libobjc/ChangeLog @@ -1,3 +1,10 @@ +2020-02-12 Sandra Loosemore + + PR libstdc++/79193 + PR libstdc++/88999 + + * configure: Regenerated. + 2020-01-24 Maciej W. Rozycki * Makefile.in (aclocal_deps): Add `toolexeclibdir.m4'. diff --git a/libobjc/configure b/libobjc/configure index 46124b2a9e0..2f8924e5042 100755 --- a/libobjc/configure +++ b/libobjc/configure @@ -2917,11 +2917,11 @@ done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - +#include int main () { - +printf ("hello world\n"); ; return 0; } diff --git a/libquadmath/ChangeLog b/libquadmath/ChangeLog index 0b1db14d8d6..2df546a3aa0 100644 --- a/libquadmath/ChangeLog +++ b/libquadmath/ChangeLog @@ -1,3 +1,10 @@ +2020-02-12 Sandra Loosemore + + PR libstdc++/79193 + PR libstdc++/88999 + + * configure: Regenerated. + 2020-01-24 Maciej W. Rozycki * configure.ac: Handle `--with-toolexeclibdir='. diff --git a/libquadmath/configure b/libquadmath/configure index 339e80944e6..7b45eb7e805 100755 --- a/libquadmath/configure +++ b/libquadmath/configure @@ -3461,11 +3461,11 @@ done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - +#include int main () { - +printf ("hello world\n"); ; return 0; } diff --git a/libssp/ChangeLog b/libssp/ChangeLog index f1ccde4e36f..9e3e6a687ff 100644 --- a/libssp/ChangeLog +++ b/libssp/ChangeLog @@ -1,3 +1,10 @@ +2020-02-12 Sandra Loosemore + + PR libstdc++/79193 + PR libstdc++/88999 + + * configure: Regenerated. + 2020-01-24 Maciej W. Rozycki * configure.ac: Handle `--with-toolexeclibdir='. diff --git a/libssp/configure b/libssp/configure index 5541cf9d972..dd3b41da0f6 100755 --- a/libssp/configure +++ b/libssp/configure @@ -3402,11 +3402,11 @@ done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - +#include int main () { - +printf ("hello world\n"); ; return 0; } diff --git a/libstdc++-v3/ChangeLog b/libstdc++-v3/ChangeLog index b2f66e037c4..922c715c838 100644 --- a/libstdc++-v3/ChangeLog +++ b/libstdc++-v3/ChangeLog @@ -1,3 +1,10 @@ +2020-02-12 Sandra Loosemore + + PR libstdc++/79193 + PR libstdc++/88999 + + * configure: Regenerated. + 2020-02-12 François Dumont * include/bits/hashtable.h diff --git a/libstdc++-v3/configure b/libstdc++-v3/configure index a39c33b055d..9f9c5a2419a 100755 --- a/libstdc++-v3/configure +++ b/libstdc++-v3/configure @@ -4130,11 +4130,11 @@ done cat confdefs.h - <<_ACEOF >conftest.$ac_ext /* end confdefs.h. */ - +#include int main () { - +printf ("hello world\n"); ; return 0; }