mirror of
https://github.com/mirror/tinycc.git
synced 2025-01-13 05:10:07 +08:00
Fix macOS .dylib build when VERSION contains letters.
macOS builds with --disable-static fail to link if the version number contains letters because of the -current_version and -compatibility_version arguments (current version is 0.9.28rc). This commit adds a new MACOS_DYLIB_VERSION variable to config.mak for builds that target macOS. It has no impact on other targets.
This commit is contained in:
parent
f44060f8fc
commit
6b967b1285
4
Makefile
4
Makefile
@ -55,8 +55,8 @@ else
|
||||
# `make test' when libtcc.dylib is used (configure --disable-static), so
|
||||
# we bake a relative path into the binary. $libdir is used after install.
|
||||
LINK_LIBTCC += -Wl,-rpath,"@executable_path/$(TOP)" -Wl,-rpath,"$(libdir)"
|
||||
DYLIBVER += -current_version $(VERSION)
|
||||
DYLIBVER += -compatibility_version $(VERSION)
|
||||
DYLIBVER += -current_version $(MACOS_DYLIB_VERSION)
|
||||
DYLIBVER += -compatibility_version $(MACOS_DYLIB_VERSION)
|
||||
endif
|
||||
endif
|
||||
endif
|
||||
|
6
configure
vendored
6
configure
vendored
@ -602,6 +602,12 @@ echo "VERSION = $version" >> config.mak
|
||||
echo "#define TCC_VERSION \"$version\"" >> $TMPH
|
||||
echo "@set VERSION $version" > config.texi
|
||||
|
||||
if test "$targetos" = "Darwin"; then
|
||||
# On macOS, -current_version and -compatibility_version must not contain letters.
|
||||
macos_dylib_version=`echo $version | sed 's/[^0-9.]//g'`
|
||||
echo "MACOS_DYLIB_VERSION = $macos_dylib_version" >> config.mak
|
||||
fi
|
||||
|
||||
if test "$source_path_used" = "yes" ; then
|
||||
case $source_path in
|
||||
/*) echo "TOPSRC=$source_path";;
|
||||
|
Loading…
Reference in New Issue
Block a user