Skip to content

Commit

Permalink
Symlink libgcc_s on Linux when USE_SYSTEM_CSL=1
Browse files Browse the repository at this point in the history
This adds `libgcc_s` as one of the libraries that gets symlinked when
`USE_SYSTEM_CSL=1`, which is necessary since we load it from our
`DEP_LIBS` RPATH-substitution list.
  • Loading branch information
staticfloat committed Jan 19, 2023
1 parent c384e86 commit f7176c0
Showing 1 changed file with 7 additions and 2 deletions.
9 changes: 7 additions & 2 deletions base/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -215,8 +215,8 @@ else ifneq ($(USE_SYSTEM_OPENLIBM),0)
$(eval $(call symlink_system_library,OPENLIBM,$(LIBMNAME)))
endif

# On macOS, libgcc_s has soversion 1.1 always on aarch64 and only for GCC 12+
# (-> libgfortran 5) on x86_64
# On macOS, libgcc_s has soversion 1.1 always on aarch64,
# but only for GCC 12+ (e.g. libgfortran 5) on x86_64
ifeq ($(OS),Darwin)
ifeq ($(ARCH),aarch64)
$(eval $(call symlink_system_library,CSL,libgcc_s,1.1))
Expand All @@ -227,7 +227,12 @@ else
$(eval $(call symlink_system_library,CSL,libgcc_s,1))
endif
endif

# Linux always has soversion 1
else ifeq($(OS),Linux)
$(eval $(call symlink_system_library,CSL,libgcc_s,1))
endif

ifneq (,$(LIBGFORTRAN_VERSION))
$(eval $(call symlink_system_library,CSL,libgfortran,$(LIBGFORTRAN_VERSION)))
endif
Expand Down

0 comments on commit f7176c0

Please sign in to comment.