From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from lists.gentoo.org (pigeon.gentoo.org [208.92.234.80]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by finch.gentoo.org (Postfix) with ESMTPS id DE3D9139085 for ; Tue, 20 Dec 2016 16:35:39 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id CF1752241EE; Tue, 20 Dec 2016 16:35:36 +0000 (UTC) Received: from smtp.gentoo.org (smtp.gentoo.org [140.211.166.183]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by pigeon.gentoo.org (Postfix) with ESMTPS id 9D06B2241EE for ; Tue, 20 Dec 2016 16:35:36 +0000 (UTC) Received: from oystercatcher.gentoo.org (oystercatcher.gentoo.org [148.251.78.52]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.gentoo.org (Postfix) with ESMTPS id C282334102B for ; Tue, 20 Dec 2016 16:35:30 +0000 (UTC) Received: from localhost.localdomain (localhost [127.0.0.1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 68A4D24AB for ; Tue, 20 Dec 2016 16:35:29 +0000 (UTC) From: "Mike Frysinger" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Mike Frysinger" Message-ID: <1482251709.8c1fe8b7b045c175747525f38e6296b1c523246b.vapier@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: sys-apps/hdparm/, sys-apps/hdparm/files/ X-VCS-Repository: repo/gentoo X-VCS-Files: sys-apps/hdparm/files/hdparm-9.50-build.patch sys-apps/hdparm/hdparm-9.50.ebuild X-VCS-Directories: sys-apps/hdparm/ sys-apps/hdparm/files/ X-VCS-Committer: vapier X-VCS-Committer-Name: Mike Frysinger X-VCS-Revision: 8c1fe8b7b045c175747525f38e6296b1c523246b X-VCS-Branch: master Date: Tue, 20 Dec 2016 16:35:29 +0000 (UTC) Precedence: bulk List-Post: List-Help: List-Unsubscribe: List-Subscribe: List-Id: Gentoo Linux mail X-BeenThere: gentoo-commits@lists.gentoo.org X-Archives-Salt: bec9af48-e4ed-4425-904a-7dd81d77a696 X-Archives-Hash: 7160ac9602cc86be3c3d0f5339f13761 commit: 8c1fe8b7b045c175747525f38e6296b1c523246b Author: Mike Frysinger gentoo org> AuthorDate: Tue Dec 20 16:34:29 2016 +0000 Commit: Mike Frysinger gentoo org> CommitDate: Tue Dec 20 16:35:09 2016 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8c1fe8b7 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. sys-apps/hdparm/files/hdparm-9.50-build.patch | 32 +++++++++++++++++++++++++++ sys-apps/hdparm/hdparm-9.50.ebuild | 10 ++++----- 2 files changed, 36 insertions(+), 6 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 00000000..ff1948a --- /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 diff --git a/sys-apps/hdparm/hdparm-9.50.ebuild b/sys-apps/hdparm/hdparm-9.50.ebuild index 4db6889..f447ca4 100644 --- a/sys-apps/hdparm/hdparm-9.50.ebuild +++ b/sys-apps/hdparm/hdparm-9.50.ebuild @@ -17,15 +17,13 @@ IUSE="static" src_prepare() { epatch "${FILESDIR}"/${PN}-9.48-sysmacros.patch #580052 + epatch "${FILESDIR}"/${PN}-9.50-build.patch use static && append-ldflags -static - sed -i \ - -e "/^CFLAGS/ s:-O2:${CFLAGS}:" \ - -e "/^LDFLAGS/ s:-s:${LDFLAGS}:" \ - Makefile || die "sed" } -src_compile() { - emake STRIP=: CC="$(tc-getCC)" +src_configure() { + tc-export CC + export STRIP=: } src_install() {