Skip to content

main/compiler-rt: Fix compiler-rt install location

Eric Molitor requested to merge emolitor/aports:fix-compiler-rt-location into master

Alpine currently installs compiler-rt into the following location.
[DESTDIR]/lib/clang/[CLANG_VERSION]

However, Clang expects compiler-rt to be located at a specific location.
[DESTDIR]/lib/clang/[CLANG_VERSION]/lib/[OS]

This results in clang on Alpine not being able to use compiler-rt.

  clang -rtlib=compiler-rt hello.c
  /usr/bin/ld: cannot find crtbeginS.o: No such file or directory
  /usr/bin/ld: cannot find /usr/lib/clang/9.0.0/lib/linux/libclang_rt.builtins-x86_64.a: No such file or directory
  /usr/bin/ld: cannot find /usr/lib/clang/9.0.0/lib/linux/libclang_rt.builtins-x86_64.a: No such file or directory
  /usr/bin/ld: cannot find crtendS.o: No such file or directory

This change corrects the install location and allows clang to use compiler-rt as a runtime library via -rtlib=compiler-rt.

Edited by Eric Molitor

Merge request reports