Skip to content

Commit 75cdffe

Browse files
authored
Install correct libgcc_s on darwin (#56965)
Fixes #48056 We could simplify the logic a lot if we assume that modern Julia is always built against GCC ≥ 12. Would that be a fair assumption.
1 parent b58dcc5 commit 75cdffe

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

deps/csl.mk

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -75,12 +75,24 @@ else
7575
$(eval $(call copy_csl,$(call versioned_libname,libgcc_s_seh,1)))
7676
endif
7777
else
78-
ifeq ($(APPLE_ARCH),arm64)
78+
ifeq ($(OS),Darwin)
79+
# On macOS, libgcc_s has soversion 1.1 always on aarch64 and only for GCC 12+
80+
# (-> libgfortran 5) on x86_64
81+
ifeq ($(ARCH),aarch64)
82+
$(eval $(call copy_csl,$(call versioned_libname,libgcc_s,1.1)))
83+
else
84+
ifeq ($(LIBGFORTRAN_VERSION),5)
7985
$(eval $(call copy_csl,$(call versioned_libname,libgcc_s,1.1)))
8086
else
8187
$(eval $(call copy_csl,$(call versioned_libname,libgcc_s,1)))
8288
endif
8389
endif
90+
else
91+
# Other targets just use libgcc_s.1
92+
$(eval $(call copy_csl,$(call versioned_libname,libgcc_s,1)))
93+
endif
94+
endif
95+
8496
# winpthread is only Windows, pthread is only others
8597
ifeq ($(OS),WINNT)
8698
$(eval $(call copy_csl,$(call versioned_libname,libwinpthread,1)))

0 commit comments

Comments
 (0)