mirror of
https://github.com/lwip-tcpip/lwip.git
synced 2024-11-04 23:29:25 +00:00
test/fuzz: Fix CC default value in makefile
Unfortunately, CC ?= afl-gcc doesn't work. This is because CC has a default value (of "cc"), and the ?= operator only assigns a value if the variable previously had none. "make" currently compiles with cc. In this patch, I implemented the more elaborate way to achieve what was probably intended: "make" will use afl-gcc now, and "make CC=foo" will compile with "foo".
This commit is contained in:
parent
2e3dcf06d1
commit
911da26f96
@ -32,7 +32,10 @@
|
||||
all compile: lwip_fuzz lwip_fuzz2 lwip_fuzz3
|
||||
.PHONY: all clean
|
||||
|
||||
CC?=afl-gcc
|
||||
ifeq ($(origin CC), default)
|
||||
CC=afl-gcc
|
||||
endif
|
||||
|
||||
LDFLAGS=-lm
|
||||
# use 'make D=-DUSER_DEFINE' to pass a user define to gcc
|
||||
CFLAGS=-O0 $(D)
|
||||
|
Loading…
Reference in New Issue
Block a user