From: Michael Olbrich <m.olbrich@pengutronix.de>
To: ptxdist@pengutronix.de
Subject: Re: [ptxdist] [PATCH 3/5] [busybox] Pass extra platform CFLAGS to busybox make
Date: Tue, 13 Mar 2012 14:06:16 +0100 [thread overview]
Message-ID: <20120313130616.GQ29221@pengutronix.de> (raw)
In-Reply-To: <CANqCtQL9VG=rButCG_5d_tKRFyS7AXKsjfP183goxe+nOTs8UA@mail.gmail.com>
On Tue, Mar 13, 2012 at 01:46:26PM +0100, Remy Bohmer wrote:
> Hi,
>
> 2012/3/13 Michael Olbrich <m.olbrich@pengutronix.de>:
> > On Mon, Mar 12, 2012 at 10:25:02PM +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>
> >> ---
> >> rules/busybox.make | 3 +++
> >> 1 files changed, 3 insertions(+), 0 deletions(-)
> >>
> >> diff --git a/rules/busybox.make b/rules/busybox.make
> >> index 536aa80..42cb81c 100644
> >> --- a/rules/busybox.make
> >> +++ b/rules/busybox.make
> >> @@ -49,9 +49,12 @@ $(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) \
> >> + CONFIG_EXTRA_CFLAGS="$(PTXCONF_TARGET_EXTRA_CFLAGS)" \
> >> + LDFLAGS="$(PTXCONF_TARGET_EXTRA_LDFLAGS)" \
> >
> > CONFIG_EXTRA_CFLAGS="$(CROSS_CPPFLAGS) $(CROSS_CFLAGS)" \
> > $(CROSS_ENV_LDFLAGS) \
>
> This results in:
> -----------------------
> target: busybox.prepare
> -----------------------
>
> make: invalid option -- '6'
> make: invalid option -- '4'
> make: invalid option -- '/'
> make: invalid option -- '/'
> Usage: make [options] [target] ...
> Options:
> etc.
>
> It seems I have to stick with the bare minimal options I can set
> here... Or any other ideas?
Don't set any flags in BUSYBOX_MAKE_OPT. From what I can tell, the current
busybox Makefile uses CFLAGS, CPPFLAGS and LDFLAGS from the environment.
Try something like this (untested):
BUSYBOX_MAKE_OPT := \
ARCH=$(PTXCONF_ARCH_STRING) \
SUBARCH=$(PTXCONF_ARCH_STRING) \
CROSS_COMPILE=$(COMPILER_PREFIX) \
HOSTCC=$(HOSTCC)
BUSYBOX_MAKE_ENV := \
$(CROSS_ENV) \
CFLAGS="$(CROSS_CFLAGS) -I$(KERNEL_HEADERS_INCLUDE_DIR)"
SKIP_STRIP=y
BUSYBOX_INSTAL_ENV := \
$(BUSYBOX_MAKE_ENV)
and remove the PTXCONF_BUSYBOX_RFKILL stuff. The extra "-I" unconditionally
does not hurt.
Michael
--
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
next prev parent reply other threads:[~2012-03-13 13:06 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2012-03-12 21:25 [ptxdist] [PATCH 1/5] [rt-tests] Use CFLAGS specified by ptxdist platformconfig Remy Bohmer
2012-03-12 21:25 ` [ptxdist] [PATCH 2/5] [x86_64] Add some support for multilib detection in the toolchain Remy Bohmer
2012-03-13 9:56 ` Michael Olbrich
2012-03-13 10:23 ` Remy Bohmer
2012-03-12 21:25 ` [ptxdist] [PATCH 3/5] [busybox] Pass extra platform CFLAGS to busybox make Remy Bohmer
2012-03-13 9:59 ` Michael Olbrich
2012-03-13 10:26 ` Remy Bohmer
2012-03-13 12:46 ` Remy Bohmer
2012-03-13 13:06 ` Michael Olbrich [this message]
2012-03-13 21:31 ` Remy Bohmer
2012-03-12 21:25 ` [ptxdist] [PATCH 4/5] [x86_64, libc] on multilib do not put all dynamic linkers in /lib Remy Bohmer
2012-03-13 10:07 ` Michael Olbrich
2012-03-13 10:28 ` Remy Bohmer
2012-03-13 10:34 ` Remy Bohmer
2012-03-13 10:58 ` Michael Olbrich
2012-03-12 21:25 ` [ptxdist] [PATCH 5/5] [x86_64, libc] Link /usr/lib/libdl.so is not needed and wrong on x86_64 Remy Bohmer
2012-03-13 9:53 ` [ptxdist] [PATCH 1/5] [rt-tests] Use CFLAGS specified by ptxdist platformconfig Michael Olbrich
2012-03-13 10:21 ` Remy Bohmer
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20120313130616.GQ29221@pengutronix.de \
--to=m.olbrich@pengutronix.de \
--cc=ptxdist@pengutronix.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox