~ubuntu-branches/debian/sid/trinity/sid

« back to all changes in this revision

Viewing changes to debian/patches/01-Makefile

  • Committer: Package Import Robot
  • Author(s): gustavo panizzo
  • Date: 2014-01-17 21:10:15 UTC
  • mfrom: (1.1.1)
  • Revision ID: package-import@ubuntu.com-20140117211015-k2qbnpu0osa5mlil
Tags: 1.3-1
* New upstream version 1.3.
* Removed wrong dependency on linux-headers. (Closes: #733771).

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
Description: simple patche to enable hardening build.
 
2
 
 
3
Origin: vendor
 
4
Forwarded: no
 
5
Last-Update: <2014-01-17>
 
6
 
 
7
--- a/Makefile  2013-07-23 09:35:31.000000000 +1000
 
8
+++ b/Makefile  2013-07-23 15:25:52.000000000 +1000
 
9
@@ -6,7 +6,7 @@ INSTALL_PREFIX ?= $(HOME)
 
10
 CC := $(CROSS_COMPILE)$(CC)
 
11
 LD := $(CROSS_COMPILE)$(LD)
 
12
 
 
13
-CFLAGS := -Wall -W -g -O2 -I. -Iinclude/ -Wimplicit -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE
 
14
+CFLAGS += -Wall -W -g -O2 -I. -Iinclude/ -Wimplicit -D_FORTIFY_SOURCE=2 -D_GNU_SOURCE
 
15
 ifneq ($(SYSROOT),)
 
16
 CFLAGS += --sysroot=$(SYSROOT)
 
17
 endif
 
18
@@ -61,13 +61,13 @@ DEPDIR= .deps
 
19
 -include $(SRCS:%.c=$(DEPDIR)/%.d)
 
20
 
 
21
 trinity: test $(OBJS) $(HEADERS)
 
22
-       $(QUIET_CC)$(CC) $(CFLAGS) -o trinity $(OBJS)
 
23
+       $(QUIET_CC)$(CC) $(CFLAGS) $(LDFLAGS) -o trinity $(OBJS)
 
24
        @mkdir -p tmp
 
25
 
 
26
 df = $(DEPDIR)/$(*D)/$(*F)
 
27
 
 
28
 %.o : %.c
 
29
-       $(QUIET_CC)$(CC) $(CFLAGS) -o $@ -c $<
 
30
+       $(QUIET_CC)$(CC) $(CFLAGS) $(LDFLAGS) -o $@ -c $<
 
31
        @mkdir -p $(DEPDIR)/$(*D)
 
32
        @gcc -MM $(CFLAGS) $*.c > $(df).d
 
33
        @mv -f $(df).d $(df).d.tmp