mirror of
https://github.com/motioneye-project/motioneyeos.git
synced 2025-07-27 05:06:39 +00:00
linux-tools/perf: fix build for MIPS by using the right emulation on LD
Passing just the endianness flag to LD is not enough. We need to pass the right emulation flag which will set everything for us, not only the endianness. Signed-off-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com> Signed-off-by: Arnout Vandecappelle (Essensium/Mind) <arnout@mind.be>
This commit is contained in:
parent
32caa954b0
commit
f574a8eba6
@ -28,17 +28,25 @@ PERF_MAKE_FLAGS = \
|
|||||||
NO_LIBPYTHON=1 \
|
NO_LIBPYTHON=1 \
|
||||||
NO_LIBBIONIC=1
|
NO_LIBBIONIC=1
|
||||||
|
|
||||||
# We need to pass an argument to ld for setting the endianness when
|
# We need to pass an argument to ld for setting the emulation when
|
||||||
# building it for MIPS architecture, otherwise the default one will
|
# building for MIPS architecture, otherwise the default one will always
|
||||||
# always be used (which is big endian) and the compilation for little
|
# be used and the compilation for most variants will fail.
|
||||||
# endian will always fail showing an error like this one:
|
ifeq ($(BR2_mips),y)
|
||||||
# LD foo.o
|
PERF_MAKE_FLAGS += LD="$(TARGET_LD) -m elf32btsmip"
|
||||||
# mips-linux-gnu-ld: foo.o: compiled for a little endian system and
|
else ifeq ($(BR2_mipsel),y)
|
||||||
# target is big endian
|
PERF_MAKE_FLAGS += LD="$(TARGET_LD) -m elf32ltsmip"
|
||||||
ifeq ($(BR2_mips)$(BR2_mips64),y)
|
else ifeq ($(BR2_mips64),y)
|
||||||
PERF_MAKE_FLAGS += LD="$(TARGET_LD) -EB"
|
ifeq ($(BR2_MIPS_NABI32),y)
|
||||||
else ifeq ($(BR2_mipsel)$(BR2_mips64el),y)
|
PERF_MAKE_FLAGS += LD="$(TARGET_LD) -m elf32btsmipn32"
|
||||||
PERF_MAKE_FLAGS += LD="$(TARGET_LD) -EL"
|
else
|
||||||
|
PERF_MAKE_FLAGS += LD="$(TARGET_LD) -m elf64btsmip"
|
||||||
|
endif
|
||||||
|
else ifeq ($(BR2_mips64el),y)
|
||||||
|
ifeq ($(BR2_MIPS_NABI32),y)
|
||||||
|
PERF_MAKE_FLAGS += LD="$(TARGET_LD) -m elf32ltsmipn32"
|
||||||
|
else
|
||||||
|
PERF_MAKE_FLAGS += LD="$(TARGET_LD) -m elf64ltsmip"
|
||||||
|
endif
|
||||||
endif
|
endif
|
||||||
|
|
||||||
# The call to backtrace() function fails for ARC, because for some
|
# The call to backtrace() function fails for ARC, because for some
|
||||||
|
Loading…
x
Reference in New Issue
Block a user