[PATCH] D98452: [compiler-rt] Produce the right arch suffix for arm libraries
    Manoj Gupta via Phabricator via llvm-commits 
    llvm-commits at lists.llvm.org
       
    Fri Nov  5 21:00:27 PDT 2021
    
    
  
manojgupta added a comment.
Sorry for replying since this patch has been there for a while. But this has broken the installs for the baremetal targets eg armv7m-none-eabi.
Clang expects builtins at a different location:
$ clang -target armv7m-none-eabi -print-libgcc-file-name -rtlib=compiler-rt
/usr/lib64/clang/13.0.0/lib/baremetal/libclang_rt.builtins-armv7m.a. <this is the expected location>
Previous location before the patch was correct:
/usr/lib64/clang/13.0.0/lib/baremetal/libclang_rt.builtins-armv7m.a
New location after this patch:
/usr/lib64/clang/13.0.0/lib/baremetal/libclang_rt.builtins-arm.a
See that we have lost the architecture differentiability.  We can no longer have armv6m and armv7m installed in same location. This also does not match the "-print-libgcc-file-name" location.
Setting LLVM_ENABLE_PER_TARGET_RUNTIME_DIR does not help either. It changes installation location to /usr/lib64/clang/14.0.0/lib/armv7m-cros-eabi/libclang_rt.builtins.a which is better for installing multiple ABIS but "-print-libgcc-file-name" does not detect it, it still prints /usr/lib64/clang/13.0.0/lib/baremetal/libclang_rt.builtins-armv7m.a. .
Repository:
  rG LLVM Github Monorepo
CHANGES SINCE LAST ACTION
  https://reviews.llvm.org/D98452/new/
https://reviews.llvm.org/D98452
    
    
More information about the llvm-commits
mailing list