<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 TRANSITIONAL//EN">
<HTML>
<HEAD>
  <META HTTP-EQUIV="Content-Type" CONTENT="text/html; CHARSET=UTF-8">
  <META NAME="GENERATOR" CONTENT="GtkHTML/3.32.2">
</HEAD>
<BODY>
On Thu, 2011-12-01 at 13:14 -0800, Alan Coopersmith wrote:
<BLOCKQUOTE TYPE=CITE>
<PRE>
Catches build problems caused by compilers that ignore unknown flags
at compile time and pass them to the linker at link time, when the
linker considers unknown flags to be fatal errors.

Signed-off-by: Alan Coopersmith &lt;<A HREF="mailto:alan.coopersmith@oracle.com">alan.coopersmith@oracle.com</A>&gt;
---
 xorg-macros.m4.in |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/xorg-macros.m4.in b/xorg-macros.m4.in
index ed908e2..3fd5348 100644
--- a/xorg-macros.m4.in
+++ b/xorg-macros.m4.in
@@ -1492,7 +1492,7 @@ m4_foreach([flag], m4_cdr($@), [
                 CFLAGS=&quot;$CFLAGS ]flag[&quot;
 
                 AC_MSG_CHECKING([if $CC supports ]flag[])
-                AC_COMPILE_IFELSE([AC_LANG_SOURCE([int i;])],
+                AC_LINK_IFELSE([AC_LANG_PROGRAM([int i;])],
                                   [supported=yes], [supported=no])
                 AC_MSG_RESULT([$supported])
                 CFLAGS=&quot;$xorg_testset_save_CFLAGS&quot;
</PRE>
</BLOCKQUOTE>
<BR>
On Linux the same &quot;gcc&quot; command is issued which is expected.<BR>
It wouldn't hurt the name some of compilers/linkers combination that are inconsistent in the treatment of unknown flags.<BR>
<BR>
Reviewed-by: Gaetan Nadon &lt;memsize@videotron.ca&gt;<BR>
<BR>
</BODY>
</HTML>