* [PATCH] Fix GRAPHITE configure
@ 2009-10-20 13:00 Richard Guenther
2009-10-20 13:16 ` Richard Guenther
0 siblings, 1 reply; 7+ messages in thread
From: Richard Guenther @ 2009-10-20 13:00 UTC (permalink / raw)
To: gcc-patches; +Cc: spop
It seems that even though the documentation states that --with-cloog
and --with-ppl need only be specified if cloog/ppl do not reside in
the default search paths graphite is disabled if I do not specify
them (with a correct path even).
Looking at the configure
# Check for CLOOG
clooglibs=" -lcloog "
clooginc=" -DCLOOG_PPL_BACKEND "
AC_ARG_WITH(cloog, [ --with-cloog=PATH Specify prefix directory for
the installed CLooG-PPL package
Equivalent to --with-cloog-include=PATH/include
plus --with-cloog-lib=PATH/lib],, with_cloog=no)
AC_ARG_WITH(cloog_include, [ --with-cloog-include=PATH Specify directory
for installed CLooG include files])
AC_ARG_WITH(cloog_lib, [ --with-cloog-lib=PATH Specify the directory
for the installed CLooG library])
case $with_cloog in
no)
clooglibs=
clooginc=
;;
*)
clooglibs="-L$with_cloog/lib -lcloog"
clooginc="-I$with_cloog/include -DCLOOG_PPL_BACKEND "
LIBS="$clooglibs $LIBS"
;;
esac
it seems clear that without specifying --with-cloog with_cloog will
be "no" and thus while the header checks will report success (and
thus also config.log is silent about not using graphite) CLOOGLIBS
will be empty and thus gcc/configure will set HAVE_cloog to 0.
So, what is wrong here, the documentation or the configure? Even
just specifying --with-cloog --with-ppl will not work as then I get
HOST_CLOOGLIBS = -Lyes/lib -lcloog
HOST_CLOOGINC = -Iyes/include -DCLOOG_PPL_BACKEND
but still
checking for version 0.10 of PPL... yes
checking for correct version of CLooG... yes
so I believe all these checks are somehow broken. At least the above
should also have
yes)
;;
and IMHO AC_ARG_WITH shouldn't have with_cloog=no in its default
so only --without-cloog will set with_cloog=no. Then the header
checks shouldn't run if --without-cloog is specified, that only
confuses the user. Also with --without-ppl cloog should be disabled
as well, otherwise we'll still enable graphite but fail to link
later.
Thus, like the following. Tested with all sorts of
--with[out]-{ppl,cloog} combinations.
Ok for trunk?
Thanks,
Richard.
2009-10-20 Richard Guenther <rguenther@suse.de>
* configure.ac: Adjust the ppl and cloog configure to work as
documented. Disable cloog if ppl was disabled. Omit the version
checks if they were disabled.
* configure: Re-generate.
Index: configure.ac
===================================================================
*** configure.ac (revision 153009)
--- configure.ac (working copy)
*************** pplinc=
*** 1514,1520 ****
AC_ARG_WITH(ppl, [ --with-ppl=PATH Specify prefix directory for the installed PPL package
Equivalent to --with-ppl-include=PATH/include
! plus --with-ppl-lib=PATH/lib],, with_ppl=no)
AC_ARG_WITH(ppl_include, [ --with-ppl-include=PATH Specify directory for installed PPL include files])
AC_ARG_WITH(ppl_lib, [ --with-ppl-lib=PATH Specify the directory for the installed PPL library])
--- 1514,1520 ----
AC_ARG_WITH(ppl, [ --with-ppl=PATH Specify prefix directory for the installed PPL package
Equivalent to --with-ppl-include=PATH/include
! plus --with-ppl-lib=PATH/lib],,)
AC_ARG_WITH(ppl_include, [ --with-ppl-include=PATH Specify directory for installed PPL include files])
AC_ARG_WITH(ppl_lib, [ --with-ppl-lib=PATH Specify the directory for the installed PPL library])
*************** case $with_ppl in
*** 1522,1527 ****
--- 1522,1529 ----
no)
ppllibs=
;;
+ yes)
+ ;;
*)
ppllibs="-L$with_ppl/lib -lppl_c -lppl -lgmpxx"
pplinc="-I$with_ppl/include $pplinc"
*************** AC_ARG_ENABLE(ppl-version-check,
*** 1546,1552 ****
ENABLE_PPL_CHECK=$enableval,
ENABLE_PPL_CHECK=yes)
! if test "${ENABLE_PPL_CHECK}" = "yes"; then
saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $pplinc $gmpinc"
AC_MSG_CHECKING([for version $ppl_major_version.$ppl_minor_version of PPL])
--- 1548,1554 ----
ENABLE_PPL_CHECK=$enableval,
ENABLE_PPL_CHECK=yes)
! if test "x$with_ppl" != "xno" -a "${ENABLE_PPL_CHECK}" = "yes"; then
saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $pplinc $gmpinc"
AC_MSG_CHECKING([for version $ppl_major_version.$ppl_minor_version of PPL])
*************** clooginc=" -DCLOOG_PPL_BACKEND "
*** 1569,1583 ****
AC_ARG_WITH(cloog, [ --with-cloog=PATH Specify prefix directory for the installed CLooG-PPL package
Equivalent to --with-cloog-include=PATH/include
! plus --with-cloog-lib=PATH/lib],, with_cloog=no)
AC_ARG_WITH(cloog_include, [ --with-cloog-include=PATH Specify directory for installed CLooG include files])
AC_ARG_WITH(cloog_lib, [ --with-cloog-lib=PATH Specify the directory for the installed CLooG library])
case $with_cloog in
no)
clooglibs=
clooginc=
;;
*)
clooglibs="-L$with_cloog/lib -lcloog"
clooginc="-I$with_cloog/include -DCLOOG_PPL_BACKEND "
--- 1571,1591 ----
AC_ARG_WITH(cloog, [ --with-cloog=PATH Specify prefix directory for the installed CLooG-PPL package
Equivalent to --with-cloog-include=PATH/include
! plus --with-cloog-lib=PATH/lib],,)
AC_ARG_WITH(cloog_include, [ --with-cloog-include=PATH Specify directory for installed CLooG include files])
AC_ARG_WITH(cloog_lib, [ --with-cloog-lib=PATH Specify the directory for the installed CLooG library])
+ if test "x$with_ppl" == "xno"; then
+ with_cloog=no
+ fi
+
case $with_cloog in
no)
clooglibs=
clooginc=
;;
+ yes)
+ ;;
*)
clooglibs="-L$with_cloog/lib -lcloog"
clooginc="-I$with_cloog/include -DCLOOG_PPL_BACKEND "
*************** AC_ARG_ENABLE(cloog-version-check,
*** 1602,1608 ****
ENABLE_CLOOG_CHECK=$enableval,
ENABLE_CLOOG_CHECK=yes)
! if test "${ENABLE_CLOOG_CHECK}" = "yes"; then
saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $clooginc $gmpinc $pplinc"
AC_MSG_CHECKING([for correct version of CLooG])
--- 1610,1616 ----
ENABLE_CLOOG_CHECK=$enableval,
ENABLE_CLOOG_CHECK=yes)
! if test "x$with_cloog" != "xno" -a "${ENABLE_CLOOG_CHECK}" = "yes"; then
saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $clooginc $gmpinc $pplinc"
AC_MSG_CHECKING([for correct version of CLooG])
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Fix GRAPHITE configure
2009-10-20 13:00 [PATCH] Fix GRAPHITE configure Richard Guenther
@ 2009-10-20 13:16 ` Richard Guenther
2009-10-20 17:11 ` Dave Korn
` (2 more replies)
0 siblings, 3 replies; 7+ messages in thread
From: Richard Guenther @ 2009-10-20 13:16 UTC (permalink / raw)
To: gcc-patches; +Cc: spop
On Tue, 20 Oct 2009, Richard Guenther wrote:
>
> It seems that even though the documentation states that --with-cloog
> and --with-ppl need only be specified if cloog/ppl do not reside in
> the default search paths graphite is disabled if I do not specify
> them (with a correct path even).
>
> Looking at the configure
>
> # Check for CLOOG
> clooglibs=" -lcloog "
> clooginc=" -DCLOOG_PPL_BACKEND "
>
> AC_ARG_WITH(cloog, [ --with-cloog=PATH Specify prefix directory for
> the installed CLooG-PPL package
> Equivalent to --with-cloog-include=PATH/include
> plus --with-cloog-lib=PATH/lib],, with_cloog=no)
> AC_ARG_WITH(cloog_include, [ --with-cloog-include=PATH Specify directory
> for installed CLooG include files])
> AC_ARG_WITH(cloog_lib, [ --with-cloog-lib=PATH Specify the directory
> for the installed CLooG library])
>
> case $with_cloog in
> no)
> clooglibs=
> clooginc=
> ;;
> *)
> clooglibs="-L$with_cloog/lib -lcloog"
> clooginc="-I$with_cloog/include -DCLOOG_PPL_BACKEND "
> LIBS="$clooglibs $LIBS"
> ;;
> esac
>
> it seems clear that without specifying --with-cloog with_cloog will
> be "no" and thus while the header checks will report success (and
> thus also config.log is silent about not using graphite) CLOOGLIBS
> will be empty and thus gcc/configure will set HAVE_cloog to 0.
>
> So, what is wrong here, the documentation or the configure? Even
> just specifying --with-cloog --with-ppl will not work as then I get
>
> HOST_CLOOGLIBS = -Lyes/lib -lcloog
> HOST_CLOOGINC = -Iyes/include -DCLOOG_PPL_BACKEND
>
> but still
>
> checking for version 0.10 of PPL... yes
> checking for correct version of CLooG... yes
>
> so I believe all these checks are somehow broken. At least the above
> should also have
>
> yes)
> ;;
>
> and IMHO AC_ARG_WITH shouldn't have with_cloog=no in its default
> so only --without-cloog will set with_cloog=no. Then the header
> checks shouldn't run if --without-cloog is specified, that only
> confuses the user. Also with --without-ppl cloog should be disabled
> as well, otherwise we'll still enable graphite but fail to link
> later.
>
> Thus, like the following. Tested with all sorts of
> --with[out]-{ppl,cloog} combinations.
>
> Ok for trunk?
Actually more like the following (thanks Micha for noticing).
Change the default to with_{cloog,ppl}=yes according to the docs,
set LIBS also in the yes case (though I'm sure we don't need LIBS
at all - we do no link tests anyway). And even worse, we don't
reset LIBS after the tests (?!).
Richard.
2009-10-20 Richard Guenther <rguenther@suse.de>
* configure.ac: Adjust the ppl and cloog configure to work as
documented. Disable cloog if ppl was disabled. Omit the version
checks if they were disabled.
* configure: Re-generate.
Index: configure.ac
===================================================================
*** configure.ac (revision 153009)
--- configure.ac (working copy)
*************** pplinc=
*** 1514,1520 ****
AC_ARG_WITH(ppl, [ --with-ppl=PATH Specify prefix directory for the installed PPL package
Equivalent to --with-ppl-include=PATH/include
! plus --with-ppl-lib=PATH/lib],, with_ppl=no)
AC_ARG_WITH(ppl_include, [ --with-ppl-include=PATH Specify directory for installed PPL include files])
AC_ARG_WITH(ppl_lib, [ --with-ppl-lib=PATH Specify the directory for the installed PPL library])
--- 1514,1520 ----
AC_ARG_WITH(ppl, [ --with-ppl=PATH Specify prefix directory for the installed PPL package
Equivalent to --with-ppl-include=PATH/include
! plus --with-ppl-lib=PATH/lib],, with_ppl=yes)
AC_ARG_WITH(ppl_include, [ --with-ppl-include=PATH Specify directory for installed PPL include files])
AC_ARG_WITH(ppl_lib, [ --with-ppl-lib=PATH Specify the directory for the installed PPL library])
*************** case $with_ppl in
*** 1522,1527 ****
--- 1522,1530 ----
no)
ppllibs=
;;
+ yes)
+ LIBS="$ppllibs $LIBS"
+ ;;
*)
ppllibs="-L$with_ppl/lib -lppl_c -lppl -lgmpxx"
pplinc="-I$with_ppl/include $pplinc"
*************** AC_ARG_ENABLE(ppl-version-check,
*** 1546,1552 ****
ENABLE_PPL_CHECK=$enableval,
ENABLE_PPL_CHECK=yes)
! if test "${ENABLE_PPL_CHECK}" = "yes"; then
saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $pplinc $gmpinc"
AC_MSG_CHECKING([for version $ppl_major_version.$ppl_minor_version of PPL])
--- 1549,1555 ----
ENABLE_PPL_CHECK=$enableval,
ENABLE_PPL_CHECK=yes)
! if test "x$with_ppl" != "xno" -a "${ENABLE_PPL_CHECK}" = "yes"; then
saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $pplinc $gmpinc"
AC_MSG_CHECKING([for version $ppl_major_version.$ppl_minor_version of PPL])
*************** clooginc=" -DCLOOG_PPL_BACKEND "
*** 1569,1583 ****
AC_ARG_WITH(cloog, [ --with-cloog=PATH Specify prefix directory for the installed CLooG-PPL package
Equivalent to --with-cloog-include=PATH/include
! plus --with-cloog-lib=PATH/lib],, with_cloog=no)
AC_ARG_WITH(cloog_include, [ --with-cloog-include=PATH Specify directory for installed CLooG include files])
AC_ARG_WITH(cloog_lib, [ --with-cloog-lib=PATH Specify the directory for the installed CLooG library])
case $with_cloog in
no)
clooglibs=
clooginc=
;;
*)
clooglibs="-L$with_cloog/lib -lcloog"
clooginc="-I$with_cloog/include -DCLOOG_PPL_BACKEND "
--- 1572,1593 ----
AC_ARG_WITH(cloog, [ --with-cloog=PATH Specify prefix directory for the installed CLooG-PPL package
Equivalent to --with-cloog-include=PATH/include
! plus --with-cloog-lib=PATH/lib],, with_cloog=yes)
AC_ARG_WITH(cloog_include, [ --with-cloog-include=PATH Specify directory for installed CLooG include files])
AC_ARG_WITH(cloog_lib, [ --with-cloog-lib=PATH Specify the directory for the installed CLooG library])
+ if test "x$with_ppl" == "xno"; then
+ with_cloog=no
+ fi
+
case $with_cloog in
no)
clooglibs=
clooginc=
;;
+ yes)
+ LIBS="$clooglibs $LIBS"
+ ;;
*)
clooglibs="-L$with_cloog/lib -lcloog"
clooginc="-I$with_cloog/include -DCLOOG_PPL_BACKEND "
*************** AC_ARG_ENABLE(cloog-version-check,
*** 1602,1608 ****
ENABLE_CLOOG_CHECK=$enableval,
ENABLE_CLOOG_CHECK=yes)
! if test "${ENABLE_CLOOG_CHECK}" = "yes"; then
saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $clooginc $gmpinc $pplinc"
AC_MSG_CHECKING([for correct version of CLooG])
--- 1612,1618 ----
ENABLE_CLOOG_CHECK=$enableval,
ENABLE_CLOOG_CHECK=yes)
! if test "x$with_cloog" != "xno" -a "${ENABLE_CLOOG_CHECK}" = "yes"; then
saved_CFLAGS="$CFLAGS"
CFLAGS="$CFLAGS $clooginc $gmpinc $pplinc"
AC_MSG_CHECKING([for correct version of CLooG])
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Fix GRAPHITE configure
2009-10-20 13:16 ` Richard Guenther
@ 2009-10-20 17:11 ` Dave Korn
2009-10-20 18:52 ` Loren James Rittle
2009-10-20 17:14 ` Sebastian Pop
2009-10-24 8:04 ` Ryan Hill
2 siblings, 1 reply; 7+ messages in thread
From: Dave Korn @ 2009-10-20 17:11 UTC (permalink / raw)
To: Richard Guenther; +Cc: gcc-patches, spop, Loren James Rittle
[ Cc added: Loren, who emailed me off-list about the top-level configure tests
reporting 'yes' even when ppl/cloog aren't going to be configured in. ]
Richard Guenther wrote:
> On Tue, 20 Oct 2009, Richard Guenther wrote:
>
>> It seems that even though the documentation states that --with-cloog
>> and --with-ppl need only be specified if cloog/ppl do not reside in
>> the default search paths graphite is disabled if I do not specify
>> them (with a correct path even).
>> it seems clear that without specifying --with-cloog with_cloog will
>> be "no" and thus while the header checks will report success (and
>> thus also config.log is silent about not using graphite) CLOOGLIBS
>> will be empty and thus gcc/configure will set HAVE_cloog to 0.
>>
>> So, what is wrong here, the documentation or the configure?
I think someone just forgot to throw the switch. The current state is a
hangover from when they were optional: see
http://gcc.gnu.org/ml/gcc/2009-05/threads.html#00121
http://gcc.gnu.org/ml/gcc-patches/2009-05/threads.html#00263
http://gcc.gnu.org/ml/gcc-patches/2009-05/threads.html#00259
> Even
>> just specifying --with-cloog --with-ppl will not work as then I get
>>
>> HOST_CLOOGLIBS = -Lyes/lib -lcloog
>> HOST_CLOOGINC = -Iyes/include -DCLOOG_PPL_BACKEND
>>
>> but still
>>
>> checking for version 0.10 of PPL... yes
>> checking for correct version of CLooG... yes
>>
>> so I believe all these checks are somehow broken.
Very likely. I didn't try to fix the underlying problems at the time
because I expected the whole thing to get a proper rewrite by the Graphite
maintainers when Graphite was made mandatory, but that seems to have been
overlooked until you picked it up now.
> 2009-10-20 Richard Guenther <rguenther@suse.de>
>
> * configure.ac: Adjust the ppl and cloog configure to work as
> documented. Disable cloog if ppl was disabled. Omit the version
> checks if they were disabled.
> * configure: Re-generate.
Loren, perhaps you'd like to test Richard's patch(*) and see if it does what
you wanted?
cheers,
DaveK
--
(*) - http://gcc.gnu.org/ml/gcc-patches/2009-10/msg01274.html
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Fix GRAPHITE configure
2009-10-20 13:16 ` Richard Guenther
2009-10-20 17:11 ` Dave Korn
@ 2009-10-20 17:14 ` Sebastian Pop
2009-10-20 17:36 ` Paolo Bonzini
2009-10-24 8:04 ` Ryan Hill
2 siblings, 1 reply; 7+ messages in thread
From: Sebastian Pop @ 2009-10-20 17:14 UTC (permalink / raw)
To: Richard Guenther, Paolo Bonzini; +Cc: gcc-patches
On Tue, Oct 20, 2009 at 08:00, Richard Guenther <rguenther@suse.de> wrote:
> 2009-10-20 Richard Guenther <rguenther@suse.de>
>
> * configure.ac: Adjust the ppl and cloog configure to work as
> documented. Disable cloog if ppl was disabled. Omit the version
> checks if they were disabled.
> * configure: Re-generate.
The patch looks good to me. I would let Paolo some time to comment on
this patch as he's a maintainer of the configure scripts.
Thanks for fixing this,
Sebastian
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Fix GRAPHITE configure
2009-10-20 17:14 ` Sebastian Pop
@ 2009-10-20 17:36 ` Paolo Bonzini
0 siblings, 0 replies; 7+ messages in thread
From: Paolo Bonzini @ 2009-10-20 17:36 UTC (permalink / raw)
To: Sebastian Pop; +Cc: Richard Guenther, gcc-patches
On 10/20/2009 07:10 PM, Sebastian Pop wrote:
> On Tue, Oct 20, 2009 at 08:00, Richard Guenther<rguenther@suse.de> wrote:
>> 2009-10-20 Richard Guenther<rguenther@suse.de>
>>
>> * configure.ac: Adjust the ppl and cloog configure to work as
>> documented. Disable cloog if ppl was disabled. Omit the version
>> checks if they were disabled.
>> * configure: Re-generate.
>
> The patch looks good to me. I would let Paolo some time to comment on
> this patch as he's a maintainer of the configure scripts.
Yeah, the patch is fine. As long as -fgraphite isn't enabled
automagically, it is the right thing to always compile it in.
BTW, with --enable-build-with-cxx it would be nice to be able to build
cloog/ppl in-tree... anybody who wants to do that?...
Paolo
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Fix GRAPHITE configure
2009-10-20 17:11 ` Dave Korn
@ 2009-10-20 18:52 ` Loren James Rittle
0 siblings, 0 replies; 7+ messages in thread
From: Loren James Rittle @ 2009-10-20 18:52 UTC (permalink / raw)
To: Dave Korn; +Cc: rguenther, gcc-patches, spop
In article <4ADDEFBA.7060302@gmail.com>,
Dave Korn<dave.korn.cygwin@googlemail.com> writes:
> [ Cc added: Loren, who emailed me off-list about the top-level configure tests
> reporting 'yes' even when ppl/cloog aren't going to be configured in. ]
>>> It seems that even though the documentation states that --with-cloog
>>> and --with-ppl need only be specified if cloog/ppl do not reside in
>>> the default search paths graphite is disabled if I do not specify
>>> them (with a correct path even).
[...]
> Loren, perhaps you'd like to test Richard's patch(*) and see if it does what
> you wanted?
Indeed, this patch is a superset of the fix that I speculated about.
Regards,
Loren
^ permalink raw reply [flat|nested] 7+ messages in thread
* Re: [PATCH] Fix GRAPHITE configure
2009-10-20 13:16 ` Richard Guenther
2009-10-20 17:11 ` Dave Korn
2009-10-20 17:14 ` Sebastian Pop
@ 2009-10-24 8:04 ` Ryan Hill
2 siblings, 0 replies; 7+ messages in thread
From: Ryan Hill @ 2009-10-24 8:04 UTC (permalink / raw)
To: gcc-patches
[-- Attachment #1: Type: text/plain, Size: 533 bytes --]
On Tue, 20 Oct 2009 15:00:29 +0200 (CEST)
Richard Guenther <rguenther@suse.de> wrote:
> 2009-10-20 Richard Guenther <rguenther@suse.de>
>
> * configure.ac: Adjust the ppl and cloog configure to work as
> documented. Disable cloog if ppl was disabled. Omit the version
> checks if they were disabled.
> * configure: Re-generate.
>
PR39051.
--
fonts, Character is what you are in the dark.
gcc-porting,
wxwidgets @ gentoo EFFD 380E 047A 4B51 D2BD C64F 8AA8 8346 F9A4 0662
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 198 bytes --]
^ permalink raw reply [flat|nested] 7+ messages in thread
end of thread, other threads:[~2009-10-24 6:51 UTC | newest]
Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-10-20 13:00 [PATCH] Fix GRAPHITE configure Richard Guenther
2009-10-20 13:16 ` Richard Guenther
2009-10-20 17:11 ` Dave Korn
2009-10-20 18:52 ` Loren James Rittle
2009-10-20 17:14 ` Sebastian Pop
2009-10-20 17:36 ` Paolo Bonzini
2009-10-24 8:04 ` Ryan Hill
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).