Add -headerpad_max_install_names option to linker calls and make run path configuration consistent.

This avoids failures when running install_name_tool on Mac when creating relocatable binaries using the bundled private frameworks.
This commit is contained in:
Stephan Witt 2018-09-21 21:46:47 +02:00
parent 092236ab57
commit d9c0807227
5 changed files with 15 additions and 5 deletions

View File

@ -48,7 +48,8 @@ endif
if INSTALL_MACOSX if INSTALL_MACOSX
lyx_LDFLAGS = -framework AppKit -framework ApplicationServices \ lyx_LDFLAGS = -framework AppKit -framework ApplicationServices \
-Wl,-rpath,@loader_path/../Frameworks \ -Wl,-rpath,@loader_path/../Frameworks \
-Wl,-rpath,@executable_path/../Frameworks -Wl,-rpath,@executable_path/../Frameworks \
-Wl,-headerpad_max_install_names
endif endif
if INSTALL_MACOSX if INSTALL_MACOSX

View File

@ -17,7 +17,10 @@ lyxclient_LDADD = \
$(QT_LIB) $(QT_LDFLAGS) $(LIBSHLWAPI) $(LIBPSAPI) $(QT_LIB) $(QT_LDFLAGS) $(LIBSHLWAPI) $(LIBPSAPI)
if INSTALL_MACOSX if INSTALL_MACOSX
lyxclient_LDFLAGS = -framework AppKit lyxclient_LDFLAGS = -framework AppKit \
-Wl,-rpath,@loader_path/../Frameworks \
-Wl,-rpath,@executable_path/../Frameworks \
-Wl,-headerpad_max_install_names
endif endif
SOURCEFILES = \ SOURCEFILES = \

View File

@ -23,7 +23,8 @@ lyxconvert_LDADD = \
lyxconvert_LDFLAGS = -framework AppKit \ lyxconvert_LDFLAGS = -framework AppKit \
-Wl,-rpath,@loader_path/../Frameworks \ -Wl,-rpath,@loader_path/../Frameworks \
-Wl,-rpath,@executable_path/../Frameworks -Wl,-rpath,@executable_path/../Frameworks \
-Wl,-headerpad_max_install_names
else else

View File

@ -164,7 +164,11 @@ check_PROGRAMS = \
check_trivstring check_trivstring
if INSTALL_MACOSX if INSTALL_MACOSX
ADD_FRAMEWORKS = -framework QtCore -framework AppKit -framework ApplicationServices ADD_FRAMEWORKS = \
-framework QtCore -framework AppKit -framework ApplicationServices \
-Wl,-rpath,@loader_path/../Frameworks \
-Wl,-rpath,@executable_path/../Frameworks \
-Wl,-headerpad_max_install_names
endif endif
check_convert_LDADD = liblyxsupport.a $(LIBICONV) $(BOOST_LIBS) $(QT_CORE_LIBS) $(LIBSHLWAPI) @LIBS@ check_convert_LDADD = liblyxsupport.a $(LIBICONV) $(BOOST_LIBS) $(QT_CORE_LIBS) $(LIBSHLWAPI) @LIBS@

View File

@ -135,7 +135,8 @@ tex2lyx_LDADD = \
if INSTALL_MACOSX if INSTALL_MACOSX
tex2lyx_LDFLAGS = -framework AppKit \ tex2lyx_LDFLAGS = -framework AppKit \
-Wl,-rpath,@loader_path/../Frameworks \ -Wl,-rpath,@loader_path/../Frameworks \
-Wl,-rpath,@executable_path/../Frameworks -Wl,-rpath,@executable_path/../Frameworks \
-Wl,-headerpad_max_install_names
endif endif
.PHONY: alltests alltests-recursive updatetests .PHONY: alltests alltests-recursive updatetests