aboutsummaryrefslogtreecommitdiffstats
path: root/meta-networking/recipes-support/bridge-utils/bridge-utils/0005-build-don-t-ignore-CFLAGS-from-environment.patch
blob: 0a72c6b2c43a74cb500112705fc4de3e64f114fb (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
From 9d63838d12c772dfe33371e2bb8b8191625539f2 Mon Sep 17 00:00:00 2001
From: Joe MacDonald <joe_macdonald@mentor.com>
Date: Mon, 30 Oct 2017 13:37:48 -0400
Subject: [PATCH] build: don't ignore CFLAGS from environment
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8
Content-Transfer-Encoding: 8bit

We need to take them into account so as to behave nicely towards
build environments which expect to be able to set them, e.g. for
optimisation flags, or debug options.

Therefore they need to be added to the compiler command line of
every source file, and in addition, the same CFLAGS that were
used during compilation must also always be used during linking!

Upstream-Status: Pending

Signed-off-by: André Draszik <git@andred.net>
Signed-off-by: Joe MacDonald <joe_macdonald@mentor.com>
---
 brctl/Makefile.in | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/brctl/Makefile.in b/brctl/Makefile.in
index e1956d6..eff260c 100644
--- a/brctl/Makefile.in
+++ b/brctl/Makefile.in
@@ -34,7 +34,7 @@ install: $(PROGRAMS)
 	$(INSTALL) -m 755 $(PROGRAMS) $(DESTDIR)$(sbindir)
 
 brctl:	$(brctl_OBJECTS) ../libbridge/libbridge.a
-	$(CC) $(LDFLAGS) $(brctl_OBJECTS) $(LIBS) -o brctl
+	$(CC) $(CFLAGS) $(LDFLAGS) $(brctl_OBJECTS) $(LIBS) -o brctl
 
 %.o: %.c brctl.h
 	$(CC) $(CFLAGS) $(INCLUDE) -c $< 
-- 
2.7.4