[llvm-dev] Compiling for baremetal ARMv4 on Ubuntu Linux

Christian Richter via llvm-dev llvm-dev at lists.llvm.org
Fri Dec 7 07:47:54 PST 2018


Hello,

on the problems cross-building compiler-rt: Tried to follow 
https://llvm.org/docs/HowToCrossCompileBuiltinsOnArm.html which lead to 
this cmake:

cmake -G "Ninja" ../llvm/projects/compiler-rt/ 
-DCOMPILER_RT_BUILD_BUILTINS=ON -DCOMPILER_RT_BUILD_SANITIZERS=OFF 
-DCOMPILER_RT_BUILD_XRAY=OFF -DCOMPILER_RT_BUILD_LIBFUZZER=OFF 
-DCOMPILER_RT_BUILD_PROFILE=OFF 
-DCMAKE_C_COMPILER=/usr/local/myclang/bin/clang 
-DCMAKE_AR=/usr/local/myclang/bin/llvm-ar 
-DCMAKE_NM=/usr/local/myclang/bin/llvm-nm 
-DCMAKE_RANLIB=/usr/local/myclang/bin/llvm-ranlib 
-DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY 
-DCMAKE_C_COMPILER_TARGET="arm-linux-gnueabihf" 
-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON 
-DLLVM_CONFIG_PATH=/usr/local/myclang/bin/llvm-config 
-DCMAKE_C_FLAGS="--target=arm-linux-gnueabihf -march=armv7a 
--gcc-toolchain=/usr/arm-linux-gnueabihf 
--sysroot=/usr/arm-linux-gnueabihf/lib"

Some small notes:

- Used -DCMAKE_TRY_COMPILE_TARGET_TYPE=STATIC_LIBRARY instead of 
-DCMAKE_EXE_LINKER_FLAGS="-fuse-ld=lld" as Peter Smith suggested because 
it actually is a library and therefore does not need to be linked. If I 
do not change that, the cmake does not work (see below).

- used -G "Ninja" although not explicitly stated in the tutorial as they 
use "ninja builtins" next.

- had to change --march=armv7a to -march=armv7a as clang did not accept 
the first one.

the cmake was successful, but the ninja builtins was not (see both 
outputs below). Am I doing the --gcc-toolchain / --sysroot part right? 
These are just the places where the result of "apt install 
arm-linux-gnueabihf" lives.

cmake output with -DCMAKE_EXE_LINKER_FLAGS="-fuse-ld=lld":

root at christian-forschung-virtual-machine:/home/llvm_all/buildrtonly# 
cmake -G "Ninja" ../llvm/projects/compiler-rt/ 
-DCOMPILER_RT_BUILD_BUILTINS=ON -DCOMPILER_RT_BUILD_SANITIZERS=OFF 
-DCOMPILER_RT_BUILD_XRAY=OFF -DCOMPILER_RT_BUILD_LIBFUZZER=OFF 
-DCOMPILER_RT_BUILD_PROFILE=OFF 
-DCMAKE_C_COMPILER=/usr/local/myclang/bin/clang 
-DCMAKE_AR=/usr/local/myclang/bin/llvm-ar 
-DCMAKE_NM=/usr/local/myclang/bin/llvm-nm 
-DCMAKE_RANLIB=/usr/local/myclang/bin/llvm-ranlib 
-DCMAKE_EXE_LINKER_FLAGS="-fuse-ld=lld" 
-DCMAKE_C_COMPILER_TARGET="arm-linux-gnueabihf" 
-DCOMPILER_RT_DEFAULT_TARGET_ONLY=ON 
-DLLVM_CONFIG_PATH=/usr/local/myclang/bin/llvm-config 
-DCMAKE_C_FLAGS="--target=arm-linux-gnueabihf -march=armv7a 
--gcc-toolchain=/usr/arm-linux-gnueabihf 
--sysroot=/usr/arm-linux-gnueabihf/lib"
-- The C compiler identification is Clang 8.0.0
-- The CXX compiler identification is Clang 8.0.0
-- The ASM compiler identification is unknown
-- Found assembler: /usr/local/myclang/bin/clang
-- Check for working C compiler: /usr/local/myclang/bin/clang
-- Check for working C compiler: /usr/local/myclang/bin/clang -- broken
CMake Error at /usr/share/cmake-3.10/Modules/CMakeTestCCompiler.cmake:52 
(message):
   The C compiler

     "/usr/local/myclang/bin/clang"

   is not able to compile a simple test program.

   It fails with the following output:

     Change Dir: /home/llvm_all/buildrtonly/CMakeFiles/CMakeTmp

     Run Build Command:"/usr/bin/ninja" "cmTC_22d97"
     [1/2] Building C object CMakeFiles/cmTC_22d97.dir/testCCompiler.c.o
     [2/2] Linking C executable cmTC_22d97
     FAILED: cmTC_22d97
     : && /usr/local/myclang/bin/clang --target=arm-linux-gnueabihf 
--target=arm-linux-gnueabihf -march=armv7a 
--gcc-toolchain=/usr/arm-linux-gnueabihf 
--sysroot=/usr/arm-linux-gnueabihf/lib  -fuse-ld=lld 
CMakeFiles/cmTC_22d97.dir/testCCompiler.c.o  -o cmTC_22d97 && :
     ld.lld: error: cannot open crt1.o: No such file or directory
     ld.lld: error: cannot open crti.o: No such file or directory
     ld.lld: error: cannot open crtbegin.o: No such file or directory
     ld.lld: error: unable to find library -lgcc
     ld.lld: error: unable to find library -lgcc_s
     ld.lld: error: unable to find library -lc
     ld.lld: error: unable to find library -lgcc
     ld.lld: error: unable to find library -lgcc_s
     ld.lld: error: cannot open crtend.o: No such file or directory
     ld.lld: error: cannot open crtn.o: No such file or directory
     clang-8: error: linker command failed with exit code 1 (use -v to 
see invocation)
     ninja: build stopped: subcommand failed.

CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
   CMakeLists.txt:10 (project)
-- Configuring incomplete, errors occurred!
See also "/home/llvm_all/buildrtonly/CMakeFiles/CMakeOutput.log".
See also "/home/llvm_all/buildrtonly/CMakeFiles/CMakeError.log".


Note: Googling this error suggested installing gcc-multilib or linking 
"sudo ln -s /usr/lib/x86_64-linux-gnu /usr/lib64" (which both did not 
fix it). But the crt1.o that lld does not seem to find is probably the 
one from arm-linux-gnueabihf, right? "Locate" says it's right in 
/usr/arm-linux-gnueabihf/lib.

Thanks so far!

Christian


cmake output with STATIC_LIBRARY:

-- The C compiler identification is Clang 8.0.0
-- The CXX compiler identification is Clang 8.0.0
-- The ASM compiler identification is Clang
-- Found assembler: /usr/local/myclang/bin/clang
-- Check for working C compiler: /usr/local/myclang/bin/clang
-- Check for working C compiler: /usr/local/myclang/bin/clang -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Check for working CXX compiler: /usr/local/myclang/bin/clang++
-- Check for working CXX compiler: /usr/local/myclang/bin/clang++ -- works
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Looking for unwind.h
-- Looking for unwind.h - found
-- Found PythonInterp: /usr/bin/python2.7 (found version "2.7.15")
-- Looking for fopen in c
-- Looking for fopen in c - found
-- Looking for __gcc_personality_v0 in gcc_s
-- Looking for __gcc_personality_v0 in gcc_s - found
-- Performing Test COMPILER_RT_HAS_NODEFAULTLIBS_FLAG
-- Performing Test COMPILER_RT_HAS_NODEFAULTLIBS_FLAG - Success
-- Performing Test COMPILER_RT_HAS_FFREESTANDING_FLAG
-- Performing Test COMPILER_RT_HAS_FFREESTANDING_FLAG - Success
-- Performing Test COMPILER_RT_HAS_FPIC_FLAG
-- Performing Test COMPILER_RT_HAS_FPIC_FLAG - Success
-- Performing Test COMPILER_RT_HAS_FPIE_FLAG
-- Performing Test COMPILER_RT_HAS_FPIE_FLAG - Success
-- Performing Test COMPILER_RT_HAS_FNO_BUILTIN_FLAG
-- Performing Test COMPILER_RT_HAS_FNO_BUILTIN_FLAG - Success
-- Performing Test COMPILER_RT_HAS_FNO_EXCEPTIONS_FLAG
-- Performing Test COMPILER_RT_HAS_FNO_EXCEPTIONS_FLAG - Success
-- Performing Test COMPILER_RT_HAS_FOMIT_FRAME_POINTER_FLAG
-- Performing Test COMPILER_RT_HAS_FOMIT_FRAME_POINTER_FLAG - Success
-- Performing Test COMPILER_RT_HAS_FUNWIND_TABLES_FLAG
-- Performing Test COMPILER_RT_HAS_FUNWIND_TABLES_FLAG - Success
-- Performing Test COMPILER_RT_HAS_FNO_STACK_PROTECTOR_FLAG
-- Performing Test COMPILER_RT_HAS_FNO_STACK_PROTECTOR_FLAG - Success
-- Performing Test COMPILER_RT_HAS_FNO_SANITIZE_SAFE_STACK_FLAG
-- Performing Test COMPILER_RT_HAS_FNO_SANITIZE_SAFE_STACK_FLAG - Success
-- Performing Test COMPILER_RT_HAS_FVISIBILITY_HIDDEN_FLAG
-- Performing Test COMPILER_RT_HAS_FVISIBILITY_HIDDEN_FLAG - Success
-- Performing Test COMPILER_RT_HAS_FRTTI_FLAG
-- Performing Test COMPILER_RT_HAS_FRTTI_FLAG - Success
-- Performing Test COMPILER_RT_HAS_FNO_RTTI_FLAG
-- Performing Test COMPILER_RT_HAS_FNO_RTTI_FLAG - Success
-- Performing Test COMPILER_RT_HAS_FNO_FUNCTION_SECTIONS_FLAG
-- Performing Test COMPILER_RT_HAS_FNO_FUNCTION_SECTIONS_FLAG - Success
-- Performing Test COMPILER_RT_HAS_STD_CXX11_FLAG
-- Performing Test COMPILER_RT_HAS_STD_CXX11_FLAG - Success
-- Performing Test COMPILER_RT_HAS_FTLS_MODEL_INITIAL_EXEC
-- Performing Test COMPILER_RT_HAS_FTLS_MODEL_INITIAL_EXEC - Success
-- Performing Test COMPILER_RT_HAS_FNO_LTO_FLAG
-- Performing Test COMPILER_RT_HAS_FNO_LTO_FLAG - Success
-- Performing Test COMPILER_RT_HAS_MSSE3_FLAG
-- Performing Test COMPILER_RT_HAS_MSSE3_FLAG - Success
-- Performing Test COMPILER_RT_HAS_MSSE4_2_FLAG
-- Performing Test COMPILER_RT_HAS_MSSE4_2_FLAG - Success
-- Performing Test COMPILER_RT_HAS_SYSROOT_FLAG
-- Performing Test COMPILER_RT_HAS_SYSROOT_FLAG - Success
-- Performing Test COMPILER_RT_HAS_MCRC_FLAG
-- Performing Test COMPILER_RT_HAS_MCRC_FLAG - Failed
-- Performing Test COMPILER_RT_HAS_FVISIBILITY_INLINES_HIDDEN_FLAG
-- Performing Test COMPILER_RT_HAS_FVISIBILITY_INLINES_HIDDEN_FLAG - 
Success
-- Performing Test COMPILER_RT_HAS_GR_FLAG
-- Performing Test COMPILER_RT_HAS_GR_FLAG - Failed
-- Performing Test COMPILER_RT_HAS_GS_FLAG
-- Performing Test COMPILER_RT_HAS_GS_FLAG - Failed
-- Performing Test COMPILER_RT_HAS_MT_FLAG
-- Performing Test COMPILER_RT_HAS_MT_FLAG - Failed
-- Performing Test COMPILER_RT_HAS_Oy_FLAG
-- Performing Test COMPILER_RT_HAS_Oy_FLAG - Failed
-- Performing Test COMPILER_RT_HAS_GLINE_TABLES_ONLY_FLAG
-- Performing Test COMPILER_RT_HAS_GLINE_TABLES_ONLY_FLAG - Success
-- Performing Test COMPILER_RT_HAS_G_FLAG
-- Performing Test COMPILER_RT_HAS_G_FLAG - Success
-- Performing Test COMPILER_RT_HAS_Zi_FLAG
-- Performing Test COMPILER_RT_HAS_Zi_FLAG - Failed
-- Performing Test COMPILER_RT_HAS_WALL_FLAG
-- Performing Test COMPILER_RT_HAS_WALL_FLAG - Success
-- Performing Test COMPILER_RT_HAS_WERROR_FLAG
-- Performing Test COMPILER_RT_HAS_WERROR_FLAG - Success
-- Performing Test COMPILER_RT_HAS_WFRAME_LARGER_THAN_FLAG
-- Performing Test COMPILER_RT_HAS_WFRAME_LARGER_THAN_FLAG - Success
-- Performing Test COMPILER_RT_HAS_WGLOBAL_CONSTRUCTORS_FLAG
-- Performing Test COMPILER_RT_HAS_WGLOBAL_CONSTRUCTORS_FLAG - Success
-- Performing Test COMPILER_RT_HAS_WC99_EXTENSIONS_FLAG
-- Performing Test COMPILER_RT_HAS_WC99_EXTENSIONS_FLAG - Success
-- Performing Test COMPILER_RT_HAS_WGNU_FLAG
-- Performing Test COMPILER_RT_HAS_WGNU_FLAG - Success
-- Performing Test COMPILER_RT_HAS_WNON_VIRTUAL_DTOR_FLAG
-- Performing Test COMPILER_RT_HAS_WNON_VIRTUAL_DTOR_FLAG - Success
-- Performing Test COMPILER_RT_HAS_WVARIADIC_MACROS_FLAG
-- Performing Test COMPILER_RT_HAS_WVARIADIC_MACROS_FLAG - Success
-- Performing Test COMPILER_RT_HAS_WUNUSED_PARAMETER_FLAG
-- Performing Test COMPILER_RT_HAS_WUNUSED_PARAMETER_FLAG - Success
-- Performing Test COMPILER_RT_HAS_WCOVERED_SWITCH_DEFAULT_FLAG
-- Performing Test COMPILER_RT_HAS_WCOVERED_SWITCH_DEFAULT_FLAG - Success
-- Performing Test COMPILER_RT_HAS_W4_FLAG
-- Performing Test COMPILER_RT_HAS_W4_FLAG - Failed
-- Performing Test COMPILER_RT_HAS_WX_FLAG
-- Performing Test COMPILER_RT_HAS_WX_FLAG - Failed
-- Performing Test COMPILER_RT_HAS_WD4146_FLAG
-- Performing Test COMPILER_RT_HAS_WD4146_FLAG - Failed
-- Performing Test COMPILER_RT_HAS_WD4291_FLAG
-- Performing Test COMPILER_RT_HAS_WD4291_FLAG - Failed
-- Performing Test COMPILER_RT_HAS_WD4221_FLAG
-- Performing Test COMPILER_RT_HAS_WD4221_FLAG - Failed
-- Performing Test COMPILER_RT_HAS_WD4391_FLAG
-- Performing Test COMPILER_RT_HAS_WD4391_FLAG - Failed
-- Performing Test COMPILER_RT_HAS_WD4722_FLAG
-- Performing Test COMPILER_RT_HAS_WD4722_FLAG - Failed
-- Performing Test COMPILER_RT_HAS_WD4800_FLAG
-- Performing Test COMPILER_RT_HAS_WD4800_FLAG - Failed
-- Looking for __func__
-- Looking for __func__ - found
-- Looking for dlopen in dl
-- Looking for dlopen in dl - found
-- Looking for shm_open in rt
-- Looking for shm_open in rt - found
-- Looking for pow in m
-- Looking for pow in m - found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Looking for setupterm in terminfo
-- Looking for setupterm in terminfo - found
-- Looking for __cxa_throw in c++
-- Looking for __cxa_throw in c++ - found
-- Looking for __cxa_throw in stdc++
-- Looking for __cxa_throw in stdc++ - found
-- Compiler-RT supported architectures: armhf
-- Performing Test COMPILER_RT_HAS_STD_C11_FLAG
-- Performing Test COMPILER_RT_HAS_STD_C11_FLAG - Success
-- Performing Test COMPILER_RT_HAS_VISIBILITY_HIDDEN_FLAG
-- Performing Test COMPILER_RT_HAS_VISIBILITY_HIDDEN_FLAG - Success
-- Performing Test COMPILER_RT_HAS_OMIT_FRAME_POINTER_FLAG
-- Performing Test COMPILER_RT_HAS_OMIT_FRAME_POINTER_FLAG - Success
-- Performing Test COMPILER_RT_HAS_FREESTANDING_FLAG
-- Performing Test COMPILER_RT_HAS_FREESTANDING_FLAG - Success
-- Performing Test COMPILER_RT_HAS_XRAY_COMPILER_FLAG
-- Performing Test COMPILER_RT_HAS_XRAY_COMPILER_FLAG - Success
-- Performing Test COMPILER_RT_HAS_ATOMIC_KEYWORD
-- Performing Test COMPILER_RT_HAS_ATOMIC_KEYWORD - Success
-- Builtin supported architectures: armhf
-- Looking for __VFP_FP__
-- Looking for __VFP_FP__ - found
-- Configuring done
-- Generating done
-- Build files have been written to: /home/llvm_all/buildrtonly

