[llvm-dev] Compilation issue "unsupported relocation on symbol" with clang 3.7.1

via llvm-dev llvm-dev at lists.llvm.org
Sun Nov 26 04:09:24 PST 2017


Hi List,

I'm trying to build llvm-5.0.0 with clang-3.7.1 on ARM (native building). At some point I have the following issue :

----

[1588/5024] Building C object projects/compiler-rt/lib/builtins/CMakeFiles/clang_rt.builtins-arm.dir/cpu_model.c.o
../projects/compiler-rt/lib/builtins/cpu_model.c:596:7: warning: ISO C requires a translation unit to contain at least one declaration [-Wempty-translation-unit]
#endif
 ^
1 warning generated.
[1786/5024] Building C object projects/compiler-rt/lib/builtins/CMakeFiles/clang_rt.builtins-armv6m.dir/cpu_model.c.o
../projects/compiler-rt/lib/builtins/cpu_model.c:596:7: warning: ISO C requires a translation unit to contain at least one declaration [-Wempty-translation-unit]
#endif
 ^
1 warning generated.
[1915/5024] Building ASM object projects/compiler-rt/lib/built...s/CMakeFiles/clang_rt.builtins-armv6m.dir/arm/aeabi_memcmp.S.o
FAILED: projects/compiler-rt/lib/builtins/CMakeFiles/clang_rt.builtins-armv6m.dir/arm/aeabi_memcmp.S.o
/usr/bin/clang -DLLVM_BUILD_GLOBAL_ISEL -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Iprojects/compiler-rt/lib/builtins -I../projects/compiler-rt/lib/builtins -Iinclude -I../include -fPIC -O3 -DNDEBUG -march=armv6m -mfloat-abi=soft -fno-lto -MD -MT projects/compiler-rt/lib/builtins/CMakeFiles/clang_rt.builtins-armv6m.dir/arm/aeabi_memcmp.S.o -MF projects/compiler-rt/lib/builtins/CMakeFiles/clang_rt.builtins-armv6m.dir/arm/aeabi_memcmp.S.o.d -o projects/compiler-rt/lib/builtins/CMakeFiles/clang_rt.builtins-armv6m.dir/arm/aeabi_memcmp.S.o -c ../projects/compiler-rt/lib/builtins/arm/aeabi_memcmp.S
clang -cc1as: fatal error: error in backend: unsupported relocation on symbol
[1917/5024] Building ASM object projects/compiler-rt/lib/built.../CMakeFiles/clang_rt.builtins-armv6m.dir/arm/aeabi_memmove.S.o
FAILED: projects/compiler-rt/lib/builtins/CMakeFiles/clang_rt.builtins-armv6m.dir/arm/aeabi_memmove.S.o
/usr/bin/clang -DLLVM_BUILD_GLOBAL_ISEL -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Iprojects/compiler-rt/lib/builtins -I../projects/compiler-rt/lib/builtins -Iinclude -I../include -fPIC -O3 -DNDEBUG -march=armv6m -mfloat-abi=soft -fno-lto -MD -MT projects/compiler-rt/lib/builtins/CMakeFiles/clang_rt.builtins-armv6m.dir/arm/aeabi_memmove.S.o -MF projects/compiler-rt/lib/builtins/CMakeFiles/clang_rt.builtins-armv6m.dir/arm/aeabi_memmove.S.o.d -o projects/compiler-rt/lib/builtins/CMakeFiles/clang_rt.builtins----armv6m.dir/arm/aeabi_memmove.S.o -c ../projects/compiler-rt/lib/builtins/arm/aeabi_memmove.S
clang -cc1as: fatal error: error in backend: unsupported relocation on symbol
[1918/5024] Building ASM object projects/compiler-rt/lib/built...s/CMakeFiles/clang_rt.builtins-armv6m.dir/arm/aeabi_memcpy.S.o
FAILED: projects/compiler-rt/lib/builtins/CMakeFiles/clang_rt.builtins-armv6m.dir/arm/aeabi_memcpy.S.o
/usr/bin/clang -DLLVM_BUILD_GLOBAL_ISEL -D_FILE_OFFSET_BITS=64 -D_GNU_SOURCE -D_LARGEFILE_SOURCE -D__STDC_CONSTANT_MACROS -D__STDC_FORMAT_MACROS -D__STDC_LIMIT_MACROS -Iprojects/compiler-rt/lib/builtins -I../projects/compiler-rt/lib/builtins -Iinclude -I../include -fPIC -O3 -DNDEBUG -march=armv6m -mfloat-abi=soft -fno-lto -MD -MT projects/compiler-rt/lib/builtins/CMakeFiles/clang_rt.builtins-armv6m.dir/arm/aeabi_memcpy.S.o -MF projects/compiler-rt/lib/builtins/CMakeFiles/clang_rt.builtins-armv6m.dir/arm/aeabi_memcpy.S.o.d -o projects/compiler-rt/lib/builtins/CMakeFiles/clang_rt.builtins-armv6m.dir/arm/aeabi_memcpy.S.o -c ../projects/compiler-rt/lib/builtins/arm/aeabi_memcpy.S
clang -cc1as: fatal error: error in backend: unsupported relocation on symbol
[1920/5024] Building CXX object lib/Target/ARM/MCTargetDesc/CMakeFiles/LLVMARMDesc.dir/ARMMCTargetDesc.cpp.o
ninja: build stopped: subcommand failed.

----
Relevant stuff:
 clang -cc1as: fatal error: error in backend: unsupported relocation on symbol

Well, I don't know how to fix that. Any ideas ?

Let me know if you need further info.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20171126/30930422/attachment-0001.html>


More information about the llvm-dev mailing list