ec20 移植 valgrind 出现如下报错

image

/opt/ql-ol-sdk/ql-ol-crosstool/sysroots/x86_64-oesdk-linux/usr/bin/arm-oe-linux-gnueabi/../../libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/4.9.3/real-ld: error: memcheck_arm_linux-mc_main.o: requires unsupported dynamic reloc R_ARM_MOVW_ABS_NC; recompile with -fPIC
/opt/ql-ol-sdk/ql-ol-crosstool/sysroots/x86_64-oesdk-linux/usr/bin/arm-oe-linux-gnueabi/../../libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/4.9.3/real-ld: error: memcheck_arm_linux-mc_main_asm.o: requires unsupported dynamic reloc R_ARM_MOVW_ABS_NC; recompile with -fPIC
/opt/ql-ol-sdk/ql-ol-crosstool/sysroots/x86_64-oesdk-linux/usr/bin/arm-oe-linux-gnueabi/../../libexec/arm-oe-linux-gnueabi/gcc/arm-oe-linux-gnueabi/4.9.3/real-ld: error: ../coregrind/libcoregrind-arm-linux.a(libcoregrind_arm_linux_a-dispatch-arm-linux.o): requires unsupported dynamic reloc R_ARM_MOVW_ABS_NC; recompile with -fPIC
mc_leakcheck.c:1842: error: undefined reference to ‘__stack_chk_fail’
mc_leakcheck.c:1834: error: undefined reference to ‘__stack_chk_guard’
mc_leakcheck.c:756: error: undefined reference to ‘__stack_chk_fail’
mc_leakcheck.c:756: error: undefined reference to ‘__stack_chk_guard’
mc_leakcheck.c:961: error: undefined reference to ‘__stack_chk_fail’
mc_leakcheck.c:961: error: undefined reference to ‘__stack_chk_guard’
mc_leakcheck.c:1200: error: undefined reference to ‘__stack_chk_fail’
mc_leakcheck.c:1200: error: undefined reference to ‘__stack_chk_guard’
collect2: error: ld returned 1 exit status
Makefile:1158: recipe for target ‘memcheck-arm-linux’ failed
make[3]: *** [memcheck-arm-linux] Error 1
make[3]: Leaving directory ‘/host/tool/valgrind-3.25.1/memcheck’
Makefile:1464: recipe for target ‘all-recursive’ failed
make[2]: *** [all-recursive] Error 1
make[2]: Leaving directory ‘/host/tool/valgrind-3.25.1/memcheck’
Makefile:930: recipe for target ‘all-recursive’ failed
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory ‘/host/tool/valgrind-3.25.1’
Makefile:793: recipe for target ‘all’ failed

有人试过3.16.1编译成功。

试下在CFLAGS里加上

 source ql-ol-sdk/ql-ol-crosstool/ql-ol-crosstool-env-init

 export CFLAGS="-O2 -fexpensive-optimizations -frename-registers -fomit-frame-pointer -ftree-vectorize -Wno-error=maybe-uninitialized -finline-functions -finline-limit=64 -fstack-protector-strong -fPIC -Wa,--noexecstack -fno-stack-protector"

需要提供编译流程

image

需要支持编译出此软件

增加环境变量还是存在此问题
image

EC20的SDK是哪个版本的

r07版本 的sdk

需要解决此问题的方法。

需要提供编译方法