Skip to content

Commit 121fdd2

Browse files
rodolphe-ccmuellner
authored andcommitted
fix: shared lib suffix LLVMgold macOS
1 parent 23d031e commit 121fdd2

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

Makefile.in

+6-2
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,10 @@ DEJAGNU_SRCDIR := @with_dejagnu_src@
2020

2121
SIM ?= @WITH_SIM@
2222

23+
# Shared lib suffix
24+
IS_DARWIN := $(shell uname -s | grep Darwin)
25+
SHARED_LIB_SUFFIX := $(if $(IS_DARWIN),dylib,so)
26+
2327
ifeq ($(srcdir)/gcc,$(GCC_SRCDIR))
2428
# We need a relative source dir for the gcc configure, to make msys2 mingw64
2529
# builds work. Mayberelsrcdir is relative if a relative path was used to run
@@ -1049,7 +1053,7 @@ stamps/build-llvm-linux: $(LLVM_SRCDIR) $(LLVM_SRC_GIT) $(BINUTILS_SRCDIR) $(BIN
10491053
$(MAKE) -C $(notdir $@)/openmp-static install; \
10501054
fi
10511055
cp $(notdir $@)/lib/riscv$(XLEN)-unknown-linux-gnu/libc++* $(SYSROOT)/lib
1052-
cp $(notdir $@)/lib/LLVMgold.so $(INSTALL_DIR)/lib
1056+
cp $(notdir $@)/lib/LLVMgold.$(SHARED_LIB_SUFFIX) $(INSTALL_DIR)/lib
10531057
cd $(INSTALL_DIR)/bin && ln -s -f clang $(LINUX_TUPLE)-clang && ln -s -f clang++ $(LINUX_TUPLE)-clang++
10541058
mkdir -p $(dir $@) && touch $@
10551059

@@ -1069,7 +1073,7 @@ stamps/build-llvm-newlib: $(LLVM_SRCDIR) $(LLVM_SRC_GIT) $(BINUTILS_SRCDIR) $(BI
10691073
-DLLVM_PARALLEL_LINK_JOBS=4
10701074
$(MAKE) -C $(notdir $@)
10711075
$(MAKE) -C $(notdir $@) install
1072-
cp $(notdir $@)/lib/LLVMgold.so $(INSTALL_DIR)/lib
1076+
cp $(notdir $@)/lib/LLVMgold.$(SHARED_LIB_SUFFIX) $(INSTALL_DIR)/lib
10731077
cd $(INSTALL_DIR)/bin && ln -s -f clang $(NEWLIB_TUPLE)-clang && \
10741078
ln -s -f clang++ $(NEWLIB_TUPLE)-clang++
10751079
mkdir -p $(dir $@) && touch $@

0 commit comments

Comments
 (0)