--------------------------------------

ninja output:


root at christian-forschung-virtual-machine:/home/llvm_all/buildrtonly# 
ninja builtins

[1/207] Building ASM object 
lib/builtins/CMakeFiles/clang_rt.builtins-armhf.dir/arm/bswapsi2.S.o
FAILED: 
lib/builtins/CMakeFiles/clang_rt.builtins-armhf.dir/arm/bswapsi2.S.o
/usr/local/myclang/bin/clang -DVISIBILITY_HIDDEN  -fno-lto -std=c11 
-fPIC -fno-builtin -fvisibility=hidden -fomit-frame-pointer 
-fomit-frame-pointer -DCOMPILER_RT_ARMHF_TARGET -MD -MT 
lib/builtins/CMakeFiles/clang_rt.builtins-armhf.dir/arm/bswapsi2.S.o -MF 
lib/builtins/CMakeFiles/clang_rt.builtins-armhf.dir/arm/bswapsi2.S.o.d 
-o lib/builtins/CMakeFiles/clang_rt.builtins-armhf.dir/arm/bswapsi2.S.o 
-c /home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/bswapsi2.S
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/bswapsi2.S:12:2: 
error: unknown directive
  .syntax unified
  ^
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/bswapsi2.S:25:3: 
error: invalid instruction mnemonic 'eor'
   eor r1, r0, r0, ror #16
   ^~~
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/bswapsi2.S:26:15: 
error: unknown token in expression
   bic r1, r1, #0xff0000
               ^
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/bswapsi2.S:27:3: 
error: unknown use of instruction mnemonic without a size suffix
   mov r1, r1, lsr #8
   ^
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/bswapsi2.S:28:3: 
error: invalid instruction mnemonic 'eor'
   eor r0, r1, r0, ror #8
   ^~~
