aboutsummaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-support/arptables/arptables/0001-Use-ARPCFLAGS-for-package-specific-compiler-flags.patch
blob: c58ef1a9efd00e1bfaade4bdd988f97cb480572a (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
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
From a2021f0bc0f029dfa05dcca5db3d2ec77904d41a Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Thu, 30 Mar 2017 12:33:51 -0700
Subject: [PATCH] Use ARPCFLAGS for package specific compiler flags

This leaves room for setting CFLAGS in environment
which OE uses to pass tweaks

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
Upstream-Status: Pending

 Makefile            | 10 ++++------
 extensions/Makefile |  4 ++++
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/Makefile b/Makefile
index 62ebdf2..cd06813 100644
--- a/Makefile
+++ b/Makefile
@@ -12,9 +12,7 @@ DESTDIR:=
 
 MANS = arptables-legacy.8 arptables-save.8 arptables-restore.8
 
-COPT_FLAGS:=-O2
-CFLAGS:=$(COPT_FLAGS) -Wall -Wunused -I$(KERNEL_DIR)/include/ -Iinclude/ -DARPTABLES_VERSION=\"$(ARPTABLES_VERSION)\" #-g -DDEBUG #-pg # -DARPTC_DEBUG
-
+ARPCFLAGS:=-Wall -Wunused -I$(KERNEL_DIR)/include/ -Iinclude/ -DARPTABLES_VERSION=\"$(ARPTABLES_VERSION)\"
 ifndef ARPT_LIBDIR
 ARPT_LIBDIR:=$(LIBDIR)/arptables
 endif
@@ -24,13 +22,13 @@ include extensions/Makefile
 all: arptables-legacy libarptc/libarptc.a
 
 arptables.o: arptables.c
-	$(CC) $(CFLAGS) -c -o $@ $<
+	$(CC) $(ARPCFLAGS) $(CFLAGS) -c -o $@ $<
 
 arptables-standalone.o: arptables-standalone.c
-	$(CC) $(CFLAGS) -c -o $@ $<
+	$(CC) $(ARPCFLAGS) $(CFLAGS) -c -o $@ $<
 
 libarptc/libarptc.o: libarptc/libarptc.c libarptc/libarptc_incl.c
-	$(CC) $(CFLAGS) -c -o $@ $<
+	$(CC) $(ARPCFLAGS) $(CFLAGS) -c -o $@ $<
 
 libarptc/libarptc.a: libarptc/libarptc.o
 	$(AR) rcs $@ $<
diff --git a/extensions/Makefile b/extensions/Makefile
index 0189cc9..e8af782 100644
--- a/extensions/Makefile
+++ b/extensions/Makefile
@@ -5,3 +5,7 @@ EXT_OBJS+=$(foreach T,$(EXT_FUNC), extensions/arpt_$(T).o)
 
 extensions/ebt_%.o: extensions/arpt_%.c include/arptables.h include/arptables_common.h
 	$(CC) $(CFLAGS) $(PROGSPECS) -c -o $@ $<
+	$(CC) $(CFLAGS) $(ARPCFLAGS) $(PROGSPECS) -c -o $@ $<
+
+extensions/arpt_%.o: extensions/arpt_%.c include/arptables.h include/arptables_common.h
+	$(CC) $(CFLAGS) $(ARPCFLAGS) $(PROGSPECS) -c -o $@ $<
-- 
2.17.1