void-packages/srcpkgs/hdparm/patches/makefile.patch

29 lines
891 B
Diff

Drop hardcoded -s flag from LDFLAGS
Drop hardcoded -j4 flag
Use CFLAGS when linking
--- Makefile.orig 2016-12-29 16:15:41.000000000 +0100
+++ Makefile 2017-01-25 19:54:51.449547415 +0100
@@ -15,7 +15,6 @@
CFLAGS := -O2 -W -Wall -Wbad-function-cast -Wcast-align -Wpointer-arith -Wcast-qual -Wshadow -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -fkeep-inline-functions -Wwrite-strings -Waggregate-return -Wnested-externs -Wtrigraphs $(CFLAGS)
-LDFLAGS = -s
#LDFLAGS = -s -static
INSTALL = install
INSTALL_DATA = $(INSTALL) -m 644
@@ -24,11 +23,10 @@
OBJS = hdparm.o identify.o sgio.o sysfs.o geom.o fallocate.o fibmap.o fwdownload.o dvdspeed.o wdidle3.o
-all:
- $(MAKE) -j4 hdparm
+all: hdparm
hdparm: hdparm.h sgio.h $(OBJS)
- $(CC) $(LDFLAGS) -o hdparm $(OBJS)
+ $(CC) $(CFLAGS) $(LDFLAGS) -o hdparm $(OBJS)
$(STRIP) hdparm
hdparm.o: hdparm.h sgio.h