From mboxrd@z Thu Jan 1 00:00:00 1970 Return-path: Received: from ch1ehsobe004.messaging.microsoft.com ([216.32.181.184] helo=ch1outboundpool.messaging.microsoft.com) by metis.ext.pengutronix.de with esmtp (Exim 4.72) (envelope-from ) id 1S7mpP-0000xF-Le for ptxdist@pengutronix.de; Wed, 14 Mar 2012 12:57:36 +0100 From: Remy Bohmer Date: Wed, 14 Mar 2012 12:56:54 +0100 Message-ID: <1331726214-14478-1-git-send-email-linux@bohmer.net> MIME-Version: 1.0 Subject: [ptxdist] [PATCH 3/5 v3] [busybox] Pass extra platform CFLAGS to busybox make Reply-To: ptxdist@pengutronix.de List-Id: PTXdist Development Mailing List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: ptxdist-bounces@pengutronix.de Errors-To: ptxdist-bounces@pengutronix.de To: ptxdist@pengutronix.de Cc: Remy Bohmer From: Remy Bohmer Busybox make is not properly called in case: * compiler name tuple does not match target tuple (as used in multilib compilers, for example: i686-pc-linux-gnu-gcc can compile for x86_64-unknown-linux-gnu targets. To solve this the 'SUBARCH' need to be set) * CONFIG_EXTRA_CFLAGS need to e set to select the proper sysroot to compile against in busybox * LDFLAGS to link against the proper sysroot. Signed-off-by: Remy Bohmer --- v2: Reworked review comments from Michael Olbrich v3: Convert spaces->tabs + Added '\' after CFLAGS line checked after build if build-target/busybox/busybox remains unstripped. rules/busybox.make | 13 ++++++++----- 1 files changed, 8 insertions(+), 5 deletions(-) diff --git a/rules/busybox.make b/rules/busybox.make index 536aa80..54b5367 100644 --- a/rules/busybox.make +++ b/rules/busybox.make @@ -49,14 +49,17 @@ $(STATEDIR)/busybox.prepare: BUSYBOX_MAKE_OPT := \ ARCH=$(PTXCONF_ARCH_STRING) \ + SUBARCH=$(PTXCONF_ARCH_STRING) \ CROSS_COMPILE=$(COMPILER_PREFIX) \ - CONFIG_EXTRA_CFLAGS="$(CROSS_CFLAGS)" \ - HOSTCC=$(HOSTCC) \ + HOSTCC=$(HOSTCC) + +BUSYBOX_MAKE_ENV := \ + $(CROSS_ENV) \ + CFLAGS="$(CROSS_CFLAGS) -I$(KERNEL_HEADERS_INCLUDE_DIR)" \ SKIP_STRIP=y -ifdef PTXCONF_BUSYBOX_RFKILL -BUSYBOX_MAKE_OPT += CFLAGS="-I$(KERNEL_HEADERS_INCLUDE_DIR)" -endif +BUSYBOX_INSTAL_ENV := \ + $(BUSYBOX_MAKE_ENV) BUSYBOX_INSTALL_OPT := \ $(BUSYBOX_MAKE_OPT) \ -- 1.7.0.4 -- ptxdist mailing list ptxdist@pengutronix.de