[2/207] Building ASM object 
lib/builtins/CMakeFiles/clang_rt.builtins-armhf.dir/arm/bswapdi2.S.o
FAILED: 
lib/builtins/CMakeFiles/clang_rt.builtins-armhf.dir/arm/bswapdi2.S.o
/usr/local/myclang/bin/clang -DVISIBILITY_HIDDEN  -fno-lto -std=c11 
-fPIC -fno-builtin -fvisibility=hidden -fomit-frame-pointer 
-fomit-frame-pointer -DCOMPILER_RT_ARMHF_TARGET -MD -MT 
lib/builtins/CMakeFiles/clang_rt.builtins-armhf.dir/arm/bswapdi2.S.o -MF 
lib/builtins/CMakeFiles/clang_rt.builtins-armhf.dir/arm/bswapdi2.S.o.d 
-o lib/builtins/CMakeFiles/clang_rt.builtins-armhf.dir/arm/bswapdi2.S.o 
-c /home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/bswapdi2.S
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/bswapdi2.S:12:2: 
error: unknown directive
  .syntax unified
  ^
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/bswapdi2.S:26:5: 
error: invalid instruction mnemonic 'eor'
     eor r2, r0, r0, ror #16
     ^~~
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/bswapdi2.S:27:17: 
error: unknown token in expression
     bic r2, r2, #0xff0000
                 ^
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/bswapdi2.S:28:5: 
error: unknown use of instruction mnemonic without a size suffix
     mov r2, r2, lsr #8
     ^
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/bswapdi2.S:29:5: 
error: invalid instruction mnemonic 'eor'
     eor r2, r2, r0, ror #8
     ^~~
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/bswapdi2.S:31:5: 
error: invalid instruction mnemonic 'eor'
     eor r0, r1, r1, ror #16
     ^~~
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/bswapdi2.S:32:17: 
error: unknown token in expression
     bic r0, r0, #0xff0000
                 ^
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/bswapdi2.S:33:5: 
error: unknown use of instruction mnemonic without a size suffix
     mov r0, r0, lsr #8
     ^
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/bswapdi2.S:34:5: 
error: invalid instruction mnemonic 'eor'
     eor r0, r0, r1, ror #8
     ^~~
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/bswapdi2.S:39:5: 
error: unknown use of instruction mnemonic without a size suffix
     mov r1, r2
     ^
