toolchain/external: fix building the wrapper on MIPS
Some crazy folks use MIPS machines as build machines. ;-) On MIPS, the only acceptable hash-style is 'sysv', because the MIPS ABI defines that the GOT ordering to be the same as the symbols ordering, while GNU hash requires symbols to be sorted by their hash. Looking at binutils' code, it seems that only MIPS suffers from that limitation. Currently, we force the toolchain wrapper to be linked with both hash styles, which breaks on MIPS. So, fix that by singling out MIPS, and use sysv in that case, and both otherwise. Reported-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com> Signed-off-by: "Yann E. MORIN" <yann.morin.1998@free.fr> Reviewed-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com> Tested-by: Vicente Olivert Riera <Vincent.Riera@imgtec.com> Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
This commit is contained in:
parent
30362526a0
commit
3e0440407a
|
@ -625,6 +625,15 @@ define TOOLCHAIN_EXTERNAL_INSTALL_BFIN_FLAT
|
||||||
endef
|
endef
|
||||||
endif
|
endif
|
||||||
|
|
||||||
|
# We use --hash-style=both to increase the compatibility of
|
||||||
|
# the generated binary with older platforms, except for MIPS,
|
||||||
|
# where the only acceptable hash style is 'sysv'
|
||||||
|
ifeq ($(findstring mips,$(HOSTARCH)),mips)
|
||||||
|
TOOLCHAIN_EXTERNAL_WRAPPER_HASH_STYLE = sysv
|
||||||
|
else
|
||||||
|
TOOLCHAIN_EXTERNAL_WRAPPER_HASH_STYLE = both
|
||||||
|
endif
|
||||||
|
|
||||||
# Build toolchain wrapper for preprocessor, C and C++ compiler and setup
|
# Build toolchain wrapper for preprocessor, C and C++ compiler and setup
|
||||||
# symlinks for everything else. Skip gdb symlink when we are building our
|
# symlinks for everything else. Skip gdb symlink when we are building our
|
||||||
# own gdb to prevent two gdb's in output/host/usr/bin.
|
# own gdb to prevent two gdb's in output/host/usr/bin.
|
||||||
|
@ -647,9 +656,8 @@ define TOOLCHAIN_EXTERNAL_INSTALL_WRAPPER
|
||||||
;; \
|
;; \
|
||||||
esac; \
|
esac; \
|
||||||
done ;
|
done ;
|
||||||
# We use --hash-style=both to increase the compatibility of
|
$(HOSTCC) $(HOST_CFLAGS) $(TOOLCHAIN_EXTERNAL_WRAPPER_ARGS) \
|
||||||
# the generated binary with older platforms
|
-s -Wl,--hash-style=$(TOOLCHAIN_EXTERNAL_WRAPPER_HASH_STYLE) \
|
||||||
$(HOSTCC) $(HOST_CFLAGS) $(TOOLCHAIN_EXTERNAL_WRAPPER_ARGS) -s -Wl,--hash-style=both \
|
|
||||||
toolchain/toolchain-external/ext-toolchain-wrapper.c \
|
toolchain/toolchain-external/ext-toolchain-wrapper.c \
|
||||||
-o $(HOST_DIR)/usr/bin/ext-toolchain-wrapper
|
-o $(HOST_DIR)/usr/bin/ext-toolchain-wrapper
|
||||||
endef
|
endef
|
||||||
|
|
Loading…
Reference in a new issue