Skip to content

Commit

Permalink
allow reexport on newer systems
Browse files Browse the repository at this point in the history
  • Loading branch information
MarcusCalhoun-Lopez authored and mascguy committed Apr 16, 2024
1 parent a1d860f commit 1d0f8c4
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -44,12 +44,10 @@ BUILDSYSLIBFLAGS = -dynamiclib -headerpad_max_install_names \
-install_name @executable_path/../$(BUILDSYSLIBPATH) \
-current_version $(SOCURVERSION) \
-compatibility_version $(SOCOMPATVERSION)
SYSREEXPORTFLAG = -Wl,-reexport_library /usr/lib/libSystem.B.dylib
SYSREEXPORTFLAG = -Wl,-reexport_library,/usr/lib/libSystem.B.dylib
BUILDSLIBFLAGS = -qs
POSTINSTALL = install_name_tool

MAX_DARWIN_REEXPORT ?= 19

FORCE_ARCH ?=
ARCHFLAGS ?=
LIPO ?= lipo
Expand Down Expand Up @@ -255,12 +253,9 @@ $(BUILDDLIBPATH): $(DLIBOBJS) $(MULTIDLIBOBJS)
$(MKINSTALLDIRS) $(BUILDDLIBDIR)
$(CC) $(BUILDDLIBFLAGS) $(LDFLAGS) $^ -o $@

# Wrapped libSystem relies on reexport which does not work on Darwin20+
$(BUILDSYSLIBPATH): $(DLIBOBJS) $(MULTIDLIBOBJS) $(ADDOBJS)
ifeq ($(shell test $(PLATFORM) -le $(MAX_DARWIN_REEXPORT); echo $$?),0)
$(MKINSTALLDIRS) $(BUILDDLIBDIR)
$(CC) $(BUILDSYSLIBFLAGS) $(LDFLAGS) $(SYSREEXPORTFLAG) $^ -o $@
endif

$(BUILDSLIBPATH): $(SLIBOBJS) $(MULTISLIBOBJS)
$(MKINSTALLDIRS) $(BUILDSLIBDIR)
Expand Down Expand Up @@ -325,11 +320,9 @@ install-dlib: $(BUILDDLIBPATH)
$(POSTINSTALL) -id $(DLIBPATH) $(DESTDIR)$(DLIBPATH)

install-syslib: $(BUILDSYSLIBPATH)
ifeq ($(shell test $(PLATFORM) -le $(MAX_DARWIN_REEXPORT); echo $$?),0)
$(MKINSTALLDIRS) $(DESTDIR)$(LIBDIR)
$(INSTALL_PROGRAM) $(BUILDSYSLIBPATH) $(DESTDIR)$(LIBDIR)
$(POSTINSTALL) -id $(SYSLIBPATH) $(DESTDIR)$(SYSLIBPATH)
endif

install-slib: $(BUILDSLIBPATH)
$(MKINSTALLDIRS) $(DESTDIR)$(LIBDIR)
Expand Down

0 comments on commit 1d0f8c4

Please sign in to comment.