From patchwork Wed Jul 6 12:40:21 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: Romain Geissler X-Patchwork-Id: 103465 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 6C59FB6F7A for ; Wed, 6 Jul 2011 22:40:40 +1000 (EST) Received: (qmail 8788 invoked by alias); 6 Jul 2011 12:40:37 -0000 Received: (qmail 8777 invoked by uid 22791); 6 Jul 2011 12:40:37 -0000 X-SWARE-Spam-Status: No, hits=-2.2 required=5.0 tests=AWL, BAYES_00, DKIM_SIGNED, DKIM_VALID, DKIM_VALID_AU, FREEMAIL_FROM, RCVD_IN_DNSWL_LOW, T_TO_NO_BRKTS_FREEMAIL X-Spam-Check-By: sourceware.org Received: from mail-ey0-f175.google.com (HELO mail-ey0-f175.google.com) (209.85.215.175) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Wed, 06 Jul 2011 12:40:22 +0000 Received: by eye27 with SMTP id 27so2748008eye.20 for ; Wed, 06 Jul 2011 05:40:21 -0700 (PDT) MIME-Version: 1.0 Received: by 10.213.106.3 with SMTP id v3mr2074234ebo.40.1309956021426; Wed, 06 Jul 2011 05:40:21 -0700 (PDT) Received: by 10.213.105.202 with HTTP; Wed, 6 Jul 2011 05:40:21 -0700 (PDT) In-Reply-To: References: Date: Wed, 6 Jul 2011 14:40:21 +0200 Message-ID: Subject: Re: [PATCH] Fix configure --with-cloog From: Romain Geissler To: gcc-patches@gcc.gnu.org X-IsSubscribed: yes 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 > Hello > > This patch fix an issue while building with cloog and gmp installed in > a custom separate directories. > > How to reproduce : >  - Make sure you've installed cloog and gmp in separate directories > (ie ${WITH-CLOOG-PATH}/lib doesn't contain libgmp) >  - Make sure neither gmp nor cloog is not installed in a directory > searched by default by your linker when looking for libs. >  - Launch configure script with both --with-gmp and --with-cloog > switch properly set > > This result in an unexpected error while configuring: error: Unable to > find a usable CLooG. > > > 2011-07-06  Romain Geissler   > >       * configure: Add $gmplibs to cloog $LDFLAGS > > Index: configure > =================================================================== > --- configure   (revision 175709) > +++ configure   (working copy) > @@ -5713,7 +5713,7 @@ if test "x$with_cloog" != "xno"; then > >     CFLAGS="${CFLAGS} ${clooginc} ${gmpinc}" >   CPPFLAGS="${CPPFLAGS} ${_cloogorginc}" > -  LDFLAGS="${LDFLAGS} ${clooglibs}" > +  LDFLAGS="${LDFLAGS} ${clooglibs} ${gmplibs}" > >   case $cloog_backend in >     "ppl-legacy") > I forgot configure was a generated script. Here is the patch that fix it at the m4 macro level : 2011-07-06 Romain Geissler * config/cloog.m4: Add $gmplibs to cloog $LDFLAGS * configure: Regenerate Index: config/cloog.m4 =================================================================== --- config/cloog.m4 (revision 175907) +++ config/cloog.m4 (working copy) @@ -142,7 +142,7 @@ AC_DEFUN([CLOOG_FIND_FLAGS], dnl clooglibs & clooginc may have been initialized by CLOOG_INIT_FLAGS. CFLAGS="${CFLAGS} ${clooginc} ${gmpinc}" CPPFLAGS="${CPPFLAGS} ${_cloogorginc}" - LDFLAGS="${LDFLAGS} ${clooglibs}" + LDFLAGS="${LDFLAGS} ${clooglibs} ${gmplibs}" case $cloog_backend in "ppl-legacy")