- Sat Feb 06, 2016 11:28 am
#40569
jcmvbkbc wrote:Ok, I've pushed the fix to https://github.com/jcmvbkbc/crosstool-N ... nsa-1.22.x . Now libstdc++ should be build with -mlongcalls -mtext-section-literals, which should fix short range of call0.
Please try (you'd need to rebuild crosstool-ng, clean up .build directory and old .config, reconfigure for xtensa-lx106-elf and rebuild).
Thank you jcmvbkbc. I got a fresh clone from the crosstool-NG repo and built a new toolchain. I struggled a bit with the config setup as I usually compile the toolchain from the esp-open-sdk (which provides a config for crosstool-NG).
Unfortunately I still get dreaded "dangerous relocation: call0".
Here are some of them (I have many more of course):
Code: Select all/Volumes/esp-open-sdk/crosstool-NG-lc/x-tools/xtensa-lx106-elf/lib/gcc/xtensa-lx106-elf/4.8.5/../../../../xtensa-lx106-elf/lib/libstdc++.a(cp-demangle.o): In function `d_append_string':
/Volumes/esp-open-sdk/crosstool-NG-lc/.build/xtensa-lx106-elf/build/build-cc-gcc-final/xtensa-lx106-elf/libstdc++-v3/libsupc++/cp-demangle.c:3732:(.text+0x3c5): dangerous relocation: call0: call target out of range: strlen
/Volumes/esp-open-sdk/crosstool-NG-lc/x-tools/xtensa-lx106-elf/lib/gcc/xtensa-lx106-elf/4.8.5/../../../../xtensa-lx106-elf/lib/libstdc++.a(cp-demangle.o): In function `d_append_num':
/Volumes/esp-open-sdk/crosstool-NG-lc/.build/xtensa-lx106-elf/build/build-cc-gcc-final/xtensa-lx106-elf/libstdc++-v3/libsupc++/cp-demangle.c:3739:(.text+0x3ee): dangerous relocation: call0: call target out of range: sprintf
/Volumes/esp-open-sdk/crosstool-NG-lc/x-tools/xtensa-lx106-elf/lib/gcc/xtensa-lx106-elf/4.8.5/../../../../xtensa-lx106-elf/lib/libstdc++.a(cp-demangle.o): In function `d_identifier':
/Volumes/esp-open-sdk/crosstool-NG-lc/.build/xtensa-lx106-elf/build/build-cc-gcc-final/xtensa-lx106-elf/libstdc++-v3/libsupc++/cp-demangle.c:1617:(.text+0x56e): dangerous relocation: call0: call target out of range: memcmp
/Volumes/esp-open-sdk/crosstool-NG-lc/x-tools/xtensa-lx106-elf/lib/gcc/xtensa-lx106-elf/4.8.5/../../../../xtensa-lx106-elf/lib/libstdc++.a(cp-demangle.o): In function `d_growable_string_resize':
/Volumes/esp-open-sdk/crosstool-NG-lc/.build/xtensa-lx106-elf/build/build-cc-gcc-final/xtensa-lx106-elf/libstdc++-v3/libsupc++/cp-demangle.c:3620:(.text+0x752): dangerous relocation: call0: call target out of range: realloc
/Volumes/esp-open-sdk/crosstool-NG-lc/.build/xtensa-lx106-elf/build/build-cc-gcc-final/xtensa-lx106-elf/libstdc++-v3/libsupc++/cp-demangle.c:3623:(.text+0x75b): dangerous relocation: call0: call target out of range: free
That being said, it is quite possible my config is wrong (see attached). For the record I had to compile for gcc-4.8.5 as compiling with gcc-5.2 would create errors. I am not sure where the -mlongcalls and -mtext-section-literals should be reflected in the crosstool-NG toolchain Makefiles.
I did a
in the crosstool-NG/.build/src/gcc-4.8.5/libstdc++-v3 which caught nothing.
Should I be adding custom arguments the ct-ng config file?
JU
You do not have the required permissions to view the files attached to this post.