Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Vicente Olivert Riera <Vincent.Riera@imgtec.com>
To: buildroot@busybox.net
Subject: [Buildroot] [PATCH] libselinux: use correct definition of ARCH
Date: Wed, 16 Sep 2015 11:46:41 +0100	[thread overview]
Message-ID: <55F94891.4070908@imgtec.com> (raw)
In-Reply-To: <20150916123943.16869e63@free-electrons.com>

Dear Thomas Petazzoni,

On 09/16/2015 11:39 AM, Thomas Petazzoni wrote:
> 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.

Yeah, I set a new autobuilder to run only MIPS builds since currently
there aren't many autobuild failures to look at (I needed more!), and I
put it on a x86 virtual machine just to also catch possible issues due
to building on a 32-bit host machine, and because I already had another
autobuilder running on a x86_64 host. And look, I have already catch one! :D

Thanks for the review.

Regards,

Vincent.

> Thanks!
> 
> Thomas
> 

  reply	other threads:[~2015-09-16 10:46 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
2015-09-16 10:46   ` Vicente Olivert Riera [this message]
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=55F94891.4070908@imgtec.com \
    --to=vincent.riera@imgtec.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