This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [patch][graphite] Check cloog revision when configure.


Hi,
On Fri, Nov 6, 2009 at 11:46 AM, Tobias Grosser
<grosser@fim.uni-passau.de> wrote:
> On Fri, 2009-11-06 at 11:05 +0800, Li Feng wrote:
>> Hi,
>>
>> In polyhedral benchmark, aermod is miscompiled because of the
>> older cloog revision number.
>>
>> Here is the bug and discussion:
>> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=41924
>> http://groups.google.com/group/gcc-graphite/browse_thread/thread/ee4485e5fd1e4302
>>
>> To avoid this happen again from both user and develper,
>> I would like to check cloog revision when configuring.
>> Sebastian has proposed the same thing some time ago:
>> http://gcc.gnu.org/ml/gcc-patches/2009-07/msg01839.html
>>
>> Here is the patch:
>>
>> diff --git a/configure.ac b/configure.ac
>> index 48fa580..5fab23a 100644
>> --- a/configure.ac
>> +++ b/configure.ac
>> @@ -1593,7 +1593,7 @@ if test "${ENABLE_CLOOG_CHECK}" = "yes"; then
>> ? ?CFLAGS="$CFLAGS $clooginc $gmpinc $pplinc"
>> ? ?AC_MSG_CHECKING([for correct version of CLooG])
>> ? ?AC_TRY_COMPILE([#include "cloog/cloog.h"],[
>> - ?#if CLOOG_VERSION_MAJOR != 0 || CLOOG_VERSION_MINOR != 15
>> + ?#if CLOOG_VERSION_MAJOR != 0 || CLOOG_VERSION_MINOR != 15 ||
>> CLOOG_VERSION_REVISION < 4
>
> I personally believe moving "||" to the next line and identing the new
> row would look better.

Because of the #if directives, we should put them in one line. Otherwise,
it will not checking this.

>
>> ? ?choke me
>> ? ?#endif
>> ? ?], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); clooglibs= ; clooginc= ])
>>
>> Ok for trunk?
>
> You still need to add a ChangeLog entry and to update the "configure"
> file using autotools.
>
Ok.

> Otherwise I believe the patch is useful and required since a while, I
> just did not do it. So thanks for your affords.
>
> If there are no concerns until Sunday it should be fine to commit,
> however I would like to see the updated patch, before saying yes.
>
> Tobi
>
>
here is the patch:

diff --git a/ChangeLog b/ChangeLog
index 293407a..d6c000f 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
+2009-11-06  Li Feng  <nemokingdom@gmail.com>
+
+	* configure.ac: Check if the right cloog revison.
+	* configure: Regenerate.
+
 2009-11-05  Joern Rennecke <amylaar@spamcop.net>

 	* MAINTAINERS (Write After Approval): Add entry for my INRIA work.
diff --git a/configure b/configure
index 7b068a1..58aa1e9 100755
--- a/configure
+++ b/configure
@@ -5906,7 +5906,7 @@ int
 main ()
 {

-  #if CLOOG_VERSION_MAJOR != 0 || CLOOG_VERSION_MINOR != 15
+  #if CLOOG_VERSION_MAJOR != 0 || CLOOG_VERSION_MINOR != 15 ||
CLOOG_VERSION_REVISION < 4
   choke me
   #endif

diff --git a/configure.ac b/configure.ac
index 36774a4..728efbe 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1611,7 +1611,7 @@ if test "x$with_cloog" != "xno" -a
"${ENABLE_CLOOG_CHECK}" = "yes"; then
   CFLAGS="$CFLAGS $clooginc $gmpinc $pplinc"
   AC_MSG_CHECKING([for correct version of CLooG])
   AC_TRY_COMPILE([#include "cloog/cloog.h"],[
-  #if CLOOG_VERSION_MAJOR != 0 || CLOOG_VERSION_MINOR != 15
+  #if CLOOG_VERSION_MAJOR != 0 || CLOOG_VERSION_MINOR != 15 ||
CLOOG_VERSION_REVISION < 4
   choke me
   #endif
   ], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); clooglibs= ; clooginc= ])

Li


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]