MediaTek-Labs / linkit-smart-7688-uboot

Other
102 stars 109 forks source link

which cross tool version to use, #4

Open ghaucience opened 8 years ago

ghaucience commented 8 years ago

i use toolchain-mipsel_24kec+dsp_gcc-4.8-linaro_uClibc-0.9.33.2 here have the problem bellow: (.text+0xb6c): undefined reference to `_GLOBAL_OFFSETTABLE

cmrd-senya commented 7 years ago

The following change fixes it for me:

diff --git a/cpu/ralink_soc/config.mk b/cpu/ralink_soc/config.mk
index a372424..67fae74 100644
--- a/cpu/ralink_soc/config.mk
+++ b/cpu/ralink_soc/config.mk
@@ -24,9 +24,9 @@ v=$(shell \
 $(AS) --version|grep "GNU assembler"|awk -F . '{print $$2}')
 MIPSFLAGS=$(shell \
 if [ "$v" -lt "14" ]; then \
-       echo "-mabicalls"; \
+       echo "-mabicalls -EL -fpic"; \
 else \
-       echo "-mabicalls"; \
+       echo "-mabicalls -EL -fpic"; \
 fi)
 #      Dennis Lee, Big Endian need -EB otherwise remove -EB
 #      echo "-mcpu=4kc -EB -mabicalls";