mailarchive of the ptxdist mailing list
 help / color / mirror / Atom feed
* [ptxdist] [PATCH 3/5 v4] [busybox] Pass extra platform CFLAGS to busybox make
@ 2012-03-14 13:38 Remy Bohmer
  2012-03-14 13:46 ` Michael Olbrich
  0 siblings, 1 reply; 2+ messages in thread
From: Remy Bohmer @ 2012-03-14 13:38 UTC (permalink / raw)
  To: ptxdist

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 <linux@bohmer.net>
---
 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.
 v4: My authors email-address was wrong

 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

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [ptxdist] [PATCH 3/5 v4] [busybox] Pass extra platform CFLAGS to busybox make
  2012-03-14 13:38 [ptxdist] [PATCH 3/5 v4] [busybox] Pass extra platform CFLAGS to busybox make Remy Bohmer
@ 2012-03-14 13:46 ` Michael Olbrich
  0 siblings, 0 replies; 2+ messages in thread
From: Michael Olbrich @ 2012-03-14 13:46 UTC (permalink / raw)
  To: ptxdist

On Wed, Mar 14, 2012 at 02:38:18PM +0100, Remy Bohmer wrote:
> 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 <linux@bohmer.net>
> ---
>  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.
>  v4: My authors email-address was wrong

Sorry, to late. I already applied the last version.

Michael

>  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
> 

-- 
Pengutronix e.K.                           |                             |
Industrial Linux Solutions                 | http://www.pengutronix.de/  |
Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |

-- 
ptxdist mailing list
ptxdist@pengutronix.de

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2012-03-14 13:46 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-03-14 13:38 [ptxdist] [PATCH 3/5 v4] [busybox] Pass extra platform CFLAGS to busybox make Remy Bohmer
2012-03-14 13:46 ` Michael Olbrich

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox