summaryrefslogtreecommitdiff
path: root/sys-apps/hdparm/files
diff options
context:
space:
mode:
authorV3n3RiX <venerix@redcorelinux.org>2020-11-25 22:39:15 +0000
committerV3n3RiX <venerix@redcorelinux.org>2020-11-25 22:39:15 +0000
commitd934827bf44b7cfcf6711964418148fa60877668 (patch)
tree0625f358789b5e015e49db139cc1dbc9be00428f /sys-apps/hdparm/files
parent2e34d110f164bf74d55fced27fe0000201b3eec5 (diff)
gentoo resync : 25.11.2020
Diffstat (limited to 'sys-apps/hdparm/files')
-rw-r--r--sys-apps/hdparm/files/hdparm-9.60-build.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/sys-apps/hdparm/files/hdparm-9.60-build.patch b/sys-apps/hdparm/files/hdparm-9.60-build.patch
new file mode 100644
index 000000000000..3cc1a7564e35
--- /dev/null
+++ b/sys-apps/hdparm/files/hdparm-9.60-build.patch
@@ -0,0 +1,32 @@
+* drop hardcoded -O2 flag from CFLAGS
+* fix hardcoded `make` and hardcoded -j4 flags
+* respect CFLAGS when linking
+
+--- hdparm-9.60/Makefile
++++ hdparm-9.60/Makefile
+@@ -13,7 +13,7 @@
+ CC ?= gcc
+ STRIP ?= strip
+
+-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)
++CFLAGS += -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
+
+ INSTALL = install
+ INSTALL_DATA = $(INSTALL) -m 644
+@@ -22,14 +22,13 @@
+
+ OBJS = hdparm.o identify.o sgio.o sysfs.o geom.o fallocate.o fibmap.o fwdownload.o dvdspeed.o wdidle3.o apt.o
+
+-all:
+- $(MAKE) -j4 hdparm
++all: hdparm
+
+ static:
+ LDFLAGS=-static $(MAKE)
+
+ hdparm: Makefile hdparm.h sgio.h $(OBJS)
+- $(CC) $(LDFLAGS) -o hdparm $(OBJS)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o hdparm $(OBJS)
+ $(STRIP) hdparm
+
+ hdparm.o: hdparm.h sgio.h