void-packages/srcpkgs/f3/patches/fix-compile-flags.patch

23 lines
600 B
Diff

--- Makefile.orig
+++ Makefile
@@ -1,5 +1,5 @@
CC ?= gcc
-CFLAGS += -std=c99 -Wall -Wextra -pedantic -MMD -ggdb
+override CFLAGS += -std=c99 -Wall -Wextra -pedantic -MMD -ggdb
TARGETS = f3write f3read
EXPERIMENTAL_TARGETS = f3probe f3brew f3fix
@@ -23,10 +23,10 @@
$(INSTALL) -oroot -groot -m755 $(EXPERIMENTAL_TARGETS) $(PREFIX)/bin
f3write: utils.o f3write.o
- $(CC) -o $@ $^ -lm
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^ -lm
f3read: utils.o f3read.o
- $(CC) -o $@ $^
+ $(CC) $(CFLAGS) $(LDFLAGS) -o $@ $^
f3probe: libutils.o libdevs.o libprobe.o f3probe.o
$(CC) -o $@ $^ -lm -ludev