make: Prevent double wrapping of printf/vprintf
This is a bit awkward due to Makefiles having no concept of boolean ors, but we can avoid passing multiple -Wl,--wrap flags with enough ifdefs/ifndefs.
This commit is contained in:
@@ -113,9 +113,11 @@ TEST_CFLAGS += -DTEST_HEAP
|
||||
TEST_CFLAGS += -Wl,--wrap=malloc
|
||||
TEST_CFLAGS += -Wl,--wrap=free
|
||||
TEST_CFLAGS += -Wl,--wrap=realloc
|
||||
ifndef STACK
|
||||
TEST_CFLAGS += -Wl,--wrap=printf
|
||||
TEST_CFLAGS += -Wl,--wrap=vprintf
|
||||
endif
|
||||
endif
|
||||
|
||||
BENCH_CFLAGS += -Wno-unused-function
|
||||
BENCH_CFLAGS += -Wno-format-overflow
|
||||
@@ -129,9 +131,11 @@ BENCH_CFLAGS += -DBENCH_HEAP
|
||||
BENCH_CFLAGS += -Wl,--wrap=malloc
|
||||
BENCH_CFLAGS += -Wl,--wrap=free
|
||||
BENCH_CFLAGS += -Wl,--wrap=realloc
|
||||
ifdef NO_STACK
|
||||
BENCH_CFLAGS += -Wl,--wrap=printf
|
||||
BENCH_CFLAGS += -Wl,--wrap=vprintf
|
||||
endif
|
||||
endif
|
||||
|
||||
ifdef VERBOSE
|
||||
CODEFLAGS += -v
|
||||
|
||||
Reference in New Issue
Block a user