[3/207] Building ASM object 
lib/builtins/CMakeFiles/clang_rt.builtins-armhf.dir/arm/comparesf2.S.o
FAILED: 
lib/builtins/CMakeFiles/clang_rt.builtins-armhf.dir/arm/comparesf2.S.o
/usr/local/myclang/bin/clang -DVISIBILITY_HIDDEN  -fno-lto -std=c11 
-fPIC -fno-builtin -fvisibility=hidden -fomit-frame-pointer 
-fomit-frame-pointer -DCOMPILER_RT_ARMHF_TARGET -MD -MT 
lib/builtins/CMakeFiles/clang_rt.builtins-armhf.dir/arm/comparesf2.S.o 
-MF 
lib/builtins/CMakeFiles/clang_rt.builtins-armhf.dir/arm/comparesf2.S.o.d 
-o 
lib/builtins/CMakeFiles/clang_rt.builtins-armhf.dir/arm/comparesf2.S.o 
-c /home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/comparesf2.S
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/comparesf2.S:41:2: 
error: unknown directive
  .syntax unified
  ^
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/comparesf2.S:45:1: 
error: unexpected token at start of statement
@ int __eqsf2(float a, float b)
^
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/comparesf2.S:50:5: 
error: invalid operand for instruction
     vmov r0, s0
     ^
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/comparesf2.S:51:5: 
error: invalid operand for instruction
     vmov r1, s1
     ^
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/comparesf2.S:53:5: 
error: unknown use of instruction mnemonic without a size suffix
     mov r2, r0, lsl #1
     ^
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/comparesf2.S:54:5: 
error: unknown use of instruction mnemonic without a size suffix
     mov r3, r1, lsl #1
     ^
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/comparesf2.S:56:5: 
error: invalid instruction mnemonic 'orrs'
     orrs r12, r2, r3, lsr #1
     ^~~~
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/comparesf2.S:58:5: 
error: invalid instruction mnemonic 'it'
     it ne
     ^~
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/comparesf2.S:59:5: 
error: invalid instruction mnemonic 'eorsne'
     eorsne r12, r0, r1
     ^~~~~~
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/comparesf2.S:61:5: 
error: invalid instruction mnemonic 'it'
     it pl
     ^~
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/comparesf2.S:62:5: 
error: invalid instruction mnemonic 'subspl'
     subspl r0, r2, r3
     ^~~~~~
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/comparesf2.S:64:5: 
error: invalid instruction mnemonic 'it'
     it lo
     ^~
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/comparesf2.S:65:5: 
error: invalid instruction mnemonic 'mvnlo'
     mvnlo r0, r1, asr #31
     ^~~~~
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/comparesf2.S:67:5: 
error: invalid instruction mnemonic 'it'
     it hi
     ^~
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/comparesf2.S:68:5: 
error: invalid instruction mnemonic 'movhi'
     movhi r0, r1, asr #31
     ^~~~~
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/comparesf2.S:70:5: 
error: invalid instruction mnemonic 'it'
     it ne
     ^~
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/comparesf2.S:71:19: 
error: unknown token in expression
     orrne r0, r0, #1
                   ^
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/comparesf2.S:167:13: 
error: unknown token in expression
     cmp r2, #0xff000000
             ^
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/comparesf2.S:168:5: 
error: invalid instruction mnemonic 'ite'
     ite ls
     ^~~
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/comparesf2.S:169:15: 
error: unknown token in expression
     cmpls r3, #0xff000000
               ^
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/comparesf2.S:170:15: 
error: unknown token in expression
     movhi r0, #1
               ^
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/comparesf2.S:179:1: 
error: unexpected token at start of statement
@ int __gtsf2(float a, float b)
^
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/comparesf2.S:188:5: 
error: invalid operand for instruction
     vmov r0, s0
     ^
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/comparesf2.S:189:5: 
error: invalid operand for instruction
     vmov r1, s1
     ^
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/comparesf2.S:191:5: 
error: unknown use of instruction mnemonic without a size suffix
     mov r2, r0, lsl #1
     ^
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/comparesf2.S:192:5: 
error: unknown use of instruction mnemonic without a size suffix
     mov r3, r1, lsl #1
     ^
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/comparesf2.S:193:5: 
error: invalid instruction mnemonic 'orrs'
     orrs r12, r2, r3, lsr #1
     ^~~~
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/comparesf2.S:194:5: 
error: invalid instruction mnemonic 'it'
     it ne
     ^~
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/comparesf2.S:195:5: 
error: invalid instruction mnemonic 'eorsne'
     eorsne r12, r0, r1
     ^~~~~~
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/comparesf2.S:196:5: 
error: invalid instruction mnemonic 'it'
     it pl
     ^~
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/comparesf2.S:197:5: 
error: invalid instruction mnemonic 'subspl'
     subspl r0, r2, r3
     ^~~~~~
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/comparesf2.S:198:5: 
error: invalid instruction mnemonic 'it'
     it lo
     ^~
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/comparesf2.S:199:5: 
error: invalid instruction mnemonic 'mvnlo'
     mvnlo r0, r1, asr #31
     ^~~~~
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/comparesf2.S:200:5: 
error: invalid instruction mnemonic 'it'
     it hi
     ^~
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/comparesf2.S:201:5: 
error: invalid instruction mnemonic 'movhi'
     movhi r0, r1, asr #31
     ^~~~~
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/comparesf2.S:202:5: 
error: invalid instruction mnemonic 'it'
     it ne
     ^~
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/comparesf2.S:203:19: 
error: unknown token in expression
     orrne r0, r0, #1
                   ^
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/comparesf2.S:204:13: 
error: unknown token in expression
     cmp r2, #0xff000000
             ^
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/comparesf2.S:205:5: 
error: invalid instruction mnemonic 'ite'
     ite ls
     ^~~
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/comparesf2.S:206:15: 
error: unknown token in expression
     cmpls r3, #0xff000000
               ^
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/comparesf2.S:207:15: 
error: unknown token in expression
     movhi r0, #-1
               ^
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/comparesf2.S:214:1: 
error: unexpected token at start of statement
@ int __unordsf2(float a, float b)
^
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/comparesf2.S:220:5: 
error: invalid operand for instruction
     vmov r0, s0
     ^
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/comparesf2.S:221:5: 
error: invalid operand for instruction
     vmov r1, s1
     ^
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/comparesf2.S:224:18: 
error: unknown token in expression
     lsls r2, r0, #1
                  ^
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/comparesf2.S:225:18: 
error: unknown token in expression
     lsls r3, r1, #1
                  ^
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/comparesf2.S:226:14: 
error: unknown token in expression
     movs r0, #0
              ^
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/comparesf2.S:277:13: 
error: unknown token in expression
     cmp r2, #0xff000000
             ^
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/comparesf2.S:278:5: 
error: invalid instruction mnemonic 'ite'
     ite ls
     ^~~
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/comparesf2.S:279:15: 
error: unknown token in expression
     cmpls r3, #0xff000000
               ^
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/comparesf2.S:280:15: 
error: unknown token in expression
     movhi r0, #1
               ^
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/comparesf2.S:287:2: 
error: invalid operand for instruction
  vmov s0, r0
  ^
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/comparesf2.S:288:2: 
error: invalid operand for instruction
  vmov s1, r1
  ^
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/comparesf2.S:289:2: 
error: invalid instruction mnemonic 'b'
  b __unordsf2
  ^
