[PATCH] append library specific compile flags at the end

Matúš Kukan (via_Code_Review) gerrit at gerrit.libreoffice.org
Thu Jan 10 11:44:49 PST 2013


Hi,

I have submitted a patch for review:

    https://gerrit.libreoffice.org/1632

To pull it, you can do:

    git pull ssh://gerrit.libreoffice.org:29418/core refs/changes/32/1632/1

append library specific compile flags at the end

Change-Id: If9d4640b59dd411734a581c66f9310d31ab9fbb7
---
M solenv/gbuild/LinkTarget.mk
M solenv/gbuild/platform/com_GCC_class.mk
M solenv/gbuild/platform/com_MSC_class.mk
3 files changed, 16 insertions(+), 16 deletions(-)



diff --git a/solenv/gbuild/LinkTarget.mk b/solenv/gbuild/LinkTarget.mk
index 2fb94f0..38cece0 100644
--- a/solenv/gbuild/LinkTarget.mk
+++ b/solenv/gbuild/LinkTarget.mk
@@ -632,9 +632,9 @@
 endef
 
 define gb_LinkTarget_add_cflags
-$(call gb_LinkTarget_get_target,$(1)) : T_CFLAGS += $(2)
+$(call gb_LinkTarget_get_target,$(1)) : T_CFLAGS_APPEND += $(2)
 ifeq ($(gb_FULLDEPS),$(true))
-$(call gb_LinkTarget_get_dep_target,$(1)) : T_CFLAGS += $(2)
+$(call gb_LinkTarget_get_dep_target,$(1)) : T_CFLAGS_APPEND += $(2)
 endif
 
 endef
@@ -648,11 +648,11 @@
 
 define gb_LinkTarget_add_cxxflags
 $(call gb_LinkTarget_get_headers_target,$(1)) \
-$(call gb_LinkTarget_get_target,$(1)) : T_CXXFLAGS += $(2)
+$(call gb_LinkTarget_get_target,$(1)) : T_CXXFLAGS_APPEND += $(2)
 $(call gb_LinkTarget_get_headers_target,$(1)) \
 $(call gb_LinkTarget_get_target,$(1)) : PCH_CXXFLAGS += $(2)
 ifeq ($(gb_FULLDEPS),$(true))
-$(call gb_LinkTarget_get_dep_target,$(1)) : T_CXXFLAGS += $(2)
+$(call gb_LinkTarget_get_dep_target,$(1)) : T_CXXFLAGS_APPEND += $(2)
 $(call gb_LinkTarget_get_dep_target,$(1)) : PCH_CXXFLAGS += $(2)
 endif
 endef
@@ -664,9 +664,9 @@
 endef
 
 define gb_LinkTarget_add_objcxxflags
-$(call gb_LinkTarget_get_target,$(1)) : T_OBJCXXFLAGS += $(2)
+$(call gb_LinkTarget_get_target,$(1)) : T_OBJCXXFLAGS_APPEND += $(2)
 ifeq ($(gb_FULLDEPS),$(true))
-$(call gb_LinkTarget_get_dep_target,$(1)) : T_OBJCXXFLAGS += $(2)
+$(call gb_LinkTarget_get_dep_target,$(1)) : T_OBJCXXFLAGS_APPEND += $(2)
 endif
 endef
 
@@ -683,9 +683,9 @@
 endef
 
 define gb_LinkTarget_add_objcflags
-$(call gb_LinkTarget_get_target,$(1)) : T_OBJCFLAGS += $(2)
+$(call gb_LinkTarget_get_target,$(1)) : T_OBJCFLAGS_APPEND += $(2)
 ifeq ($(gb_FULLDEPS),$(true))
-$(call gb_LinkTarget_get_dep_target,$(1)) : T_OBJCFLAGS += $(2)
+$(call gb_LinkTarget_get_dep_target,$(1)) : T_OBJCFLAGS_APPEND += $(2)
 endif
 
 endef
diff --git a/solenv/gbuild/platform/com_GCC_class.mk b/solenv/gbuild/platform/com_GCC_class.mk
index 350e000..4ea1a14 100644
--- a/solenv/gbuild/platform/com_GCC_class.mk
+++ b/solenv/gbuild/platform/com_GCC_class.mk
@@ -65,7 +65,7 @@
 		$(if $(VISIBILITY),,$(gb_VISIBILITY_FLAGS)) \
 		$(if $(WARNINGS_NOT_ERRORS),,$(gb_CFLAGS_WERROR)) \
 		$(if $(COMPILER_PLUGINS),$(gb_COMPILER_PLUGINS)) \
