[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Work around IRIX 6 ld bug creating executables
From: |
Paul Eggert |
Subject: |
Re: Work around IRIX 6 ld bug creating executables |
Date: |
Tue, 20 Apr 2004 13:23:28 -0700 |
User-agent: |
Gnus/5.1006 (Gnus v5.10.6) Emacs/21.3 (gnu/linux) |
I installed the following patch into CVS Autoconf to work around that
problem. Thanks again for reporting it.
2004-04-20 Paul Eggert <address@hidden>
* lib/autoconf/lang.m4 (_AC_COMPILER_EXEEXT_DEFAULT): Remove potential
linker output files before linking, to work around IRIX 6 linker bug.
Problem reported by Rainer Orth in:
http://mail.gnu.org/archive/html/autoconf-patches/2004-02/msg00007.html
Index: lib/autoconf/lang.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/lang.m4,v
retrieving revision 1.168
diff -p -u -r1.168 lang.m4
--- lib/autoconf/lang.m4 30 Jan 2004 14:21:36 -0000 1.168
+++ lib/autoconf/lang.m4 20 Apr 2004 20:04:01 -0000
@@ -467,23 +467,34 @@ m4_define([_AC_COMPILER_EXEEXT_DEFAULT],
# of exeext.
AC_MSG_CHECKING([for _AC_LANG compiler default output file name])
ac_link_default=`echo "$ac_link" | sed ['s/ -o *conftest[^ ]*//']`
-AS_IF([AC_TRY_EVAL(ac_link_default)],
-[# Find the output, starting from the most likely. This scheme is
-# not robust to junk in `.', hence go to wildcards (a.*) only as a last
-# resort.
+#
+# List of possible output files, starting from the most likely.
+# The algorithm is not robust to junk in `.', hence go to wildcards (a.*)
+# only as a last resort. b.out is created by i960 compilers.
+ac_files='a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out'
+#
+# The IRIX 6 linker writes into existing files which may not be
+# executable, retaining their permissions. Remove them first so a
+# subsequent execution test works.
+ac_rmfiles=
+for ac_file in $ac_files
+do
+ case $ac_file in
+ _AC_COMPILER_EXEEXT_REJECT ) ;;
+ * ) ac_rmfiles="$ac_rmfiles $ac_file";;
+ esac
+done
+rm -f $ac_rmfiles
-# Be careful to initialize this variable, since it used to be cached.
+AS_IF([AC_TRY_EVAL(ac_link_default)],
+[# Be careful to initialize this variable, since it used to be cached.
# Otherwise an old cache value of `no' led to `EXEEXT = no' in a Makefile.
ac_cv_exeext=
-# b.out is created by i960 compilers.
-for ac_file in a_out.exe a.exe conftest.exe a.out conftest a.* conftest.* b.out
+for ac_file in $ac_files
do
test -f "$ac_file" || continue
case $ac_file in
_AC_COMPILER_EXEEXT_REJECT )
- ;;
- conftest.$ac_ext )
- # This is the source file.
;;
[[ab]].out )
# We found the default executable, but exeext='' is most
- Re: Work around IRIX 6 ld bug creating executables,
Paul Eggert <=