aboutsummaryrefslogtreecommitdiffstats
path: root/meta-oe/recipes-devtools/iptraf/iptraf-ng/0001-make-Make-CC-weak-assignment.patch
blob: 342c78f0f116030cf2a0f2b815d8c8e0282a35ae (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
From 223de708552b1ab00ac1a119e82e13deed573036 Mon Sep 17 00:00:00 2001
From: Khem Raj <raj.khem@gmail.com>
Date: Sat, 30 Oct 2021 10:22:38 -0700
Subject: [PATCH] make: Make CC weak assignment

This ensures that if environment overrrides it then its respected, this
helps cross-compiling cases

Upstream-Status: Pending

Signed-off-by: Khem Raj <raj.khem@gmail.com>
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

--- a/Makefile
+++ b/Makefile
@@ -18,14 +18,14 @@ VERSION-FILE: FORCE
 	@$(SHELL_PATH) ./GEN-VERSION-FILE
 -include VERSION-FILE
 
-CFLAGS = -g -O2 -Wall -W -Werror=format-security
-LDFLAGS =
+CFLAGS += -g -O2 -Wall -W -Werror=format-security
+LDFLAGS ?=
 IPTRAF_CFLAGS := -std=gnu99 -D_GNU_SOURCE
 ALL_CFLAGS = $(CPPFLAGS) $(CFLAGS) $(IPTRAF_CFLAGS)
 ALL_LDFLAGS = $(LDFLAGS)
 STRIP ?= strip
 
-prefix = $(HOME)
+prefix ?= $(HOME)
 sbindir_relative = sbin
 sbindir = $(prefix)/$(sbindir_relative)
 mandir = $(prefix)/share/man
@@ -39,7 +39,7 @@ pathsep = :
 
 export prefix bindir sharedir sysconfdir gitwebdir localedir
 
-CC = cc
+CC ?= cc
 RM = rm -f
 INSTALL = install
 RPMBUILD = rpmbuild