automake-patches
[Top][All Lists]
Advanced

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

Re: Intel compiler v8 fun


From: Alexandre Duret-Lutz
Subject: Re: Intel compiler v8 fun
Date: Thu, 03 Jun 2004 23:19:17 +0200
User-agent: Gnus/5.1003 (Gnus v5.10.3) Emacs/21.3.50 (gnu/linux)

>>> "Ralf" == Ralf Wildenhues <address@hidden> writes:

 Ralf> The 8.0 version of the Intel C++ compiler brings yet more joy to
 Ralf> automake dependency tracking.
 Ralf> icc -dryrun 
 Ralf> will exit with 1 instead of 0 (which 7.1 does).  This makes detecting
 Ralf> it in tests/defs.in fail.  On the other hand, it will detect and work
 Ralf> with depmode=gcc (the only thing that fails w/ respect to gcc3 is -MP,
 Ralf> as already noted in PR416).  Thus, tests/depcomp5.test won't check and
 Ralf> fail, but skip.

 Ralf> So finally, I suggest this update, where the fix for compiler detection
 Ralf> is a mere hack (trying to differentiate between an exit of 1 and other
 Ralf> possible problems).  BTW, I have signed papers.

Thanks for exploring this.  The initial intent of the test was
to ensure that depmode would NOT be set to gcc for ICC 7.x (that
caused a lot of spurious diagnostics during the build).  So I'm
installing the following patch instead.

BTW, you may want to add
(add-hook 'write-file-hooks 'copyright-update)
to your .emacs file to update copyright years automatically

2004-06-03  Alexandre Duret-Lutz  <address@hidden>

        * tests/defs.in (required=icc): Use `-V -help' instead of
        `-V -dryrun'.  icc 8.0 fails on the latter.
        * tests/depcomp5.test: Require depmode=icc for icc 7.x, and
        depmod=gcc otherwise.
        Report from Ralf Wildenhues.

Index: tests/defs.in
===================================================================
RCS file: /cvs/automake/automake/tests/defs.in,v
retrieving revision 1.29
diff -u -r1.29 defs.in
--- tests/defs.in       23 May 2004 11:04:24 -0000      1.29
+++ tests/defs.in       3 Jun 2004 21:15:19 -0000
@@ -144,9 +144,9 @@
        # There is no way to ask *only* the compiler's version.
        # This tool always want to do something (by default
        # it will try link *nothing* and complain it cannot find
-       # main(); funny).  -dryrun is a workaround.
-       echo "$me: running $CC -V -dryrun"
-       ( $CC -V -dryrun ) || exit 77
+       # main(); funny).  Use -help so it does not try linking anything.
+       echo "$me: running $CC -V -help"
+       ( $CC -V -help ) || exit 77
        ;;
       makedepend)
        echo "$me: running makedepend -f-"
Index: tests/depcomp5.test
===================================================================
RCS file: /cvs/automake/automake/tests/depcomp5.test,v
retrieving revision 1.1
diff -u -r1.1 depcomp5.test
--- tests/depcomp5.test 11 Feb 2003 18:20:55 -0000      1.1
+++ tests/depcomp5.test 3 Jun 2004 21:15:19 -0000
@@ -1,5 +1,5 @@
 #! /bin/sh
-# Copyright (C) 2003  Free Software Foundation, Inc.
+# Copyright (C) 2003, 2004  Free Software Foundation, Inc.
 #
 # This file is part of GNU Automake.
 #
@@ -23,6 +23,14 @@
 required='icc'
 . ./defs || exit 1
 
+# Automake supports icc since version 7.0 through a dedicated depcomp mode.
+# icc 8.0 and greater understand gcc options, so depmode is set to gcc.
+if icc -V -help 2>&1 | grep 'Version 7'; then
+  expect='depmode=icc'
+else
+  expect='depmode=gcc'
+fi
+
 set -e
 
 cat >> configure.in << 'END'
@@ -59,6 +67,6 @@
 $AUTOMAKE -a
 
 ./configure
-grep 'depmode=icc' Makefile
+grep "$expect" Makefile
 $MAKE check
 $MAKE grepdeps
-- 
Alexandre Duret-Lutz





reply via email to

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