[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

cross compiler a.out filename prepends ac_tool_prefix

From: Allan Clark
Subject: cross compiler a.out filename prepends ac_tool_prefix
Date: Thu, 11 Dec 2003 08:32:03 -0500


I'm using a cross-compiler that is generating the binary "i386a.out"
rather than "a.out" when my ac_tool_prefix is "i386".  Note that my
prefix is not of the form "X-Y-", bit simply "i386", such as i386cc,
i386ar, i386ld, etc.

I've enclosed a patch which mimicks the behavior of a.out and b.out, and
collects both a.out and b.out before the wildcards.  When ac_tool_prefix
is null, this function merely checks for a.out and b.out twice, which
should not hurt anything.

Note that I'm assuming that the [ab].out in the for loop will expand to
a.out or b.out if existent in the current directory; I can't test this
on every platform of course, but it seems to work on mine :)  ...famous
last words...

Please consider for application to the tree.



All tests except Fortran passed:

> 184: [Libtool]                                    ok
> ## ------------- ##
> ## Test results. ##
> ## ------------- ##
> 176 tests were successful.
> 8 tests were skipped.

Patch is as follows to current CVS HEAD:

Index: lib/autoconf/lang.m4
RCS file: /cvs-latest/autoconf/autoconf/lib/autoconf/lang.m4,v
retrieving revision 1.167
diff -u -3 -p -r1.167 lang.m4
--- lib/autoconf/lang.m4        20 Oct 2003 16:18:26 -0000      1.167
+++ lib/autoconf/lang.m4        11 Dec 2003 13:19:15 -0000
@@ -477,7 +477,7 @@ AS_IF([AC_TRY_EVAL(ac_link_default)],
 # Otherwise an old cache value of `no' led to `EXEEXT = no' in a
 # 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 a_out.exe a.exe conftest.exe $ac_tool_prefix[[ab]].out
[[ab]].out conftest a.* conftest.*
   test -f "$ac_file" || continue
   case $ac_file in
@@ -486,7 +486,7 @@ do
     conftest.$ac_ext )
        # This is the source file.
-    [[ab]].out )
+    [[ab]].out | $ac_tool_prefix[[ab]].out)
        # We found the default executable, but exeext='' is most
        # certainly right.

reply via email to

[Prev in Thread] Current Thread [Next in Thread]