summaryrefslogtreecommitdiff
path: root/sys-block/iscsitarget/files/iscsitarget-1.4.20.2-respect-flags.patch
blob: 347650ab9407d0bcd9a17e2f3183f72aa3bd9ebb (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
--- a/Makefile
+++ b/Makefile
@@ -26,7 +26,7 @@
   endif
 endif
 
-KVER := $(shell $(CC) $(CFLAGS) -E -dM $(VERSION_FILE) | \
+KVER := $(shell $(CC) $(CFLAGS) $(LDFLAGS) -E -dM $(VERSION_FILE) | \
 	grep UTS_RELEASE | awk '{ print $$3 }' | sed 's/\"//g')
 
 KMOD := /lib/modules/$(KVER)/extra
--- a/usr/Makefile
+++ b/usr/Makefile
@@ -1,4 +1,4 @@
-CFLAGS += -O2 -fno-inline -Wall -Wstrict-prototypes -g -I../include
+CFLAGS += -fno-inline -Wall -Wstrict-prototypes -I../include
 CFLAGS += -D_GNU_SOURCE # required for glibc >= 2.8
 PROGRAMS = ietd ietadm
 LIBS =
@@ -7,10 +7,10 @@
 
 ietd: ietd.o iscsid.o conn.o session.o target.o message.o ctldev.o log.o chap.o event.o param.o plain.o isns.o md5.o sha1.o
 
-	$(CC) $^ -o $@ $(LIBS)
+	$(CC) $(LDFLAGS) $^ -o $@ $(LIBS)
 
 ietadm: ietadm.o param.o
-	$(CC) $^ -o $@
+	$(CC) $(LDFLAGS) $^ -o $@
 
 clean:
 	rm -f *.o $(PROGRAMS)