-		$(T_CFLAGS) \
+		$(T_CFLAGS) $(T_CFLAGS_APPEND) \
 		-c $(3) \
 		-o $(1) \
 		$(call gb_cxx_dep_generation_options,$(1),$(4)) \
@@ -83,7 +83,7 @@
         ICECC=no CCACHE_DISABLE=1 \
 	$(gb_CC) \
 		$(DEFS) \
-		$(T_CFLAGS) \
+		$(T_CFLAGS) $(T_CFLAGS_APPEND) \
 		-c $(2) \
 		-I$(dir $(2)) \
 		$(INCLUDE) \
@@ -105,7 +105,7 @@
 		$(if $(VISIBILITY),,$(gb_VISIBILITY_FLAGS)) \
 		$(if $(WARNINGS_NOT_ERRORS),,$(gb_CXXFLAGS_WERROR)) \
 		$(if $(COMPILER_PLUGINS),$(gb_COMPILER_PLUGINS)) \
-		$(T_CXXFLAGS) \
+		$(T_CXXFLAGS) $(T_CXXFLAGS_APPEND) \
 		-c $(3) \
 		-o $(1) \
 		$(call gb_cxx_dep_generation_options,$(1),$(4)) \
@@ -124,7 +124,7 @@
         ICECC=no CCACHE_DISABLE=1 \
 	$(gb_CXX) \
 		$(DEFS) \
-		$(T_CXXFLAGS) \
+		$(T_CXXFLAGS) $(T_CXXFLAGS_APPEND) \
 		-c $(2) \
 		-I$(dir $(2)) \
 		$(INCLUDE) \
@@ -142,7 +142,7 @@
 		$(DEFS) \
 		$(if $(VISIBILITY),,$(gb_VISIBILITY_FLAGS)) \
 		$(if $(WARNINGS_NOT_ERRORS),,$(gb_CXXFLAGS_WERROR)) \
-		$(T_OBJCXXFLAGS) \
+		$(T_OBJCXXFLAGS) $(T_OBJCXXFLAGS_APPEND) \
 		-c $(3) \
 		-o $(1) \
 		-MMD -MT $(1) \
@@ -161,7 +161,7 @@
 		$(DEFS) \
 		$(if $(VISIBILITY),,$(gb_VISIBILITY_FLAGS)) \
 		$(if $(WARNINGS_NOT_ERRORS),,$(gb_CFLAGS_WERROR)) \
-		$(T_OBJCFLAGS) \
+		$(T_OBJCFLAGS) $(T_OBJCFLAGS_APPEND) \
 		-c $(3) \
 		-o $(1) \
 		-MMD -MT $(1) \
diff --git a/solenv/gbuild/platform/com_MSC_class.mk b/solenv/gbuild/platform/com_MSC_class.mk
index 3af4af8..5ef198c 100644
--- a/solenv/gbuild/platform/com_MSC_class.mk
+++ b/solenv/gbuild/platform/com_MSC_class.mk
@@ -52,7 +52,7 @@
 	$(if $(filter YES,$(COBJECT_X64)), $(CXX_X64_BINARY), $(gb_CC)) \
 		$(DEFS) \
 		$(if $(filter Library,$(TARGETTYPE)),$(gb_COMPILER_LTOFLAGS)) \
-		$(T_CFLAGS) \
+		$(T_CFLAGS) $(T_CFLAGS_APPEND) \
 		$(if $(WARNINGS_NOT_ERRORS),,$(gb_CFLAGS_WERROR)) \
 		-Fd$(PDBFILE) \
 		$(gb_COMPILERDEPFLAGS) \
@@ -75,7 +75,7 @@
 	$(if $(filter YES,$(CXXOBJECT_X64)), $(CXX_X64_BINARY), $(gb_CXX)) \
 		$(DEFS) \
 		$(if $(filter Library,$(TARGETTYPE)),$(gb_COMPILER_LTOFLAGS)) \
-		$(T_CXXFLAGS) \
+		$(T_CXXFLAGS) $(T_CXXFLAGS_APPEND) \
 		$(if $(WARNINGS_NOT_ERRORS),,$(gb_CXXFLAGS_WERROR)) \
 		-Fd$(PDBFILE) \
 		$(PCHFLAGS) \

-- 
To view, visit https://gerrit.libreoffice.org/1632
To unsubscribe, visit https://gerrit.libreoffice.org/settings

Gerrit-MessageType: newchange
Gerrit-Change-Id: If9d4640b59dd411734a581c66f9310d31ab9fbb7
Gerrit-PatchSet: 1
Gerrit-Project: core
Gerrit-Branch: master
Gerrit-Owner: Matúš Kukan <matus.kukan at gmail.com>



More information about the LibreOffice mailing list