summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMike Frysinger <vapier@gentoo.org>2016-12-20 11:34:29 -0500
committerMike Frysinger <vapier@gentoo.org>2016-12-20 11:35:09 -0500
commit8c1fe8b7b045c175747525f38e6296b1c523246b (patch)
tree0bd7c609d1d687643339190fbae29b3a4e89cbbf /sys-apps/hdparm/files
parentnet-misc/libreswan: remove old (diff)
downloadgentoo-8c1fe8b7b045c175747525f38e6296b1c523246b.tar.gz
gentoo-8c1fe8b7b045c175747525f38e6296b1c523246b.tar.bz2
gentoo-8c1fe8b7b045c175747525f38e6296b1c523246b.zip
sys-apps/hdparm: fix parallel build failure
Move the sed commands into a patch to make a bit more reliable since we have to patch the Makefile anyways to fix parallel build errors.
Diffstat (limited to 'sys-apps/hdparm/files')
-rw-r--r--sys-apps/hdparm/files/hdparm-9.50-build.patch32
1 files changed, 32 insertions, 0 deletions
diff --git a/sys-apps/hdparm/files/hdparm-9.50-build.patch b/sys-apps/hdparm/files/hdparm-9.50-build.patch
new file mode 100644
index 000000000000..ff1948acb01e
--- /dev/null
+++ b/sys-apps/hdparm/files/hdparm-9.50-build.patch
@@ -0,0 +1,32 @@
+* drop hardcoded -O2 flag from CFLAGS
+* drop hardcoded -s (strip) flag from LDFLAGS, and respect user LDFLAGS
+* fix hardcoded `make` and hardcoded -j2 flags
+* respect CFLAGS when linking
+
+--- a/Makefile
++++ b/Makefile
+@@ -13,9 +13,8 @@
+ 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
+
+-LDFLAGS = -s
+ #LDFLAGS = -s -static
+ INSTALL = install
+ INSTALL_DATA = $(INSTALL) -m 644
+@@ -24,11 +23,10 @@ INSTALL_PROGRAM = $(INSTALL)
+
+ OBJS = hdparm.o identify.o sgio.o sysfs.o geom.o fallocate.o fibmap.o fwdownload.o dvdspeed.o wdidle3.o
+
+-all:
+- make -j2 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