[Top][All Lists]

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

[PATCH] Ensure current language is C when using AC_PROG_CC_C_O.

From: Nick Bowler
Subject: [PATCH] Ensure current language is C when using AC_PROG_CC_C_O.
Date: Sun, 13 Jan 2013 15:11:29 -0500

If the current language is not C, the AC_PROG_CC_C_O macro will never-
theless directly invoke the C compiler, but the file extensions used by
the tests will be appropriate for the current language setting rather
than for the C compiler.

In this case, the test may produce a false negative result if the C
compiler cares about input file extensions (for example, when using
the GNU Compiler Collection) or if the current language uses a
different object file extension than the C compiler.

* lib/autoconf/c.m4 (AC_PROG_CC_C_O): Add AC_LANG_ASSERT([C]) to help
avoid possible false negatives.
 lib/autoconf/c.m4 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/lib/autoconf/c.m4 b/lib/autoconf/c.m4
index affd765..fcc5c88 100644
--- a/lib/autoconf/c.m4
+++ b/lib/autoconf/c.m4
@@ -589,6 +589,7 @@ fi
 # --------------
 if test "x$CC" != xcc; then
   AC_MSG_CHECKING([whether $CC and cc understand -c and -o together])

reply via email to

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