Package: sparse / 0.6.0-3

honor-CFLAGS-from-environment.patch Patch series | download
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
From: Uwe Kleine-König <uwe@kleine-koenig.org>
Date: Tue, 12 Feb 2019 21:15:05 +0100
Subject: [PATCH] honor CFLAGS from environment

Debian build scripts pass CFLAGS in the environment. To honor these only set
CFLAGS to "-O2 -g" if CFLAGS is unset. The warnings in the following line
are added unconditionally. This makes sparse builds reproducible.

Signed-off-by: Uwe Kleine-König <uwe@kleine-koenig.org>
Forwarded: https://marc.info/?l=linux-sparse&m=155000004520068&w=2
---
 Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/Makefile b/Makefile
index 025bce296cdf..da0c6f3578d2 100644
--- a/Makefile
+++ b/Makefile
@@ -6,7 +6,7 @@ OS = linux
 
 
 CC = gcc
-CFLAGS = -O2 -g
+CFLAGS ?= -O2 -g
 CFLAGS += -Wall -Wwrite-strings
 LD = $(CC)
 AR = ar
-- 
2.20.1