[4/207] Building ASM object 
lib/builtins/CMakeFiles/clang_rt.builtins-armhf.dir/arm/clzsi2.S.o
FAILED: lib/builtins/CMakeFiles/clang_rt.builtins-armhf.dir/arm/clzsi2.S.o
/usr/local/myclang/bin/clang -DVISIBILITY_HIDDEN  -fno-lto -std=c11 
-fPIC -fno-builtin -fvisibility=hidden -fomit-frame-pointer 
-fomit-frame-pointer -DCOMPILER_RT_ARMHF_TARGET -MD -MT 
lib/builtins/CMakeFiles/clang_rt.builtins-armhf.dir/arm/clzsi2.S.o -MF 
lib/builtins/CMakeFiles/clang_rt.builtins-armhf.dir/arm/clzsi2.S.o.d -o 
lib/builtins/CMakeFiles/clang_rt.builtins-armhf.dir/arm/clzsi2.S.o -c 
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/clzsi2.S
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/clzsi2.S:16:2: 
error: unknown directive
  .syntax unified
  ^
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/clzsi2.S:33:2: 
error: unknown use of instruction mnemonic without a size suffix
  mov r1, 1
  ^
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/clzsi2.S:35:2: 
error: invalid instruction mnemonic 'lsrs'
  lsrs r2, r0, 16; movne r0, r2; addeq r1, 16
  ^~~~
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/clzsi2.S:35:19: 
error: invalid instruction mnemonic 'movne'
  lsrs r2, r0, 16; movne r0, r2; addeq r1, 16
                   ^~~~~
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/clzsi2.S:35:33: 
error: invalid instruction mnemonic 'addeq'
  lsrs r2, r0, 16; movne r0, r2; addeq r1, 16
                                 ^~~~~
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/clzsi2.S:36:2: 
error: invalid instruction mnemonic 'lsrs'
  lsrs r2, r0, 8; movne r0, r2; addeq r1, 8
  ^~~~
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/clzsi2.S:36:18: 
error: invalid instruction mnemonic 'movne'
  lsrs r2, r0, 8; movne r0, r2; addeq r1, 8
                  ^~~~~
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/clzsi2.S:36:32: 
error: invalid instruction mnemonic 'addeq'
  lsrs r2, r0, 8; movne r0, r2; addeq r1, 8
                                ^~~~~
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/clzsi2.S:37:2: 
error: invalid instruction mnemonic 'lsrs'
  lsrs r2, r0, 4; movne r0, r2; addeq r1, 4
  ^~~~
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/clzsi2.S:37:18: 
error: invalid instruction mnemonic 'movne'
  lsrs r2, r0, 4; movne r0, r2; addeq r1, 4
                  ^~~~~
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/clzsi2.S:37:32: 
error: invalid instruction mnemonic 'addeq'
  lsrs r2, r0, 4; movne r0, r2; addeq r1, 4
                                ^~~~~
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/clzsi2.S:38:2: 
error: invalid instruction mnemonic 'lsrs'
  lsrs r2, r0, 2; movne r0, r2; addeq r1, 2
  ^~~~
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/clzsi2.S:38:18: 
error: invalid instruction mnemonic 'movne'
  lsrs r2, r0, 2; movne r0, r2; addeq r1, 2
                  ^~~~~
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/clzsi2.S:38:32: 
error: invalid instruction mnemonic 'addeq'
  lsrs r2, r0, 2; movne r0, r2; addeq r1, 2
                                ^~~~~
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/clzsi2.S:40:2: 
error: unknown use of instruction mnemonic without a size suffix
  sub r0, r1, r0, lsr #1
  ^
