From patchwork Tue Aug 2 13:15:03 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tim Gardner X-Patchwork-Id: 107914 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from chlorine.canonical.com (chlorine.canonical.com [91.189.94.204]) by ozlabs.org (Postfix) with ESMTP id E2A6BB71D0 for ; Tue, 2 Aug 2011 23:15:29 +1000 (EST) Received: from localhost ([127.0.0.1] helo=chlorine.canonical.com) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1QoEoU-0004To-T0; Tue, 02 Aug 2011 13:15:14 +0000 Received: from mail.tpi.com ([70.99.223.143]) by chlorine.canonical.com with esmtp (Exim 4.71) (envelope-from ) id 1QoEoP-0004TK-9k for kernel-team@lists.ubuntu.com; Tue, 02 Aug 2011 13:15:09 +0000 Received: from sepang.rtg.net (mail.tpi.com [70.99.223.143]) by mail.tpi.com (Postfix) with ESMTP id 600F72D329F; Tue, 2 Aug 2011 06:14:43 -0700 (PDT) Received: from [127.0.0.1] (lochsa [127.0.0.1]) by sepang.rtg.net (Postfix) with ESMTP id DAF1EF8AED; Tue, 2 Aug 2011 07:15:03 -0600 (MDT) Message-ID: <4E37F857.8090500@canonical.com> Date: Tue, 02 Aug 2011 07:15:03 -0600 From: Tim Gardner User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.18) Gecko/20110617 Thunderbird/3.1.11 MIME-Version: 1.0 To: Stefan Bader Subject: Re: [Oneiric, Natty, Maverick, Lucid SRU] Link libbfd statically References: <1312277892-5468-1-git-send-email-stefan.bader@canonical.com> <20110802100002.GD27656@shadowen.org> <4E37CB5A.3060708@canonical.com> In-Reply-To: <4E37CB5A.3060708@canonical.com> Cc: Andy Whitcroft , kernel-team@lists.ubuntu.com X-BeenThere: kernel-team@lists.ubuntu.com X-Mailman-Version: 2.1.13 Precedence: list List-Id: Kernel team discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: kernel-team-bounces@lists.ubuntu.com Errors-To: kernel-team-bounces@lists.ubuntu.com On 08/02/2011 04:03 AM, Stefan Bader wrote: > On 02.08.2011 12:00, Andy Whitcroft wrote: >> On Tue, Aug 02, 2011 at 11:38:09AM +0200, Stefan Bader wrote: >>> SRU Justification: >>> >>> Impact: By dynamically linking libbfd, it is not possible to have >>> older versions of the perf tool installed (as there can only be one >>> version of this lib). Also, Debian policy actually forbids depending >>> on a certain version of the library). >>> >>> Fix: Change the makefile to statically link libbfd. This is a Ubuntu >>> specific change, though. Which unlikely will make it upstream. >>> >>> Testcase: Check the perf version provided though the builders (it >>> seems that building in chroots can cause builds not linking against >>> libbfd at all as HAVE_CPLUS_DEMANGLE gets set). The ouput of ldd >>> should not show libbfd. >>> >>> Actually, having said this, maybe the better solution is to modify >>> the build dependencies to cause the compile to have >>> HAVE_CPLUS_DEMANGLE set. That way we do not need to carry a >>> modification to the makefile which likely breaks... >> >> I like the sound of this latter, I think you said we could achieve this >> by build-depending oni libiberty instead? Is that correct? >> >> -apw > > No, the main difference seems to be whether HAVE_CPLUS_DEMANGLE is set when > doing the compile or not. If it is set, then perf is only linked against > -liberty. If not, it can be a combination of -libbfd, -liberty and -lz. > I just have not yet found out what actually causes HAVE_CPLUS_DEMANGLE to be > set. Its happening in my chroots, but apparently not when building on buildds. > > -Stefan > Why can't we simply force it to be set in the Debian makefile? diff --git a/debian/rules.d/0-common-vars.mk b/debian/rules.d/0-common-vars.mk index 13602c4..a488dd5 100644 --- a/debian/rules.d/0-common-vars.mk +++ b/debian/rules.d/0-common-vars.mk @@ -214,7 +214,8 @@ kmake = make ARCH=$(build_arch) \ KERNELVERSION=$(abi_release)-$(target_flavour) \ CONFIG_DEBUG_SECTION_MISMATCH=y \ KBUILD_BUILD_VERSION="$(uploadnum)" \ - LOCALVERSION= localver-extra= + LOCALVERSION= localver-extra= \ + HAVE_CPLUS_DEMANGLE=1 ifneq ($(LOCAL_ENV_CC),) kmake += CC=$(LOCAL_ENV_CC) DISTCC_HOSTS=$(LOCAL_ENV_DISTCC_HOSTS) endif