Skip to content

Commit

Permalink
[Makefile] Fix codesign of libjulia when installing it on macOS
Browse files Browse the repository at this point in the history
  • Loading branch information
giordano committed Mar 8, 2022
1 parent f731c38 commit 54568ee
Showing 1 changed file with 9 additions and 1 deletion.
10 changes: 9 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -374,14 +374,22 @@ endif
ifneq ($(LOADER_BUILD_DEP_LIBS),$(LOADER_INSTALL_DEP_LIBS))
# Next, overwrite relative path to libjulia-internal in our loader if $$(LOADER_BUILD_DEP_LIBS) != $$(LOADER_INSTALL_DEP_LIBS)
$(call stringreplace,$(DESTDIR)$(shlibdir)/libjulia.$(JL_MAJOR_MINOR_SHLIB_EXT),$(LOADER_BUILD_DEP_LIBS)$$,$(LOADER_INSTALL_DEP_LIBS))
ifeq ($(OS), Darwin)
# Fix codesign of the libjulia we just modified
$(call spawn,$(build_bindir)/julia$(EXE) --startup-file=no -e 'using Pkg; Pkg.activate(;temp=true); Pkg.add("ldid_jll"); using ldid_jll; run(`$$(ldid()) -S -d $(DESTDIR)$(shlibdir)/libjulia.$(JL_MAJOR_MINOR_SHLIB_EXT)`)')
endif

ifeq ($(BUNDLE_DEBUG_LIBS),1)
$(call stringreplace,$(DESTDIR)$(shlibdir)/libjulia-debug.$(JL_MAJOR_MINOR_SHLIB_EXT),$(LOADER_DEBUG_BUILD_DEP_LIBS)$$,$(LOADER_DEBUG_INSTALL_DEP_LIBS))
ifeq ($(OS), Darwin)
# Fix codesign of the libjulia we just modified
$(call spawn,$(build_bindir)/julia$(EXE) --startup-file=no -e 'using Pkg; Pkg.activate(;temp=true); Pkg.add("ldid_jll"); using ldid_jll; run(`$$(ldid()) -S -d $(DESTDIR)$(shlibdir)/libjulia-debug.$(JL_MAJOR_MINOR_SHLIB_EXT)`)')
endif
endif
endif

# On FreeBSD, remove the build's libdir from each library's RPATH
ifeq ($(OS),FreeBSD)
# On FreeBSD, remove the build's libdir from each library's RPATH
$(JULIAHOME)/contrib/fixup-rpath.sh "$(PATCHELF)" $(DESTDIR)$(libdir) $(build_libdir)
$(JULIAHOME)/contrib/fixup-rpath.sh "$(PATCHELF)" $(DESTDIR)$(private_libdir) $(build_libdir)
$(JULIAHOME)/contrib/fixup-rpath.sh "$(PATCHELF)" $(DESTDIR)$(bindir) $(build_libdir)
Expand Down

0 comments on commit 54568ee

Please sign in to comment.