Skip to content
Commit cfa74ee3 authored by Vicente Olivert Riera's avatar Vicente Olivert Riera Committed by Thomas Petazzoni
Browse files

libselinux: use correct definition of ARCH



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: default avatarVicente Olivert Riera <Vincent.Riera@imgtec.com>
Reviewed-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: default avatarThomas Petazzoni <thomas.petazzoni@free-electrons.com>
parent bb166374
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment