ext-toolchain-wrapper: force hash-style to 'both'
authorPatrick Ziegler <patrick.ziegler@fh-kl.de>
Sat, 8 Jun 2013 09:14:21 +0000 (11:14 +0200)
committerPeter Korsgaard <jacmet@sunsite.dk>
Mon, 10 Jun 2013 22:06:30 +0000 (00:06 +0200)
If ext-toolchain-wrapper was built with a gcc that uses hash-style 'gnu' by
default, the resulting binary might be unusable on other systems. The error
in this case is "Floating point exception".
Using hash-style 'both' solves this issue.

Signed-off-by: Patrick Ziegler <patrick.ziegler@fh-kl.de>
Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
Signed-off-by: Peter Korsgaard <jacmet@sunsite.dk>
toolchain/toolchain-external/ext-tool.mk

index 30a49533a47453e285b06f9fb6c8d445f0f2ad77..430b2bc57d3671d24291a2e1874d38e59ef91a73 100644 (file)
@@ -491,7 +491,9 @@ $(HOST_DIR)/usr/bin/ext-toolchain-wrapper: $(STAMP_DIR)/ext-toolchain-installed
                        ;; \
                esac; \
        done ;
-       $(HOSTCC) $(HOST_CFLAGS) $(TOOLCHAIN_EXTERNAL_WRAPPER_ARGS) -s \
+       # We use --hash-style=both to increase the compatibility of
+       # the generated binary with older platforms
+       $(HOSTCC) $(HOST_CFLAGS) $(TOOLCHAIN_EXTERNAL_WRAPPER_ARGS) -s -Wl,--hash-style=both \
                toolchain/toolchain-external/ext-toolchain-wrapper.c -o $@
 
 # 'uclibc' is the target to provide toolchain / staging dir