From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 20183 invoked by alias); 5 Aug 2010 18:54:24 -0000 Received: (qmail 20169 invoked by uid 22791); 5 Aug 2010 18:54:23 -0000 X-SWARE-Spam-Status: No, hits=-6.0 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_HI,SPF_HELO_PASS,T_RP_MATCHES_RCVD X-Spam-Check-By: sourceware.org Received: from mx1.redhat.com (HELO mx1.redhat.com) (209.132.183.28) by sourceware.org (qpsmtpd/0.43rc1) with ESMTP; Thu, 05 Aug 2010 18:54:17 +0000 Received: from int-mx03.intmail.prod.int.phx2.redhat.com (int-mx03.intmail.prod.int.phx2.redhat.com [10.5.11.16]) by mx1.redhat.com (8.13.8/8.13.8) with ESMTP id o75IrrxI021609 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=OK); Thu, 5 Aug 2010 14:53:54 -0400 Received: from host1.dyn.jankratochvil.net (ovpn01.gateway.prod.ext.phx2.redhat.com [10.5.9.1]) by int-mx03.intmail.prod.int.phx2.redhat.com (8.13.8/8.13.8) with ESMTP id o75Irmh0028189 (version=TLSv1/SSLv3 cipher=DHE-RSA-AES256-SHA bits=256 verify=NO); Thu, 5 Aug 2010 14:53:51 -0400 Received: from host1.dyn.jankratochvil.net (localhost [127.0.0.1]) by host1.dyn.jankratochvil.net (8.14.4/8.14.4) with ESMTP id o75Irmbw003128; Thu, 5 Aug 2010 20:53:48 +0200 Received: (from jkratoch@localhost) by host1.dyn.jankratochvil.net (8.14.4/8.14.4/Submit) id o75IrliJ003122; Thu, 5 Aug 2010 20:53:47 +0200 Date: Thu, 05 Aug 2010 18:54:00 -0000 From: Jan Kratochvil To: Joel Brobecker Cc: gdb-patches@sourceware.org Subject: Re: [RFC] python-config.py --ldflags should return relocated path to libpython Message-ID: <20100805185347.GA31513@host1.dyn.jankratochvil.net> References: <1278627885-9416-1-git-send-email-brobecker@adacore.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <1278627885-9416-1-git-send-email-brobecker@adacore.com> User-Agent: Mutt/1.5.20 (2009-12-10) X-IsSubscribed: yes Mailing-List: contact gdb-patches-help@sourceware.org; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: gdb-patches-owner@sourceware.org X-SW-Source: 2010-08/txt/msg00047.txt.bz2 On Fri, 09 Jul 2010 00:24:45 +0200, Joel Brobecker wrote: > --- a/gdb/python/python-config.py > +++ b/gdb/python/python-config.py > @@ -50,8 +50,21 @@ for opt in opt_flags: > # add the prefix/lib/pythonX.Y/config dir, but only if there is no > # shared library in prefix/lib/. > if opt == '--ldflags': > + # Provide the location where the Python library is installed. > + # We always provide it, because Python may have been installed > + # at a non-standard location. > if not getvar('Py_ENABLE_SHARED'): > - libs.insert(0, '-L' + getvar('LIBPL')) > + # There is no shared library in prefix/lib. The static > + # library is in prefix/lib/pythonX.Y/config. > + # > + # Note that we cannot use getvar('LIBPL') like we used to, > + # because it provides the location at build time, which might > + # be different from the actual location at runtime. > + libdir = sysconfig.get_python_lib(standard_lib=True) + '/config' > + else: > + # The Python shared library is installed in prefix/lib. > + libdir = sysconfig.PREFIX + '/lib' On Fedora 14snapshot x86_64 it generates the following warnings: /usr/bin/ld: skipping incompatible /usr/lib/libtinfo.so when searching for -ltinfo /usr/bin/ld: skipping incompatible /usr/lib/libz.so when searching for -lz /usr/bin/ld: skipping incompatible /usr/lib/libm.so when searching for -lm /usr/bin/ld: skipping incompatible /usr/lib/libm.a when searching for -lm /usr/bin/ld: skipping incompatible /usr/lib/libpthread.so when searching for -lpthread /usr/bin/ld: skipping incompatible /usr/lib/libpthread.a when searching for -lpthread /usr/bin/ld: skipping incompatible /usr/lib/libdl.so when searching for -ldl /usr/bin/ld: skipping incompatible /usr/lib/libdl.a when searching for -ldl /usr/bin/ld: skipping incompatible /usr/lib/libutil.so when searching for -lutil /usr/bin/ld: skipping incompatible /usr/lib/libutil.a when searching for -lutil /usr/bin/ld: skipping incompatible /usr/lib/libm.so when searching for -lm /usr/bin/ld: skipping incompatible /usr/lib/libm.a when searching for -lm /usr/bin/ld: skipping incompatible /usr/lib/libpython2.7.so when searching for -lpython2.7 /usr/bin/ld: skipping incompatible /usr/lib/libexpat.so when searching for -lexpat /usr/bin/ld: skipping incompatible /usr/lib/libdl.so when searching for -ldl /usr/bin/ld: skipping incompatible /usr/lib/libdl.a when searching for -ldl /usr/bin/ld: skipping incompatible /usr/lib/libc.so when searching for -lc /usr/bin/ld: skipping incompatible /usr/lib/libc.a when searching for -lc /usr/bin/ld: skipping incompatible /usr/lib/libtinfo.so when searching for -ltinfo /usr/bin/ld: skipping incompatible /usr/lib/libz.so when searching for -lz /usr/bin/ld: skipping incompatible /usr/lib/libm.so when searching for -lm /usr/bin/ld: skipping incompatible /usr/lib/libm.a when searching for -lm /usr/bin/ld: skipping incompatible /usr/lib/libpthread.so when searching for -lpthread /usr/bin/ld: skipping incompatible /usr/lib/libpthread.a when searching for -lpthread /usr/bin/ld: skipping incompatible /usr/lib/libdl.so when searching for -ldl /usr/bin/ld: skipping incompatible /usr/lib/libdl.a when searching for -ldl /usr/bin/ld: skipping incompatible /usr/lib/libutil.so when searching for -lutil /usr/bin/ld: skipping incompatible /usr/lib/libutil.a when searching for -lutil /usr/bin/ld: skipping incompatible /usr/lib/libm.so when searching for -lm /usr/bin/ld: skipping incompatible /usr/lib/libm.a when searching for -lm /usr/bin/ld: skipping incompatible /usr/lib/libpython2.7.so when searching for -lpython2.7 /usr/bin/ld: skipping incompatible /usr/lib/libexpat.so when searching for -lexpat /usr/bin/ld: skipping incompatible /usr/lib/libdl.so when searching for -ldl /usr/bin/ld: skipping incompatible /usr/lib/libdl.a when searching for -ldl /usr/bin/ld: skipping incompatible /usr/lib/libc.so when searching for -lc /usr/bin/ld: skipping incompatible /usr/lib/libc.a when searching for -lc Sure it still links correctly. But I somehow find incorrect to supply inappropriate libraries into the -L path, such as for occasional buggy linker script contained in the .so files missing proper OUTPUT_FORMAT protection etc. I do not mind much, though, correct system should copy with it. Regards, Jan