[5/207] Building ASM object 
lib/builtins/CMakeFiles/clang_rt.builtins-armhf.dir/arm/clzdi2.S.o
FAILED: lib/builtins/CMakeFiles/clang_rt.builtins-armhf.dir/arm/clzdi2.S.o
/usr/local/myclang/bin/clang -DVISIBILITY_HIDDEN  -fno-lto -std=c11 
-fPIC -fno-builtin -fvisibility=hidden -fomit-frame-pointer 
-fomit-frame-pointer -DCOMPILER_RT_ARMHF_TARGET -MD -MT 
lib/builtins/CMakeFiles/clang_rt.builtins-armhf.dir/arm/clzdi2.S.o -MF 
lib/builtins/CMakeFiles/clang_rt.builtins-armhf.dir/arm/clzdi2.S.o.d -o 
lib/builtins/CMakeFiles/clang_rt.builtins-armhf.dir/arm/clzdi2.S.o -c 
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/clzdi2.S
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/clzdi2.S:16:2: 
error: unknown directive
  .syntax unified
  ^
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/clzdi2.S:50:2: 
error: unknown use of instruction mnemonic without a size suffix
  cmp r1, 0
  ^
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/clzdi2.S:51:2: 
error: invalid instruction mnemonic 'movne'
  movne r0, r1
  ^~~~~
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/clzdi2.S:53:2: 
error: invalid instruction mnemonic 'movne'
  movne r1, 1
  ^~~~~
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/clzdi2.S:54:2: 
error: invalid instruction mnemonic 'moveq'
  moveq r1, 33
  ^~~~~
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/clzdi2.S:56:2: 
error: invalid instruction mnemonic 'lsrs'
  lsrs r2, r0, 16; movne r0, r2; addeq r1, 16
  ^~~~
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/clzdi2.S:56:19: 
error: invalid instruction mnemonic 'movne'
  lsrs r2, r0, 16; movne r0, r2; addeq r1, 16
                   ^~~~~
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/clzdi2.S:56:33: 
error: invalid instruction mnemonic 'addeq'
  lsrs r2, r0, 16; movne r0, r2; addeq r1, 16
                                 ^~~~~
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/clzdi2.S:57:2: 
error: invalid instruction mnemonic 'lsrs'
  lsrs r2, r0, 8; movne r0, r2; addeq r1, 8
  ^~~~
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/clzdi2.S:57:18: 
error: invalid instruction mnemonic 'movne'
  lsrs r2, r0, 8; movne r0, r2; addeq r1, 8
                  ^~~~~
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/clzdi2.S:57:32: 
error: invalid instruction mnemonic 'addeq'
  lsrs r2, r0, 8; movne r0, r2; addeq r1, 8
                                ^~~~~
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/clzdi2.S:58:2: 
error: invalid instruction mnemonic 'lsrs'
  lsrs r2, r0, 4; movne r0, r2; addeq r1, 4
  ^~~~
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/clzdi2.S:58:18: 
error: invalid instruction mnemonic 'movne'
  lsrs r2, r0, 4; movne r0, r2; addeq r1, 4
                  ^~~~~
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/clzdi2.S:58:32: 
error: invalid instruction mnemonic 'addeq'
  lsrs r2, r0, 4; movne r0, r2; addeq r1, 4
                                ^~~~~
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/clzdi2.S:59:2: 
error: invalid instruction mnemonic 'lsrs'
  lsrs r2, r0, 2; movne r0, r2; addeq r1, 2
  ^~~~
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/clzdi2.S:59:18: 
error: invalid instruction mnemonic 'movne'
  lsrs r2, r0, 2; movne r0, r2; addeq r1, 2
                  ^~~~~
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/clzdi2.S:59:32: 
error: invalid instruction mnemonic 'addeq'
  lsrs r2, r0, 2; movne r0, r2; addeq r1, 2
                                ^~~~~
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/clzdi2.S:61:2: 
error: unknown use of instruction mnemonic without a size suffix
  sub r0, r1, r0, lsr #1
  ^
[6/207] Building ASM object 
lib/builtins/CMakeFiles/clang_rt.builtins-armhf.dir/arm/divmodsi4.S.o
FAILED: 
lib/builtins/CMakeFiles/clang_rt.builtins-armhf.dir/arm/divmodsi4.S.o
/usr/local/myclang/bin/clang -DVISIBILITY_HIDDEN  -fno-lto -std=c11 
-fPIC -fno-builtin -fvisibility=hidden -fomit-frame-pointer 
-fomit-frame-pointer -DCOMPILER_RT_ARMHF_TARGET -MD -MT 
lib/builtins/CMakeFiles/clang_rt.builtins-armhf.dir/arm/divmodsi4.S.o 
-MF 
lib/builtins/CMakeFiles/clang_rt.builtins-armhf.dir/arm/divmodsi4.S.o.d 
-o lib/builtins/CMakeFiles/clang_rt.builtins-armhf.dir/arm/divmodsi4.S.o 
-c /home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/divmodsi4.S
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/divmodsi4.S:24:2: 
error: unknown directive
  .syntax unified
  ^
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/divmodsi4.S:28:1: 
error: unexpected token at start of statement
@ int __divmodsi4(int divident, int divisor, int *remainder)
^
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/divmodsi4.S:29:1: 
error: unexpected token at start of statement
@ Calculate the quotient and remainder of the (signed) division. The return
^
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/divmodsi4.S:30:1: 
error: unexpected token at start of statement
@ value is the quotient, the remainder is placed in the variable.
^
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/divmodsi4.S:46:11: 
error: Invalid rounding mode.
     push {r4-r7, lr} ; add r7, sp, #12
           ^
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/divmodsi4.S:46:36: 
error: unknown token in expression
     push {r4-r7, lr} ; add r7, sp, #12
                                    ^
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/divmodsi4.S:49:5: 
error: invalid instruction mnemonic 'eor'
     eor r4, r0, r1
     ^~~
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/divmodsi4.S:50:5: 
error: unknown use of instruction mnemonic without a size suffix
     mov r5, r0
     ^
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/divmodsi4.S:51:5: 
error: unknown use of instruction mnemonic without a size suffix
     mov r6, r2
     ^
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/divmodsi4.S:53:5: 
error: invalid instruction mnemonic 'eor'
     eor ip, r0, r0, asr #31
     ^~~
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/divmodsi4.S:54:5: 
error: invalid instruction mnemonic 'eor'
     eor lr, r1, r1, asr #31
     ^~~
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/divmodsi4.S:55:5: 
error: unknown use of instruction mnemonic without a size suffix
     sub r0, ip, r0, asr #31
     ^
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/divmodsi4.S:56:5: 
error: unknown use of instruction mnemonic without a size suffix
     sub r1, lr, r1, asr #31
     ^
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/divmodsi4.S:58:5: 
error: invalid instruction mnemonic 'bl'
     bl __udivmodsi4
     ^~
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/divmodsi4.S:60:5: 
error: invalid instruction mnemonic 'ldr'
     ldr r1, [r6]
     ^~~
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/divmodsi4.S:61:5: 
error: invalid instruction mnemonic 'eor'
     eor r0, r0, r4, asr #31
     ^~~
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/divmodsi4.S:62:5: 
error: invalid instruction mnemonic 'eor'
     eor r1, r1, r5, asr #31
     ^~~
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/divmodsi4.S:63:5: 
error: unknown use of instruction mnemonic without a size suffix
     sub r0, r0, r4, asr #31
     ^
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/divmodsi4.S:64:5: 
error: unknown use of instruction mnemonic without a size suffix
     sub r1, r1, r5, asr #31
     ^
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/divmodsi4.S:65:5: 
error: unknown use of instruction mnemonic without a size suffix
     str r1, [r6]
     ^
