diff options
author | Sandra Loosemore <sandra@codesourcery.com> | 2020-02-12 12:20:15 -0800 |
---|---|---|
committer | Sandra Loosemore <sandra@codesourcery.com> | 2020-02-12 13:22:07 -0800 |
commit | 02ce382cd323097f9d02fbf91e0a3f59ebcd3d30 (patch) | |
tree | 39f4cd0704638598d217061bd9661dfe6dc3d8bc /config | |
parent | 3f3932a0ec875cb7cca187018f3f8f05f2519d3e (diff) |
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 <sandra@codesourcery.com>
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.
Diffstat (limited to 'config')
-rw-r--r-- | config/ChangeLog | 8 | ||||
-rw-r--r-- | config/no-executables.m4 | 4 |
2 files changed, 11 insertions, 1 deletions
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 <sandra@codesourcery.com> + + PR libstdc++/79193 + PR libstdc++/88999 + + * no-executables.m4: Use a non-empty program to test for linker + support. + 2020-02-01 Andrew Burgess <andrew.burgess@embecosm.com> * 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 <stdio.h>], + [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 |