From d9c0807227a9bdff2d28a80181d0e7ec5532ba1e Mon Sep 17 00:00:00 2001 From: Stephan Witt Date: Fri, 21 Sep 2018 21:46:47 +0200 Subject: [PATCH] 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. --- src/Makefile.am | 3 ++- src/client/Makefile.am | 5 ++++- src/convert/Makefile.am | 3 ++- src/support/Makefile.am | 6 +++++- src/tex2lyx/Makefile.am | 3 ++- 5 files changed, 15 insertions(+), 5 deletions(-) diff --git a/src/Makefile.am b/src/Makefile.am index e338f9951c..d924a5eb02 100644 --- a/src/Makefile.am +++ b/src/Makefile.am @@ -48,7 +48,8 @@ endif if INSTALL_MACOSX lyx_LDFLAGS = -framework AppKit -framework ApplicationServices \ -Wl,-rpath,@loader_path/../Frameworks \ - -Wl,-rpath,@executable_path/../Frameworks + -Wl,-rpath,@executable_path/../Frameworks \ + -Wl,-headerpad_max_install_names endif if INSTALL_MACOSX diff --git a/src/client/Makefile.am b/src/client/Makefile.am index b6b132e93f..c72d51aefb 100644 --- a/src/client/Makefile.am +++ b/src/client/Makefile.am @@ -17,7 +17,10 @@ lyxclient_LDADD = \ $(QT_LIB) $(QT_LDFLAGS) $(LIBSHLWAPI) $(LIBPSAPI) 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 SOURCEFILES = \ diff --git a/src/convert/Makefile.am b/src/convert/Makefile.am index 2457145798..9b6bd7e2ae 100644 --- a/src/convert/Makefile.am +++ b/src/convert/Makefile.am @@ -23,7 +23,8 @@ lyxconvert_LDADD = \ lyxconvert_LDFLAGS = -framework AppKit \ -Wl,-rpath,@loader_path/../Frameworks \ - -Wl,-rpath,@executable_path/../Frameworks + -Wl,-rpath,@executable_path/../Frameworks \ + -Wl,-headerpad_max_install_names else diff --git a/src/support/Makefile.am b/src/support/Makefile.am index 3a4576c4c9..70bbee266e 100644 --- a/src/support/Makefile.am +++ b/src/support/Makefile.am @@ -164,7 +164,11 @@ check_PROGRAMS = \ check_trivstring 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 check_convert_LDADD = liblyxsupport.a $(LIBICONV) $(BOOST_LIBS) $(QT_CORE_LIBS) $(LIBSHLWAPI) @LIBS@ diff --git a/src/tex2lyx/Makefile.am b/src/tex2lyx/Makefile.am index da7c3183a4..15817d728a 100644 --- a/src/tex2lyx/Makefile.am +++ b/src/tex2lyx/Makefile.am @@ -135,7 +135,8 @@ tex2lyx_LDADD = \ if INSTALL_MACOSX tex2lyx_LDFLAGS = -framework AppKit \ -Wl,-rpath,@loader_path/../Frameworks \ - -Wl,-rpath,@executable_path/../Frameworks + -Wl,-rpath,@executable_path/../Frameworks \ + -Wl,-headerpad_max_install_names endif .PHONY: alltests alltests-recursive updatetests -- 2.39.5