[PATCH 5/8] libgloss: m68k: switch to AC_NO_EXECUTABLES

Mike Frysinger vapier@gentoo.org
Fri Feb 11 12:50:51 GMT 2022


Use this macro rather than hacking up the LDFLAGS settings.  This will
make it easier to merge the logic into the top-level which is already
using AC_NO_EXECUTABLES.
---
 libgloss/m68k/configure    | 82 ++++++++++++++++++++++++++++++++++++--
 libgloss/m68k/configure.ac | 10 +----
 2 files changed, 81 insertions(+), 11 deletions(-)

diff --git a/libgloss/m68k/configure.ac b/libgloss/m68k/configure.ac
index 41b49a530a5d..0230e08d8346 100644
--- a/libgloss/m68k/configure.ac
+++ b/libgloss/m68k/configure.ac
@@ -30,15 +30,10 @@ AC_SUBST(LD)
 AC_PROG_RANLIB
 LIB_AM_PROG_AS
 
+AC_NO_EXECUTABLES
+
 AC_MSG_CHECKING([target cpu family])
 TARGET=m68k
-dnl Temporarily modify LDFLAGS so that link tests will succeed without
-dnl a C library.  Note that we may not have a C librabry yet and that
-dnl autoconf automatically adds script to check whether we can create
-dnl an executable or not.
-dnl
-saved_LDFLAGS="$LDFLAGS"
-LDFLAGS="-nostdlib -e main"
 AC_PREPROC_IFELSE([AC_LANG_PROGRAM([#ifndef __mcoldfire__
 		#error we are not coldfire
 		#endif])],
@@ -47,7 +42,6 @@ AC_PREPROC_IFELSE([AC_LANG_PROGRAM([#ifndef __mfido__
 		#error we are not fido
 		#endif])],
 	       TARGET="fido",)
-LDFLAGS=$saved_LDFLAGS
 AC_MSG_RESULT($TARGET)
 AC_SUBST(TARGET)
      
-- 
2.34.1



More information about the Newlib mailing list