Browse code

pkg/kamailio/deb: strip default -02 from CC_EXTRA_OPTS

Fix #1004

Victor Seva authored on 22/02/2017 14:15:29
Showing 8 changed files
... ...
@@ -107,8 +107,8 @@ endef
107 107
 
108 108
 # CFLAGS + CPPFLAGS -> CC_EXTRA_OPTS
109 109
 CC_EXTRA_OPTS := $(shell dpkg-buildflags --get CPPFLAGS)
110
-CC_EXTRA_OPTS += $(shell dpkg-buildflags --get CFLAGS)
111
-CXXFLAGS := $(shell dpkg-buildflags --get CXXFLAGS)
110
+CC_EXTRA_OPTS += $(shell DEB_CFLAGS_MAINT_STRIP=-O2 dpkg-buildflags --get CFLAGS)
111
+CXXFLAGS := $(shell DEB_CXXFLAGS_MAINT_STRIP=-O2 dpkg-buildflags --get CXXFLAGS)
112 112
 # LDFLAGS -> LD_EXTRA_OPTS
113 113
 LD_EXTRA_OPTS := $(shell dpkg-buildflags --get LDFLAGS)
114 114
 
... ...
@@ -107,8 +107,8 @@ endef
107 107
 
108 108
 # CFLAGS + CPPFLAGS -> CC_EXTRA_OPTS
109 109
 CC_EXTRA_OPTS := $(shell dpkg-buildflags --get CPPFLAGS)
110
-CC_EXTRA_OPTS += $(shell dpkg-buildflags --get CFLAGS)
111
-CXXFLAGS := $(shell dpkg-buildflags --get CXXFLAGS)
110
+CC_EXTRA_OPTS += $(shell DEB_CFLAGS_MAINT_STRIP=-O2 dpkg-buildflags --get CFLAGS)
111
+CXXFLAGS := $(shell DEB_CXXFLAGS_MAINT_STRIP=-O2 dpkg-buildflags --get CXXFLAGS)
112 112
 # LDFLAGS -> LD_EXTRA_OPTS
113 113
 LD_EXTRA_OPTS := $(shell dpkg-buildflags --get LDFLAGS)
114 114
 
... ...
@@ -106,8 +106,8 @@ endef
106 106
 
107 107
 # CFLAGS + CPPFLAGS -> CC_EXTRA_OPTS
108 108
 CC_EXTRA_OPTS := $(shell dpkg-buildflags --get CPPFLAGS)
109
-CC_EXTRA_OPTS += $(shell dpkg-buildflags --get CFLAGS)
110
-CXXFLAGS := $(shell dpkg-buildflags --get CXXFLAGS)
109
+CC_EXTRA_OPTS += $(shell DEB_CFLAGS_MAINT_STRIP=-O2 dpkg-buildflags --get CFLAGS)
110
+CXXFLAGS := $(shell DEB_CXXFLAGS_MAINT_STRIP=-O2 dpkg-buildflags --get CXXFLAGS)
111 111
 # LDFLAGS -> LD_EXTRA_OPTS
112 112
 LD_EXTRA_OPTS := $(shell dpkg-buildflags --get LDFLAGS)
113 113
 
... ...
@@ -107,8 +107,8 @@ endef
107 107
 
108 108
 # CFLAGS + CPPFLAGS -> CC_EXTRA_OPTS
109 109
 CC_EXTRA_OPTS := $(shell dpkg-buildflags --get CPPFLAGS)
110
-CC_EXTRA_OPTS += $(shell dpkg-buildflags --get CFLAGS)
111
-CXXFLAGS := $(shell dpkg-buildflags --get CXXFLAGS)
110
+CC_EXTRA_OPTS += $(shell DEB_CFLAGS_MAINT_STRIP=-O2 dpkg-buildflags --get CFLAGS)
111
+CXXFLAGS := $(shell DEB_CXXFLAGS_MAINT_STRIP=-O2 dpkg-buildflags --get CXXFLAGS)
112 112
 # LDFLAGS -> LD_EXTRA_OPTS
