From patchwork Wed Mar 21 15:10:42 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Phil Edworthy X-Patchwork-Id: 147991 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from silver.osuosl.org (silver.osuosl.org [140.211.166.136]) by ozlabs.org (Postfix) with ESMTP id 54BA0B6EF3 for ; Thu, 22 Mar 2012 02:11:00 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id AF548267AF; Wed, 21 Mar 2012 15:10:58 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id M2wsLYGGlykb; Wed, 21 Mar 2012 15:10:57 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id E393A2513F; Wed, 21 Mar 2012 15:10:56 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 19C7F8F75B for ; Wed, 21 Mar 2012 15:10:56 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id DC0838D1B0 for ; Wed, 21 Mar 2012 15:10:55 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 9TLVSIL0PcvJ for ; Wed, 21 Mar 2012 15:10:54 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from relmlor3.renesas.com (relmlor3.renesas.com [210.160.252.173]) by whitealder.osuosl.org (Postfix) with ESMTP id EABB18D192 for ; Wed, 21 Mar 2012 15:10:53 +0000 (UTC) Received: from relmlir4.idc.renesas.com ([10.200.68.154]) by relmlor3.idc.renesas.com ( SJSMS) with ESMTP id <0M18003K6Q632AB0@relmlor3.idc.renesas.com> for buildroot@busybox.net; Thu, 22 Mar 2012 00:10:51 +0900 (JST) Received: from relmlac1.idc.renesas.com ([10.200.69.21]) by relmlir4.idc.renesas.com ( SJSMS) with ESMTP id <0M1800G6IQ63RP80@relmlir4.idc.renesas.com> for buildroot@busybox.net; Thu, 22 Mar 2012 00:10:51 +0900 (JST) Received: by relmlac1.idc.renesas.com (Postfix, from userid 0) id C53BC8015B; Thu, 22 Mar 2012 00:10:51 +0900 (JST) Received: from relmlac1.idc.renesas.com (localhost [127.0.0.1]) by relmlac1.idc.renesas.com (Postfix) with ESMTP id BF97E80030 for ; Thu, 22 Mar 2012 00:10:51 +0900 (JST) Received: from relmlii2.idc.renesas.com [10.200.68.66] by relmlac1.idc.renesas.com with ESMTP id AAK02795; Thu, 22 Mar 2012 00:10:51 +0900 X-IronPort-AV: E=Sophos; i="4.73,624,1325430000"; d="scan'208"; a="73606636" Received: from unknown (HELO relay61.aps.necel.com) ([10.29.19.64]) by relmlii2.idc.renesas.com with ESMTP; Thu, 22 Mar 2012 00:10:51 +0900 Received: from julia (du2com5.eu.necel.com [172.29.24.35] (may be forged)) by relay61.aps.necel.com (8.14.4+Sun/8.14.4) with ESMTP id q2LFAnGl029635; Thu, 22 Mar 2012 00:10:50 +0900 (JST) Received: by julia (Postfix, from userid 2) id 8154D102B1; Wed, 21 Mar 2012 16:10:49 +0100 (CET) Received: from du0nohub.eu.necel.com (unknown [172.29.24.70]) by julia (Postfix) with ESMTP id 7AAFE102AF; Wed, 21 Mar 2012 16:10:49 +0100 (CET) Received: from localhost.localdomain ([172.29.43.47]) by du0nohub.eu.necel.com (Lotus Domino Release 8.5.3) with ESMTP id 2012032116104801-67940 ; Wed, 21 Mar 2012 16:10:48 +0100 From: Phil Edworthy To: buildroot@busybox.net X-Mailer: git-send-email 1.7.0.4 X-TNEFEvaluated: 1 Message-id: <1332342642-7717-1-git-send-email-phil.edworthy@renesas.com> Date: Wed, 21 Mar 2012 15:10:42 +0000 X-MIMETrack: Itemize by SMTP Server on DU0NOHUB/NECEE(Release 8.5.3|September 15, 2011) at 21.03.2012 16:10:48, Serialize by Router on DU0NOHUB/NECEE(Release 8.5.3|September 15, 2011) at 21.03.2012 16:10:48, Serialize complete at 21.03.2012 16:10:48 Subject: [Buildroot] [PATCH] Add -static to LDFLAGS when prefering static binaries X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net Signed-off-by: Phil Edworthy --- Tested fbv and strace using sh-uclinux-gcc (Sourcery G++ Lite 2011.03-36) Without this flag, the binaries were still linked to libc.so. package/Makefile.in | 1 + 1 files changed, 1 insertions(+), 0 deletions(-) diff --git a/package/Makefile.in b/package/Makefile.in index dc8d038..3690a38 100644 --- a/package/Makefile.in +++ b/package/Makefile.in @@ -294,6 +294,7 @@ endif ifeq ($(BR2_PREFER_STATIC_LIB),y) SHARED_STATIC_LIBS_OPTS=--enable-static --disable-shared +TARGET_LDFLAGS+=-static else SHARED_STATIC_LIBS_OPTS=--enable-static --enable-shared endif