From patchwork Tue Apr 9 06:29:46 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Sonic Zhang X-Patchwork-Id: 234967 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from fraxinus.osuosl.org (fraxinus.osuosl.org [140.211.166.137]) by ozlabs.org (Postfix) with ESMTP id 279E72C00B6 for ; Tue, 9 Apr 2013 16:29:17 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 7D9A4FFD57; Tue, 9 Apr 2013 06:28:59 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id x4xzWv8Xkfb0; Tue, 9 Apr 2013 06:28:52 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id E225A10B8F5; Tue, 9 Apr 2013 06:28:51 +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 DF7A68F75E for ; Tue, 9 Apr 2013 06:29:14 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 253618649A for ; Tue, 9 Apr 2013 06:29:07 +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 oTjhZXvkfNpQ for ; Tue, 9 Apr 2013 06:29:06 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from am1outboundpool.messaging.microsoft.com (am1ehsobe003.messaging.microsoft.com [213.199.154.206]) by whitealder.osuosl.org (Postfix) with ESMTPS id BAA5084D90 for ; Tue, 9 Apr 2013 06:29:05 +0000 (UTC) Received: from mail92-am1-R.bigfish.com (10.3.201.233) by AM1EHSOBE003.bigfish.com (10.3.204.23) with Microsoft SMTP Server id 14.1.225.23; Tue, 9 Apr 2013 06:29:03 +0000 Received: from mail92-am1 (localhost [127.0.0.1]) by mail92-am1-R.bigfish.com (Postfix) with ESMTP id 618452A01A1; Tue, 9 Apr 2013 06:29:03 +0000 (UTC) X-Forefront-Antispam-Report: CIP:137.71.25.55; KIP:(null); UIP:(null); IPV:NLI; H:nwd2mta1.analog.com; RD:nwd2mail10.analog.com; EFVD:NLI X-SpamScore: 12 X-BigFish: VS12(zzzz1f42h1fc6h1ee6h1ce5h1fdah1202h1fd0h1e76h1d1ah1cabh1d2ahzz8275bhz2ei87h2a8h668h839hd24he5bh1288h12a5h12a9h12bdh12e5h1354h137ah139eh13b6h13eah1441h1504h1537h15a8h162dh1631h1758h17eeh1898h18e1h1946h19b5h1b0ahff4m1355m129fi1155h) Received-SPF: neutral (mail92-am1: 137.71.25.55 is neither permitted nor denied by domain of gmail.com) client-ip=137.71.25.55; envelope-from=sonic.adi@gmail.com; helo=nwd2mta1.analog.com ; 1.analog.com ; X-FB-DOMAIN-IP-MATCH: fail Received: from mail92-am1 (localhost.localdomain [127.0.0.1]) by mail92-am1 (MessageSwitch) id 1365488925509055_18735; Tue, 9 Apr 2013 06:28:45 +0000 (UTC) Received: from AM1EHSMHS010.bigfish.com (unknown [10.3.201.235]) by mail92-am1.bigfish.com (Postfix) with ESMTP id 798664C011C; Tue, 9 Apr 2013 06:28:45 +0000 (UTC) Received: from nwd2mta1.analog.com (137.71.25.55) by AM1EHSMHS010.bigfish.com (10.3.207.110) with Microsoft SMTP Server (TLS) id 14.1.225.23; Tue, 9 Apr 2013 06:28:45 +0000 Received: from NWD2HUBCAS6.ad.analog.com (nwd2hubcas6.ad.analog.com [10.64.72.159]) by nwd2mta1.analog.com (8.13.8/8.13.8) with ESMTP id r396Si1F017104 (version=TLSv1/SSLv3 cipher=AES128-SHA bits=128 verify=FAIL); Mon, 8 Apr 2013 23:28:44 -0700 Received: from zeus.spd.analog.com (10.64.82.11) by NWD2HUBCAS6.ad.analog.com (10.64.72.159) with Microsoft SMTP Server id 14.3.123.3; Tue, 9 Apr 2013 02:28:43 -0400 Received: from linux.site ([10.99.22.20]) by zeus.spd.analog.com (8.14.6/8.14.6) with ESMTP id r396Sgfu007453; Tue, 9 Apr 2013 02:28:42 -0400 Received: from localhost.localdomain (unknown [10.99.22.72]) by linux.site (Postfix) with ESMTP id 5D60342CE3CB; Mon, 8 Apr 2013 17:01:33 -0600 (MDT) From: Sonic Zhang To: Thomas Petazzoni , Arnout Vandecappelle , Date: Tue, 9 Apr 2013 14:29:46 +0800 Message-ID: <1365488988-21604-5-git-send-email-sonic.adi@gmail.com> X-Mailer: git-send-email 1.7.0.4 In-Reply-To: <1365488988-21604-1-git-send-email-sonic.adi@gmail.com> References: <1365488988-21604-1-git-send-email-sonic.adi@gmail.com> MIME-Version: 1.0 Cc: Sonic Zhang , buildroot-devel@blackfin.uclinux.org Subject: [Buildroot] [PATCH v3 5/7] package: Introduce package-specific BINFMT_FLAT options. 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: , Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net From: Sonic Zhang v3-changes: None. Wait for more comments from Arnout. v2-changes: - Fix typo error in macro BINFMT_FLAT v1-changes: - Add new option _FLAT_STACKSIZE. The document needs to be updated. Signed-off-by: Sonic Zhang --- package/pkg-autotools.mk | 5 +++++ package/pkg-generic.mk | 5 +++++ 2 files changed, 10 insertions(+), 0 deletions(-) diff --git a/package/pkg-autotools.mk b/package/pkg-autotools.mk index 890506b..bdfea20 100644 --- a/package/pkg-autotools.mk +++ b/package/pkg-autotools.mk @@ -82,6 +82,11 @@ $(2)_CLEAN_OPT ?= clean $(2)_UNINSTALL_STAGING_OPT ?= DESTDIR=$$(STAGING_DIR) uninstall $(2)_UNINSTALL_TARGET_OPT ?= DESTDIR=$$(TARGET_DIR) uninstall +ifeq ($(BR2_BINFMT_FLAT),y) + ifneq ($$($(2)_FLAT_STACKSIZE),) + $(2)_CONF_ENV += LDFLAGS="$(TARGET_LDFLAGS) -Wl,-elf2flt=-s$$($(2)_FLAT_STACKSIZE)" + endif +endif # # Configure step. Only define it if not already defined by the package diff --git a/package/pkg-generic.mk b/package/pkg-generic.mk index 57b0fd0..8ee2b20 100644 --- a/package/pkg-generic.mk +++ b/package/pkg-generic.mk @@ -303,6 +303,11 @@ endif $(2)_REDISTRIBUTE ?= YES +ifeq ($(BR2_BINFMT_FLAT),y) + ifneq ($$($(2)_FLAT_STACKSIZE),) + $(2)_FLAT_LDFLAGS = -Wl,-elf2flt=-s$$($(2)_FLAT_STACKSIZE) + endif +endif $(2)_DEPENDENCIES ?= $(filter-out $(1),$(patsubst host-host-%,host-%,$(addprefix host-,$($(3)_DEPENDENCIES))))