From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] libselinux: use correct definition of ARCH
Date: Wed, 16 Sep 2015 12:39:43 +0200 [thread overview]
Message-ID: <20150916123943.16869e63@free-electrons.com> (raw)
In-Reply-To: <1442398203-46701-1-git-send-email-Vincent.Riera@imgtec.com>
Dear Vicente Olivert Riera,
On Wed, 16 Sep 2015 11:10:03 +0100, Vicente Olivert Riera wrote:
> The Makefile of libselinux performs the following check:
>
> ARCH := $(patsubst i%86,i386,$(shell uname -m))
> ifneq (,$(filter i386,$(ARCH)))
> TLSFLAGS += -mno-tls-direct-seg-refs
> endif
>
> Which means that if the host machine is an x86, then TLSFLAGS will
> contain -mno-tls-direct-seg-refs. That command line option causes
> libselinux to fail when building it for target architectures where the
> compiler doesn't support that option, i.e. MIPS:
>
> mips-img-linux-gnu-gcc: error: unrecognized command line option
> ?-mno-tls-direct-seg-refs?
>
> So to fix that problem we can set the ARCH variable to $(KERNEL_ARCH),
> and then append it to the LIBSELINUX_MAKE_OPTS.
>
> Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
Looks good to me:
Reviewed-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
I'm surprised we never caught this through the autobuilder testing, but
I guess all autobuilder machines are x86_64 based, which will not
exhibit the problem.
Thanks!
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
next prev parent reply other threads:[~2015-09-16 10:39 UTC|newest]
Thread overview: 6+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-09-16 10:10 [Buildroot] [PATCH] libselinux: use correct definition of ARCH Vicente Olivert Riera
2015-09-16 10:39 ` Thomas Petazzoni [this message]
2015-09-16 10:46 ` Vicente Olivert Riera
2015-09-16 11:41 ` Thomas Petazzoni
2015-09-16 14:25 ` Vicente Olivert Riera
2015-09-16 20:19 ` Thomas Petazzoni
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=20150916123943.16869e63@free-electrons.com \
--to=thomas.petazzoni@free-electrons.com \
--cc=buildroot@busybox.net \
/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