/home/llvm_all/llvm/projects/compiler-rt/lib/builtins/arm/divmodsi4.S:66:10: 
error: Invalid rounding mode.
     pop {r4-r7, pc}










On 04.12.2018 15:54, Peter Smith via llvm-dev wrote:
> Hello,
>
> Just a few quick observations.
> - It looks like you may have downloaded the linux arm toolchain. For 
> bare metal you probably wanted the Arm embedded toolchain, 
> https://developer.arm.com/open-source/gnu-toolchain/gnu-rm
> -- That toolchain will have newlib rather than glibc, I don't know 
> whether it will have one pre-compiled for v4 though. If not you may 
> have to find an older toolchain or build newlib youtself.
> - The bare-metal driver in clang (arm-none-eabi) is not multilib aware 
> and won't put the paths to the libraries on the link line, the -L flag
> -- I have found that following the samples in the gnu embedded 
> toolchain with gcc using the -v flag to get the paths it is using, 
> then use these with lld.
>
> If you can let us know what problems you are seeing building 
> compiler-rt then we may be able to help. I'm not sure there is anyone 
> building it for arm v4 so you may be hitting new problems. I'm away at 
> a conference today and tomorrow but I can try later in the week.
>
> Peter
>
> On Tue, 4 Dec 2018 at 12:21, cscheuer via llvm-dev 
> <llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>> wrote:
>
>     I am currently trying to compile a pretty simple program to work
>     on an
>     experimental board. It contains an (FPGA-version of) an ARMv4
>     processor.
>     So basically, I try this (on my Ubuntu 18.04.1 LTS):
>     clang -v --target=arm-none-eabi -c barehello.c -o barehelloCLANG.o
>     clang -v --target=arm-none-eabi -c io.c -o io.o
>     clang -v --target=arm-none-eabi barehelloCLANG.o io.o -o
>     helloCLANGstatic -static -fuse-ld=lld
>
>     Which results in
>
>     clang version 8.0.0 (https://git.llvm.org/git/clang.git/
>     a152c7a4b7ba8f4cb9532ead9a38a7121db43d50)
>     (https://git.llvm.org/git/llvm.git/
>     1959ce6f3e01241919968ac1911fd45660239d23)
>     Target: arm-none-unknown-eabi
>     Thread model: posix
>     InstalledDir: /usr/local/my_clang/bin
>       "/usr/local/my_clang/bin/ld.lld" barehelloCLANG.o io.o -Bstatic
>     -L/usr/local/my_clang/lib/clang/8.0.0/lib/baremetal -lc -lm
>     -lclang_rt.builtins-arm.a -o helloCLANGstatic
>     ld.lld: error: unable to find library -lc
>     ld.lld: error: unable to find library -lm
>     ld.lld: error: unable to find library -lclang_rt.builtins-arm.a
>     clang-8: error: ld.lld command failed with exit code 1 (use -v to see
>     invocation)
>
>     on the linking part. I downloaded a sysroot from
>     https://developer.arm.com/open-source/gnu-toolchain/gnu-a/downloads/8-2-2018-08
>
>     and tried to include it via --sysroot=/my/path/to/it, but clang acted
>     unimpressed with the same errors. So I'm missing
>     clang_rt.builtins-arm.a
>     I guess, but that does not exist on my system.
>     So next, I tried basically every version of "how to cross-compile
>     llvm/clang/compiler-rt" That google came up with, but was not able to
>     get a single one to actually work. Any ideas how to get this running?
>     Thanks in advance!
>     _______________________________________________
>     LLVM Developers mailing list
>     llvm-dev at lists.llvm.org <mailto:llvm-dev at lists.llvm.org>
>     http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev
>
>
>
> _______________________________________________
> LLVM Developers mailing list
> llvm-dev at lists.llvm.org
> http://lists.llvm.org/cgi-bin/mailman/listinfo/llvm-dev

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20181207/a0b40011/attachment-0001.html>
-------------- next part --------------
A non-text attachment was scrubbed...
Name: christian_richter.vcf
Type: text/x-vcard
Size: 246 bytes
Desc: not available
URL: <http://lists.llvm.org/pipermail/llvm-dev/attachments/20181207/a0b40011/attachment-0001.vcf>


More information about the llvm-dev mailing list