113 113
 LD_EXTRA_OPTS := $(shell dpkg-buildflags --get LDFLAGS)
114 114
 
... ...
@@ -107,8 +107,8 @@ endef
107 107
 
108 108
 # CFLAGS + CPPFLAGS -> CC_EXTRA_OPTS
109 109
 CC_EXTRA_OPTS := $(shell dpkg-buildflags --get CPPFLAGS)
110
-CC_EXTRA_OPTS += $(shell dpkg-buildflags --get CFLAGS)
111
-CXXFLAGS := $(shell dpkg-buildflags --get CXXFLAGS)
110
+CC_EXTRA_OPTS += $(shell DEB_CFLAGS_MAINT_STRIP=-O2 dpkg-buildflags --get CFLAGS)
111
+CXXFLAGS := $(shell DEB_CXXFLAGS_MAINT_STRIP=-O2 dpkg-buildflags --get CXXFLAGS)
112 112
 # LDFLAGS -> LD_EXTRA_OPTS
113 113
 LD_EXTRA_OPTS := $(shell dpkg-buildflags --get LDFLAGS)
114 114
 
... ...
@@ -107,8 +107,8 @@ endef
107 107
 
108 108
 # CFLAGS + CPPFLAGS -> CC_EXTRA_OPTS
109 109
 CC_EXTRA_OPTS := $(shell dpkg-buildflags --get CPPFLAGS)
110
-CC_EXTRA_OPTS += $(shell dpkg-buildflags --get CFLAGS)
111
-CXXFLAGS := $(shell dpkg-buildflags --get CXXFLAGS)
110
+CC_EXTRA_OPTS += $(shell DEB_CFLAGS_MAINT_STRIP=-O2 dpkg-buildflags --get CFLAGS)
111
+CXXFLAGS := $(shell DEB_CXXFLAGS_MAINT_STRIP=-O2 dpkg-buildflags --get CXXFLAGS)
112 112
 # LDFLAGS -> LD_EXTRA_OPTS
113 113
 LD_EXTRA_OPTS := $(shell dpkg-buildflags --get LDFLAGS)
114 114
 
... ...
@@ -106,8 +106,8 @@ endef
106 106
 
107 107
 # CFLAGS + CPPFLAGS -> CC_EXTRA_OPTS
108 108
 CC_EXTRA_OPTS := $(shell dpkg-buildflags --get CPPFLAGS)
109
-CC_EXTRA_OPTS += $(shell dpkg-buildflags --get CFLAGS)
110
-CXXFLAGS := $(shell dpkg-buildflags --get CXXFLAGS)
109
+CC_EXTRA_OPTS += $(shell DEB_CFLAGS_MAINT_STRIP=-O2 dpkg-buildflags --get CFLAGS)
110
+CXXFLAGS := $(shell DEB_CXXFLAGS_MAINT_STRIP=-O2 dpkg-buildflags --get CXXFLAGS)
111 111
 # LDFLAGS -> LD_EXTRA_OPTS
112 112
 LD_EXTRA_OPTS := $(shell dpkg-buildflags --get LDFLAGS)
113 113
 
... ...
@@ -107,8 +107,8 @@ endef
107 107
 
108 108
 # CFLAGS + CPPFLAGS -> CC_EXTRA_OPTS
109 109
 CC_EXTRA_OPTS := $(shell dpkg-buildflags --get CPPFLAGS)
110
-CC_EXTRA_OPTS += $(shell dpkg-buildflags --get CFLAGS)
111
-CXXFLAGS := $(shell dpkg-buildflags --get CXXFLAGS)
110
+CC_EXTRA_OPTS += $(shell DEB_CFLAGS_MAINT_STRIP=-O2 dpkg-buildflags --get CFLAGS)
111
+CXXFLAGS := $(shell DEB_CXXFLAGS_MAINT_STRIP=-O2 dpkg-buildflags --get CXXFLAGS)
112 112
 # LDFLAGS -> LD_EXTRA_OPTS
113 113
 LD_EXTRA_OPTS := $(shell dpkg-buildflags --get LDFLAGS)
114 114