From 5c5a6c3668c2112ce419f6b559105e915d9bd29d Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Caol=C3=A1n=20McNamara?= Date: Thu, 15 Dec 2016 11:39:06 +0000 Subject: [PATCH] bootstrap building with --disable-dynloading on standard linux MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Change-Id: I5baf70f0053612cba8b74f54aff11ce25cdeb95a Reviewed-on: https://gerrit.libreoffice.org/32202 Reviewed-by: Caolán McNamara Tested-by: Caolán McNamara --- codemaker/Executable_cppumaker.mk | 6 ++++-- codemaker/Executable_javamaker.mk | 6 ++++-- idlc/Executable_idlc.mk | 1 + registry/Executable_regmerge.mk | 4 +++- registry/Executable_regview.mk | 4 +++- rsc/Executable_rsc.mk | 5 +++-- sal/Module_sal.mk | 2 +- solenv/gbuild/platform/linux.mk | 4 ++++ solenv/gbuild/platform/unxgcc.mk | 3 ++- unoidl/Executable_unoidl-check.mk | 6 ++++-- unoidl/Executable_unoidl-read.mk | 6 ++++-- unoidl/Executable_unoidl-write.mk | 6 ++++-- 12 files changed, 37 insertions(+), 16 deletions(-) diff --git a/codemaker/Executable_cppumaker.mk b/codemaker/Executable_cppumaker.mk index 26347a07976a..e392339d3729 100644 --- a/codemaker/Executable_cppumaker.mk +++ b/codemaker/Executable_cppumaker.mk @@ -12,9 +12,11 @@ $(eval $(call gb_Executable_Executable,cppumaker)) $(eval $(call gb_Executable_use_external,cppumaker,boost_headers)) $(eval $(call gb_Executable_use_libraries,cppumaker,\ - sal \ - salhelper \ unoidl \ + $(if $(filter TRUE,$(DISABLE_DYNLOADING)),reg) \ + $(if $(filter TRUE,$(DISABLE_DYNLOADING)),store) \ + salhelper \ + sal \ )) $(eval $(call gb_Executable_use_static_libraries,cppumaker,\ diff --git a/codemaker/Executable_javamaker.mk b/codemaker/Executable_javamaker.mk index aafb198b5b02..febfe9a71c29 100644 --- a/codemaker/Executable_javamaker.mk +++ b/codemaker/Executable_javamaker.mk @@ -12,9 +12,11 @@ $(eval $(call gb_Executable_Executable,javamaker)) $(eval $(call gb_Executable_use_external,javamaker,boost_headers)) $(eval $(call gb_Executable_use_libraries,javamaker,\ - sal \ - salhelper \ unoidl \ + $(if $(filter TRUE,$(DISABLE_DYNLOADING)),reg) \ + $(if $(filter TRUE,$(DISABLE_DYNLOADING)),store) \ + salhelper \ + sal \ )) $(eval $(call gb_Executable_use_static_libraries,javamaker,\ diff --git a/idlc/Executable_idlc.mk b/idlc/Executable_idlc.mk index 1ddc72a470b9..d5d1af3f9d13 100644 --- a/idlc/Executable_idlc.mk +++ b/idlc/Executable_idlc.mk @@ -21,6 +21,7 @@ $(eval $(call gb_Executable_use_externals,idlc,\ $(eval $(call gb_Executable_use_libraries,idlc,\ reg \ + $(if $(filter TRUE,$(DISABLE_DYNLOADING)),store) \ sal \ salhelper \ )) diff --git a/registry/Executable_regmerge.mk b/registry/Executable_regmerge.mk index 94a8e974ff79..98176282b60e 100644 --- a/registry/Executable_regmerge.mk +++ b/registry/Executable_regmerge.mk @@ -10,8 +10,10 @@ $(eval $(call gb_Executable_Executable,regmerge)) $(eval $(call gb_Executable_use_libraries,regmerge,\ - sal \ reg \ + $(if $(filter TRUE,$(DISABLE_DYNLOADING)),store) \ + $(if $(filter TRUE,$(DISABLE_DYNLOADING)),salhelper) \ + sal \ )) $(eval $(call gb_Executable_use_static_libraries,regmerge,\ diff --git a/registry/Executable_regview.mk b/registry/Executable_regview.mk index 62b46acfc975..ef9fda099b06 100644 --- a/registry/Executable_regview.mk +++ b/registry/Executable_regview.mk @@ -15,8 +15,10 @@ $(eval $(call gb_Executable_set_include,regview, \ )) $(eval $(call gb_Executable_use_libraries,regview,\ - sal \ reg \ + $(if $(filter TRUE,$(DISABLE_DYNLOADING)),store) \ + $(if $(filter TRUE,$(DISABLE_DYNLOADING)),salhelper) \ + sal \ )) $(eval $(call gb_Executable_use_static_libraries,regview,\ diff --git a/rsc/Executable_rsc.mk b/rsc/Executable_rsc.mk index ed779e60b845..2f77a89df653 100644 --- a/rsc/Executable_rsc.mk +++ b/rsc/Executable_rsc.mk @@ -23,10 +23,11 @@ $(eval $(call gb_Executable_add_defs,rsc,\ )) $(eval $(call gb_Executable_use_libraries,rsc,\ - i18nlangtag \ comphelper \ - sal \ + $(if $(filter TRUE,$(DISABLE_DYNLOADING)),cppu) \ + i18nlangtag \ tl \ + sal \ $(gb_UWINAPI) \ )) diff --git a/sal/Module_sal.mk b/sal/Module_sal.mk index 668ee209bc87..6f8cbc05a191 100644 --- a/sal/Module_sal.mk +++ b/sal/Module_sal.mk @@ -10,7 +10,7 @@ $(eval $(call gb_Module_Module,sal)) $(eval $(call gb_Module_add_targets,sal,\ - $(if $(CROSS_COMPILING),,Executable_cppunittester) \ + $(if $(CROSS_COMPILING),,$(if $(filter TRUE,$(DISABLE_DYNLOADING)),,Executable_cppunittester)) \ $(if $(filter $(OS),ANDROID), \ Library_lo-bootstrap) \ Library_sal \ diff --git a/solenv/gbuild/platform/linux.mk b/solenv/gbuild/platform/linux.mk index f0276feab97d..727418b8ea61 100644 --- a/solenv/gbuild/platform/linux.mk +++ b/solenv/gbuild/platform/linux.mk @@ -17,4 +17,8 @@ gb_LinkTarget_LDFLAGS += $(gb__LinkTarget_LDFLAGS_zdefs) include $(GBUILDDIR)/platform/unxgcc.mk +ifeq ($(DISABLE_DYNLOADING),TRUE) +gb_STDLIBS := -lpthread -ldl +endif + # vim: set noet sw=4 ts=4: diff --git a/solenv/gbuild/platform/unxgcc.mk b/solenv/gbuild/platform/unxgcc.mk index 858b4525e7a9..b3ec5f54fa22 100644 --- a/solenv/gbuild/platform/unxgcc.mk +++ b/solenv/gbuild/platform/unxgcc.mk @@ -167,7 +167,8 @@ endef define gb_LinkTarget__command $(call gb_Output_announce,$(2),$(true),LNK,4) -$(if $(filter Library CppunitTest Executable,$(TARGETTYPE)),$(call gb_LinkTarget__command_dynamiclink,$(1),$(2))) +$(if $(filter CppunitTest Executable,$(TARGETTYPE)),$(call gb_LinkTarget__command_dynamiclink,$(1),$(2))) +$(if $(filter Library,$(TARGETTYPE)),$(if $(filter TRUE,$(DISABLE_DYNLOADING)),$(call gb_LinkTarget__command_staticlink,$(1)),$(call gb_LinkTarget__command_dynamiclink,$(1),$(2)))) $(if $(filter StaticLibrary,$(TARGETTYPE)),$(call gb_LinkTarget__command_staticlink,$(1))) endef diff --git a/unoidl/Executable_unoidl-check.mk b/unoidl/Executable_unoidl-check.mk index 562fba9b8828..36dfc44de635 100644 --- a/unoidl/Executable_unoidl-check.mk +++ b/unoidl/Executable_unoidl-check.mk @@ -14,9 +14,11 @@ $(eval $(call gb_Executable_add_exception_objects,unoidl-check, \ )) $(eval $(call gb_Executable_use_libraries,unoidl-check, \ - sal \ - salhelper \ unoidl \ + $(if $(filter TRUE,$(DISABLE_DYNLOADING)),reg) \ + $(if $(filter TRUE,$(DISABLE_DYNLOADING)),store) \ + salhelper \ + sal \ )) # vim: set noet sw=4 ts=4: diff --git a/unoidl/Executable_unoidl-read.mk b/unoidl/Executable_unoidl-read.mk index af9c5fd36dbb..b134c30b1a72 100644 --- a/unoidl/Executable_unoidl-read.mk +++ b/unoidl/Executable_unoidl-read.mk @@ -14,9 +14,11 @@ $(eval $(call gb_Executable_add_exception_objects,unoidl-read, \ )) $(eval $(call gb_Executable_use_libraries,unoidl-read, \ - sal \ - salhelper \ unoidl \ + $(if $(filter TRUE,$(DISABLE_DYNLOADING)),reg) \ + $(if $(filter TRUE,$(DISABLE_DYNLOADING)),store) \ + salhelper \ + sal \ )) # vim: set noet sw=4 ts=4: diff --git a/unoidl/Executable_unoidl-write.mk b/unoidl/Executable_unoidl-write.mk index 8936955afb27..9accb31ac14d 100644 --- a/unoidl/Executable_unoidl-write.mk +++ b/unoidl/Executable_unoidl-write.mk @@ -14,9 +14,11 @@ $(eval $(call gb_Executable_add_exception_objects,unoidl-write, \ )) $(eval $(call gb_Executable_use_libraries,unoidl-write, \ - sal \ - salhelper \ unoidl \ + $(if $(filter TRUE,$(DISABLE_DYNLOADING)),reg) \ + $(if $(filter TRUE,$(DISABLE_DYNLOADING)),store) \ + salhelper \ + sal \ )) # vim: set noet sw=4 ts=4: