Re: expected behavior for --with-cloog?
On Sat, Mar 27, 2010 at 07:56:14AM +0100, Ralf Wildenhues wrote: > Hello Jack, > > * Jack Howarth wrote on Fri, Mar 26, 2010 at 01:13:16AM CET: > >While testing a patch to update the minimum version > > of cloog-ppl in gcc trunk... > > > --- configure.ac(revision 157732) > > +++ configure.ac(working copy) > > @@ -1612,9 +1612,9 @@ > > if test "x$with_cloog" != "xno" -a "${ENABLE_CLOOG_CHECK}" = "yes"; then > >saved_CFLAGS="$CFLAGS" > >CFLAGS="$CFLAGS $clooginc $gmpinc $pplinc" > > - AC_MSG_CHECKING([for version 0.15.5 (or later revision) of CLooG]) > > + AC_MSG_CHECKING([for version 0.15.9 (or later revision) of CLooG]) > >AC_TRY_COMPILE([#include "cloog/cloog.h"],[ > > - #if CLOOG_VERSION_MAJOR != 0 || CLOOG_VERSION_MINOR != 15 || > > CLOOG_VERSION_REVISION < 5 > > + #if CLOOG_VERSION_MAJOR != 0 || CLOOG_VERSION_MINOR != 15 || > > CLOOG_VERSION_REVISION < 9 > >choke me > >#endif > >], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); clooglibs= ; clooginc= > > ]) > > > > I noticed that this test only returns... > > > > checking for version 0.15.9 (or later revision) of CLooG... no > > > > for... > > > > ../gcc-4.5-20100325/configure --prefix=/sw --prefix=/sw/lib/gcc4.5 > > --mandir=/sw/share/man --infodir=/sw/share/info > > --enable-languages=c,c++,fortran,objc,obj-c++,java \ > > --with-gmp=/sw --with-libiconv-prefix=/sw --with-ppl=/sw --with-cloog=/sw > > --with-mpc=/sw --with-system-zlib \ > > --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib > > --disable-libjava-multilib --enable-checking=release > > > > ...when a cloog-ppl earlier than 0.15.9 is installed. Shouldn't configure > > fail > > outright in this case since the user obviously intended cloog to be used? > > Currently > > configure proceeds to set up a build without graphite support. > > Well, what does config.log tell you why it was not detected? > > Cheers, > Ralf Ralf, It is detected as being insufficient, hence the... > > checking for version 0.15.9 (or later revision) of CLooG... no My question was whether options like --with-cloog should cause configure to exit as failed when they can't be satisfied rather than proceeding? Does a failure to meet the required gmp/mpfr/mpc version requirements behave the same way or do they abort the configure process? Jack ps I am considering the case of explicitly passing a --with- option as opposed to a library dependency which is being automatically checked by configure.
Re: race condition in indirect call value profiling?
On Fri, Mar 26, 2010 at 11:21:27AM -0700, Neil Vachharajani wrote: > Thanks for re-raising this issue. I'm certainly interested in > applying the patch. I figured I had missed the boat for GCC 4.5 and > was going to re-re-raise the issue for 4.6. I someone approves the > patch, I'll apply it once we re-enter Stage 1. > > Cheers, > Neil > > On Fri, Mar 26, 2...@10:57 AM, Jack Howarth wrote: > > > > This issue of reapplying the patch... > > > > http://gcc.gnu.org/ml/gcc-patches/2008-12/msg00892.html > > > > to eliminate a race condition in indirect call value profiling > > came up earlier this year after darwin was depreciated as a > > primary target... > > > > http://gcc.gnu.org/ml/gcc-patches/2009-09/msg01545.html > > > > Now that we have a libgcc_ext on darwin to provide the additional > > tls related symbols, this patch shouldn't be an issue. I haven't > > been able to find a PR for this problem. Has it gone latent or > > is it just that no one is interested in the issue? > > Jack > > > > -- > Neil Vachharajani > Google > 650-214-1804 Neil, I tested your original patch adjusted for current gcc trunk against x86_64-apple-darwin10 last night... Index: gcc/tree-profile.c === --- gcc/tree-profile.c (revision 157765) +++ gcc/tree-profile.c (working copy) @@ -82,6 +82,7 @@ TREE_PUBLIC (ic_void_ptr_var) = 0; DECL_ARTIFICIAL (ic_void_ptr_var) = 1; DECL_INITIAL (ic_void_ptr_var) = NULL; + DECL_TLS_MODEL (ic_void_ptr_var) = decl_default_tls_model (ic_void_ptr_var); varpool_finalize_decl (ic_void_ptr_var); gcov_type_ptr = build_pointer_type (get_gcov_type ()); @@ -93,6 +94,7 @@ TREE_PUBLIC (ic_gcov_type_ptr_var) = 0; DECL_ARTIFICIAL (ic_gcov_type_ptr_var) = 1; DECL_INITIAL (ic_gcov_type_ptr_var) = NULL; + DECL_TLS_MODEL (ic_gcov_type_ptr_var) = decl_default_tls_model (ic_gcov_type_ptr_var); varpool_finalize_decl (ic_gcov_type_ptr_var); } and found that we still end up with failed testcases from unresolved symbols. Darwin doesn't have assembler level tls support and uses emutls. Thus the darwin build only adds -DHAVE_CC_TLS but not -DUSE_TLS (like on linux). I am thinking that we need to also add... Index: libgcc/config.host === --- libgcc/config.host (revision 157779) +++ libgcc/config.host (working copy) @@ -597,6 +597,12 @@ esac case ${host} in +*-*-darwin*) + tmake_file="${tmake_file} t-emutls" + ;; +esac + +case ${host} in i[34567]86-*-darwin* | x86_64-*-darwin* | \ i[34567]86-*-kfreebsd*-gnu | x86_64-*-kfreebsd*-gnu | \ i[34567]86-*-linux* | x86_64-*-linux* | \ --- /dev/null 2010-03-27 14:42:18.0 -0400 +++ libgcc/config/t-emutls 2010-03-27 14:24:03.0 -0400 @@ -0,0 +1,2 @@ +# Use thread-local storage +INTERNAL_CFLAGS += -DUSE_EMUTLS to have -D_USE_EMUTLS passed as well. What other architectures besides darwin use emutls? Those may well have the same problem. Jack
Re: expected behavior for --with-cloog?
On Sat, Mar 27, 2010 at 12:17, Jack Howarth wrote: > On Sat, Mar 27, 2010 at 07:56:14AM +0100, Ralf Wildenhues wrote: >> Hello Jack, >> >> * Jack Howarth wrote on Fri, Mar 26, 2010 at 01:13:16AM CET: >> > While testing a patch to update the minimum version >> > of cloog-ppl in gcc trunk... >> >> > --- configure.ac (revision 157732) >> > +++ configure.ac (working copy) >> > @@ -1612,9 +1612,9 @@ >> > if test "x$with_cloog" != "xno" -a "${ENABLE_CLOOG_CHECK}" = "yes"; then >> > saved_CFLAGS="$CFLAGS" >> > CFLAGS="$CFLAGS $clooginc $gmpinc $pplinc" >> > - AC_MSG_CHECKING([for version 0.15.5 (or later revision) of CLooG]) >> > + AC_MSG_CHECKING([for version 0.15.9 (or later revision) of CLooG]) >> > AC_TRY_COMPILE([#include "cloog/cloog.h"],[ >> > - #if CLOOG_VERSION_MAJOR != 0 || CLOOG_VERSION_MINOR != 15 || >> > CLOOG_VERSION_REVISION < 5 >> > + #if CLOOG_VERSION_MAJOR != 0 || CLOOG_VERSION_MINOR != 15 || >> > CLOOG_VERSION_REVISION < 9 >> > choke me >> > #endif >> > ], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); clooglibs= ; clooginc= >> > ]) >> > >> > I noticed that this test only returns... >> > >> > checking for version 0.15.9 (or later revision) of CLooG... no >> > >> > for... >> > >> > ../gcc-4.5-20100325/configure --prefix=/sw --prefix=/sw/lib/gcc4.5 >> > --mandir=/sw/share/man --infodir=/sw/share/info >> > --enable-languages=c,c++,fortran,objc,obj-c++,java \ >> > --with-gmp=/sw --with-libiconv-prefix=/sw --with-ppl=/sw >> > --with-cloog=/sw --with-mpc=/sw --with-system-zlib \ >> > --x-includes=/usr/X11R6/include --x-libraries=/usr/X11R6/lib >> > --disable-libjava-multilib --enable-checking=release >> > >> > ...when a cloog-ppl earlier than 0.15.9 is installed. Shouldn't configure >> > fail >> > outright in this case since the user obviously intended cloog to be used? >> > Currently >> > configure proceeds to set up a build without graphite support. >> >> Well, what does config.log tell you why it was not detected? >> >> Cheers, >> Ralf > > Ralf, > It is detected as being insufficient, hence the... > >> > checking for version 0.15.9 (or later revision) of CLooG... no > > My question was whether options like --with-cloog should cause configure > to exit as failed when they can't be satisfied rather than proceeding? > Does a failure to meet the required gmp/mpfr/mpc version requirements > behave the same way or do they abort the configure process? > Jack > ps I am considering the case of explicitly passing a --with- option > as opposed to a library dependency which is being automatically checked > by configure. Fixed like this: * configure.ac: Print "buggy but acceptable" when CLooG revision is less than 9. * configure: Regenerated. Passed bootstrap and test on amd64-linux. Ok for trunk? Thanks, Sebastian From c72ddf65ba51c46b3bd60e1c60b926e72261eea7 Mon Sep 17 00:00:00 2001 From: Sebastian Pop Date: Sat, 27 Mar 2010 20:28:03 -0500 Subject: [PATCH] Print "buggy but acceptable" when CLooG revision is less than 9. * configure.ac: Print "buggy but acceptable" when CLooG revision is less than 9. * configure: Regenerated. --- configure| 21 + configure.ac |7 ++- 2 files changed, 27 insertions(+), 1 deletions(-) diff --git a/configure b/configure index c2c406e..fe2bb65 100755 --- a/configure +++ b/configure @@ -5951,9 +5951,30 @@ main () } _ACEOF if ac_fn_c_try_compile "$LINENO"; then : + cat confdefs.h - <<_ACEOF >conftest.$ac_ext +/* end confdefs.h. */ +#include "cloog/cloog.h" +int +main () +{ + + #if CLOOG_VERSION_MAJOR != 0 || CLOOG_VERSION_MINOR != 15 || CLOOG_VERSION_REVISION < 9 + choke me + #endif + + ; + return 0; +} +_ACEOF +if ac_fn_c_try_compile "$LINENO"; then : { $as_echo "$as_me:${as_lineno-$LINENO}: result: yes" >&5 $as_echo "yes" >&6; } else + { $as_echo "$as_me:${as_lineno-$LINENO}: result: buggy but acceptable" >&5 +$as_echo "buggy but acceptable" >&6; } +fi +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext +else { $as_echo "$as_me:${as_lineno-$LINENO}: result: no" >&5 $as_echo "no" >&6; }; clooglibs= ; clooginc= fi diff --git a/configure.ac b/configure.ac index 72407f8..edad2b6 100644 --- a/configure.ac +++ b/configure.ac @@ -1617,7 +1617,12 @@ if test "x$with_cloog" != "xno" -a "${ENABLE_CLOOG_CHECK}" = "yes"; then #if CLOOG_VERSION_MAJOR != 0 || CLOOG_VERSION_MINOR != 15 || CLOOG_VERSION_REVISION < 5 choke me #endif - ], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([no]); clooglibs= ; clooginc= ]) + ], AC_TRY_COMPILE([#include "cloog/cloog.h"],[ + #if CLOOG_VERSION_MAJOR != 0 || CLOOG_VERSION_MINOR != 15 || CLOOG_VERSION_REVISION < 9 + choke me + #endif + ], [AC_MSG_RESULT([yes])], [AC_MSG_RESULT([buggy but acceptable])]), + [AC_MSG_RESULT([no]); clooglibs= ; clooginc= ]) CFLAGS="$saved_CFLAGS" fi -- 1.6.3.3