File: 0003-Don-t-override-CFLAGS-Closes-1119416.patch

package info (click to toggle)
flashbench 62%2Bgit20120606.2e30b19-2
  • links: PTS, VCS
  • area: main
  • in suites: forky, sid
  • size: 188 kB
  • sloc: ansic: 1,501; makefile: 45
file content (31 lines) | stat: -rw-r--r-- 842 bytes parent folder | 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
31
From: =?utf-8?b?0L3QsNCx?= <nabijaczleweli@nabijaczleweli.xyz>
Date: Wed, 29 Oct 2025 22:08:05 +0100
Subject: Don't override CFLAGS (Closes: #1119416)

---
 Makefile | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/Makefile b/Makefile
index 03a4493..d166538 100644
--- a/Makefile
+++ b/Makefile
@@ -1,6 +1,6 @@
-CC	:= gcc
-CFLAGS	:= -O2 -Wall -Wextra -Wno-missing-field-initializers -Wno-unused-parameter -g2
-LDFLAGS := -lrt
+CC	?= cc
+CFLAGS	+= -Wall -Wextra -Wno-missing-field-initializers -Wno-unused-parameter
+LDFLAGS += -lrt
 
 all: flashbench erase
 
@@ -9,7 +9,7 @@ vm.o: vm.c vm.h dev.h
 flashbench.o: flashbench.c vm.h dev.h
 
 flashbench: flashbench.o dev.o vm.o
-	$(CC) -o $@ flashbench.o dev.o vm.o $(LDFLAGS)
+	$(CC) $(CFLAGS) $(CPPFLAGS) -o $@ flashbench.o dev.o vm.o $(LDFLAGS)
 
 
 erase: erase.o