Skip to content

Commit 2541b78

Browse files
committed
Remove paths to sysroot & crt0 from config files
These are not necessary since the multilib system will find the correct paths automatically. This necessitates switching from using crt0.o and crt0-semihost.o to instead using libcrt0.a and libcrt0-semihost.a. This is because .o files cannot be found in the linker search directories, whereas .a files can.
1 parent 939b05c commit 2541b78

File tree

2 files changed

+3
-4
lines changed

2 files changed

+3
-4
lines changed

CMakeLists.txt

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -711,10 +711,10 @@ endfunction()
711711
function(make_config_cfg directory variant flags)
712712
# Create clang configuration files
713713
# https://clang.llvm.org/docs/UsersManual.html#configuration-files
714-
set(crt0 "crt0.o")
714+
set(crt0 "-lcrt0")
715715
set(extra_args "")
716716
configure_file(${CMAKE_CURRENT_FUNCTION_LIST_DIR}/cmake/config.cfg.in ${LLVM_BINARY_DIR}/bin/${variant}.cfg)
717-
set(crt0 "crt0-semihost.o")
717+
set(crt0 "-lcrt0-semihost")
718718
set(extra_args "\n-lsemihost")
719719
configure_file(${CMAKE_CURRENT_FUNCTION_LIST_DIR}/cmake/config.cfg.in ${LLVM_BINARY_DIR}/bin/${variant}_semihost.cfg)
720720
install(FILES

cmake/config.cfg.in

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,4 @@
11
${flags}
22
-fno-exceptions
33
-fno-rtti
4-
--sysroot <CFGDIR>/../${directory}
5-
<CFGDIR>/../${directory}/lib/${crt0}${extra_args}
4+
${crt0}${extra_args}

0 commit comments

Comments
 (0)