From patchwork Sat Jan 29 14:14:00 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: John Tytgat X-Patchwork-Id: 80939 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from sourceware.org (server1.sourceware.org [209.132.180.131]) by ozlabs.org (Postfix) with SMTP id BCE60B7116 for ; Sun, 30 Jan 2011 01:05:12 +1100 (EST) Received: (qmail 18390 invoked by alias); 29 Jan 2011 14:05:10 -0000 Received: (qmail 18379 invoked by uid 22791); 29 Jan 2011 14:05:09 -0000 X-SWARE-Spam-Status: No, hits=-1.7 required=5.0 tests=AWL, BAYES_00, TW_PX, TW_YT X-Spam-Check-By: sourceware.org Received: from payne.is.scarlet.be (HELO payne.is.scarlet.be) (193.74.71.226) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Sat, 29 Jan 2011 14:05:03 +0000 Received: from hobbes (ip-83-134-175-50.dsl.scarlet.be [83.134.175.50]) by payne.is.scarlet.be (8.14.3/8.14.3) with ESMTP id p0TE4jBe001133; Sat, 29 Jan 2011 15:04:45 +0100 Date: Sat, 29 Jan 2011 15:14:00 +0100 From: John Tytgat To: ro@CeBiTec.Uni-Bielefeld.DE Cc: gcc-patches@gcc.gnu.org, dberlin@dberlin.org, grosser@fim.uni-passau.de, sebastian.pop@amd.com Subject: Re: [PATCH][PPL]: Fix static PPL 0.11 case Message-ID: References: In-Reply-To: X-Organization: BASS User-Agent: Messenger-Pro/2.62 (MsgServe/2.05) (RISC-OS/6.21) POPstar/2.05 MIME-Version: 1.0 Mailing-List: contact gcc-patches-help@gcc.gnu.org; run by ezmlm Precedence: bulk List-Id: List-Unsubscribe: List-Archive: List-Post: List-Help: Sender: gcc-patches-owner@gcc.gnu.org Delivered-To: mailing list gcc-patches@gcc.gnu.org In message Rainer Orth wrote: > John Tytgat writes: > > > The reason is that PPL (and other libs like CLooG, GMP) are configured > > with --disable-shared and that we need libpwl.a in our link line. > > > > Attached patch addresses this problem. Please commit after review. > > > > John Tytgat > > > > * configure.ac (ppllibs): Add -lpwl. > > > > Index: configure.ac > > =================================================================== > > --- configure.ac (revision 169306) > > +++ configure.ac (working copy) > > @@ -1621,7 +1621,7 @@ > > AC_SUBST(poststage1_ldflags) > > > > # Check for PPL > > -ppllibs=" -lppl_c -lppl -lgmpxx" > > +ppllibs=" -lppl_c -lppl -lpwl -lgmpxx" > > pplinc= > > > > AC_ARG_WITH(ppl, > > @@ -1643,7 +1643,7 @@ > > "" | yes) > > ;; > > *) > > - ppllibs="-L$with_ppl/lib -lppl_c -lppl -lgmpxx" > > + ppllibs="-L$with_ppl/lib -lppl_c -lppl -lpwl -lgmpxx" > > pplinc="-I$with_ppl/include $pplinc" > > ;; > > esac > > @@ -1651,10 +1651,10 @@ > > pplinc="-I$with_ppl_include $pplinc" > > fi > > if test "x$with_ppl_lib" != x; then > > - ppllibs="-L$with_ppl_lib -lppl_c -lppl -lgmpxx" > > + ppllibs="-L$with_ppl_lib -lppl_c -lppl -lpwl -lgmpxx" > > fi > > if test "x$with_ppl$with_ppl_include$with_ppl_lib" = x && test -d ${srcdir}/ppl; then > > - ppllibs='-L$$r/$(HOST_SUBDIR)/ppl/interfaces/C/'"$lt_cv_objdir"' -L$$r/$(HOST_SUBDIR)/ppl/src/'"$lt_cv_objdir"' -lppl_c -lppl -lgmpxx ' > > + ppllibs='-L$$r/$(HOST_SUBDIR)/ppl/interfaces/C/'"$lt_cv_objdir"' -L$$r/$(HOST_SUBDIR)/ppl/src/'"$lt_cv_objdir"' -lppl_c -lppl -lpwl -lgmpxx ' > > pplinc='-I$$r/$(HOST_SUBDIR)/ppl/src -I$$r/$(HOST_SUBDIR)/ppl/interfaces/C ' > > enable_ppl_version_check=no > > fi > > I had the same issue on Solaris recently (apart from others; this stuff > is a nightmare). Unfortunately, your patch is incomplete: libppl.a uses > sqrt, which only lives in libm on some (most?) platforms. While I've > simply been adding -lm above, a correct version needs to check if libm > is needed for sqrt and only add it if necessary. > > Apart from that (and not your fault): please avoid duplicating the list > of libraries 4 times! This is guaranteed to get inconsistent. Yes, but nevertheless as Ryan Hill pointed out, my patch breaks the case of using a static PPL library which was configured with --disable-watchdog. Trying to address this problem via a different angle : with PPL we also have the bin/ppl-config binary so using this for the --with-ppl case only (not --with-ppl-include nor --with--ppl-lib): Unfortunately running "ppl-config -IC -A -D" gives me as library list "-lppl -lppl_c -lgmpxx -lgmp". The order of libppl and libppl_c needs to be reversed. Or would such an approach be acceptable when we throw in an additional --start-group and --end-group ? Quesion: does this ppl-config give for the Solaris case a -lm ? John. Index: configure.ac =================================================================== --- configure.ac (revision 169339) +++ configure.ac (working copy) @@ -1643,8 +1652,8 @@ "" | yes) ;; *) - ppllibs="-L$with_ppl/lib -lppl_c -lppl -lgmpxx" - pplinc="-I$with_ppl/include $pplinc" + ppllibs="`$with_ppl/bin/ppl-config -IC -A -D`" + pplinc="-I`$with_ppl/bin/ppl-config -IC -A -i`" ;; esac if test "x$with_ppl_include" != x; then