fix static compilation on macOS

This commit is contained in:
Michele Guerini Rocco 2023-11-25 18:11:52 +01:00
parent d8ffd97739
commit 02ade0e2d0
Signed by: rnhmjoj
GPG Key ID: BFBAF4C975F76450
2 changed files with 6 additions and 1 deletions

View File

@ -81,7 +81,9 @@ endif
ifdef STATIC
LIBGRAY := $(LIBGRAY:so=a)
LIBRARIES := $(LIBRARIES:so=a)
ifndef SEMISTATIC
LDFLAGS += -static
endif
else
LDFLAGS += -Wl,-rpath '$$ORIGIN/../lib/'
endif

5
configure vendored
View File

@ -55,7 +55,10 @@ done
printf 'Running on '
case $(uname -s) in
Linux*) echo 'Linux' ;;
Darwin*) echo 'Mac' ;;
Darwin*)
echo 'macOS'
# static libc is not available on macOS
printf 'SEMISTATIC=1\n' >> configure.mk ;;
CYGWIN*|MSYS*|MINGW*) echo 'Windows' ;;
*) echo 'unknown OS' ;;
esac