summaryrefslogtreecommitdiff
path: root/debian/patches/0005-hardening.patch
blob: c60496f6fc512617b7d42338eb0f3f3b4d4a188a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
Description: pass compiler flags set in debian/rules to compiler
Author: Devid Antonio Filoni <d.filoni@ubuntu.com>

Index: trunk/Makefile
===================================================================
--- trunk.orig/Makefile
+++ trunk/Makefile
@@ -35,7 +35,7 @@ CORE_SUPPORTED_LANGUAGES=$(shell cat po/
 LOCAL_LANG_DIR=locale-langpack
 SYSTEM_LANG_DIR := $(DESTDIR)$(PREFIX)/share/locale
 
-VALAFLAGS := -g --enable-checking --target-glib=2.32 --thread --fatal-warnings --enable-experimental --enable-deprecated $(USER_VALAFLAGS)
+VALAFLAGS := $(foreach w,$(CPPFLAGS) $(CFLAGS) $(LDFLAGS),-X $(w)) --enable-checking --target-glib=2.32 --thread --enable-experimental --enable-deprecated $(USER_VALAFLAGS)
 ifdef UNITY_SUPPORT
 VALAFLAGS := $(VALAFLAGS) --define UNITY_SUPPORT
 endif
@@ -673,7 +673,7 @@ $(EXPANDED_C_FILES): $(VALA_STAMP)
 	@
 
 $(EXPANDED_OBJ_FILES): %.o: %.c $(CONFIG_IN) Makefile
-	$(CC) -c $(VALA_CFLAGS) $(CFLAGS) -o $@ $<
+	$(CC) -c $(VALA_CFLAGS) $(CPPFLAGS) $(CFLAGS) -o $@ $<
 
 $(PROGRAM): $(EXPANDED_OBJ_FILES) $(RESOURCES) $(LANG_STAMP) $(THUMBNAILER_BIN) misc/gschemas.compiled $(DOC_LANG_STAMP)
 	$(CC) $(EXPANDED_OBJ_FILES) $(CFLAGS) $(LDFLAGS) $(RESOURCES) $(VALA_LDFLAGS) $(EXPORT_FLAGS) -o $@
Index: trunk/plugins/Makefile.plugin.mk
===================================================================
--- trunk.orig/plugins/Makefile.plugin.mk
+++ trunk/plugins/Makefile.plugin.mk
@@ -41,7 +41,7 @@ DEFINES := -D_VERSION='"$(PLUGINS_VERSIO
 all: $(PLUGIN).so
 
 .stamp: $(SRC_FILES) $(MAKE_FILES) $(HEADER_FILES)
-	$(VALAC) --target-glib=$(MIN_GLIB_VERSION) -g --enable-checking --fatal-warnings --save-temps --compile --enable-deprecated \
+	$(VALAC) --target-glib=$(MIN_GLIB_VERSION) -g --enable-checking --save-temps --compile --enable-deprecated \
 		--vapidir=../ $(foreach pkg,$(PKGS),--pkg=$(pkg)) $(foreach pkg,$(CUSTOM_VAPI_PKGS),--pkg=$(pkg)) \
 		-X -I../.. -X -fPIC \
 		$(foreach dfn,$(DEFINES),-X $(dfn)) \