autoconf-patches
[Top][All Lists]
Advanced

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

Re: Debian Autoconf bug report: Bug#138666: autoconf: AC_EXEEXT fails wh


From: Akim Demaille
Subject: Re: Debian Autoconf bug report: Bug#138666: autoconf: AC_EXEEXT fails when CFLAGS="-fprofile-arcs -ftest-coverage"
Date: 03 Apr 2002 11:27:04 +0200
User-agent: Gnus/5.0808 (Gnus v5.8.8) XEmacs/21.4 (Common Lisp)

|Hi.  I'm the maintainer of the Debian package for Autoconf.  I
|received the following bug report against Autoconf 2.52.  It
|looks like it still applies to Autoconf 2.53, so I'm passing it
|along upstream with this message.
|
|Thanks,
|
|Ben.
|
|From: & Youngman <address@hidden>
|Subject: Bug#138666: autoconf: AC_EXEEXT fails when CFLAGS="-fprofile-arcs 
-ftest-coverage"
|To: address@hidden
|X-Sent: 2 weeks, 3 days, 9 hours, 24 minutes, 6 seconds ago
|Reply-To: & Youngman <address@hidden>, address@hidden
|
|Package: autoconf
|Version: 2.52-6
|Severity: normal
|
|
|If you have a configure script which uses AC_EXEEXT, and the
|environment variable CFLAGS has been set to "-fprofile-arcs
|-ftest-coverage" in order to set up for measuring the test suite
|coverage of a GNUish program with a test suite, then AC_EXEEXT guesses
|wrongly about the executable suffix.
|
|AC_EXEEXT guesses on Unix that the executable suffic is ".bbg".
|
|The reason for this is that the GCC compiler will have produced a
|conftest.bbg file in the current directory, and this file will be
|picked up in the loop over conftest.* files that AC_EXEEXT performs.
|
|This means simply that *.bbg and *.bb should be added to the list of
|files to ignore in aclang.m4, along with the existing list which
|includes *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb.  This list is
|near line 670 of aclang.m4 in version 2.52 of autoconf.
|----------

Thanks.  Too bad there is no cc --clean that would remove all these
files...  :)

I'm applying this.

Index: ChangeLog
from  Akim Demaille  <address@hidden>

        * lib/autoconf/lang.m4 (_AC_COMPILER_OBJEXT_REJECT)
        (_AC_COMPILER_EXEEXT_REJECT): New.
        Also recognize *.bb and *.bbg as compilation byproducts.
        (_AC_COMPILER_EXEEXT_DEFAULT, _AC_COMPILER_EXEEXT_O)
        (_AC_COMPILER_OBJEXT): Use them.
        Fixes Debian #138666.

Index: lib/autoconf/lang.m4
===================================================================
RCS file: /cvsroot/autoconf/autoconf/lib/autoconf/lang.m4,v
retrieving revision 1.153
diff -u -u -r1.153 lang.m4
--- lib/autoconf/lang.m4 2 Mar 2002 15:19:48 -0000 1.153
+++ lib/autoconf/lang.m4 3 Apr 2002 09:26:04 -0000
@@ -391,7 +391,29 @@
 #
 # When the w32 free Borland C++ command line compiler links a program
 # (conftest.exe), it also produces a file named `conftest.tds' in
-# addition to `conftest.obj'
+# addition to `conftest.obj'.
+#
+# - *.bb, *.bbg
+#   Created per object by GCC when given -ftest-coverage.
+#
+# - *.xSYM
+#   Created on BeOS.  Seems to be per executable.
+
+
+# _AC_COMPILER_OBJEXT_REJECT
+# --------------------------
+# Case/esac pattern matching the files to be ignored when looking for
+# compiled object files.
+m4_define([_AC_COMPILER_OBJEXT_REJECT],
+[*.$ac_ext | *.xcoff | *.tds | *.d | *.pdb | *.xSYM | *.bb | *.bbg])
+
+
+# _AC_COMPILER_EXEEXT_REJECT
+# --------------------------
+# Case/esac pattern matching the files to be ignored when looking for
+# compiled executables.
+m4_define([_AC_COMPILER_EXEEXT_REJECT],
+[_AC_COMPILER_OBJEXT_REJECT | *.o | *.obj])
 
 
 # We must not AU define them, because autoupdate would then remove
@@ -430,7 +452,7 @@
                 ls a.out conftest 2>/dev/null;
                 ls a.* conftest.* 2>/dev/null`; do
   case $ac_file in
-    *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb | *.xSYM ) ;;
+    _AC_COMPILER_EXEEXT_REJECT ) ;;
     a.out ) # We found the default executable, but exeext='' is most
             # certainly right.
             break;;
@@ -496,7 +518,7 @@
 # `rm'.
 for ac_file in `(ls conftest.exe; ls conftest; ls conftest.*) 2>/dev/null`; do
   case $ac_file in
-    *.$ac_ext | *.o | *.obj | *.xcoff | *.tds | *.d | *.pdb ) ;;
+    _AC_COMPILER_EXEEXT_REJECT ) ;;
     *.* ) ac_cv_exeext=`expr "$ac_file" : ['[^.]*\(\..*\)']`
           export ac_cv_exeext
           break;;
@@ -554,7 +576,7 @@
 AS_IF([AC_TRY_EVAL(ac_compile)],
 [for ac_file in `(ls conftest.o conftest.obj; ls conftest.*) 2>/dev/null`; do
   case $ac_file in
-    *.$ac_ext | *.xcoff | *.tds | *.d | *.pdb ) ;;
+    _AC_COMPILER_OBJEXT_REJECT ) ;;
     *) ac_cv_objext=`expr "$ac_file" : '.*\.\(.*\)'`
        break;;
   esac



reply via email to

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