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 62EF4139694 for ; Tue, 14 Feb 2017 22:16:49 +0000 (UTC) Received: from pigeon.gentoo.org (localhost [127.0.0.1]) by pigeon.gentoo.org (Postfix) with SMTP id B6C3121C075; Tue, 14 Feb 2017 22:16:48 +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 8277121C075 for ; Tue, 14 Feb 2017 22:16:48 +0000 (UTC) Received: from oystercatcher.gentoo.org (unknown [IPv6:2a01:4f8:202:4333:225:90ff:fed9:fc84]) (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 8E4263415B7 for ; Tue, 14 Feb 2017 22:16:47 +0000 (UTC) Received: from localhost.localdomain (localhost [IPv6:::1]) by oystercatcher.gentoo.org (Postfix) with ESMTP id 5BB3147FE for ; Tue, 14 Feb 2017 22:16:46 +0000 (UTC) From: "Sergei Trofimovich" To: gentoo-commits@lists.gentoo.org Content-Transfer-Encoding: 8bit Content-type: text/plain; charset=UTF-8 Reply-To: gentoo-dev@lists.gentoo.org, "Sergei Trofimovich" Message-ID: <1487110599.8274b84fb061ddcb1318f1ba5625b41b197e6987.slyfox@gentoo> Subject: [gentoo-commits] repo/gentoo:master commit in: dev-lang/ghc/ X-VCS-Repository: repo/gentoo X-VCS-Files: dev-lang/ghc/ghc-7.10.3.ebuild dev-lang/ghc/ghc-8.0.2.ebuild X-VCS-Directories: dev-lang/ghc/ X-VCS-Committer: slyfox X-VCS-Committer-Name: Sergei Trofimovich X-VCS-Revision: 8274b84fb061ddcb1318f1ba5625b41b197e6987 X-VCS-Branch: master Date: Tue, 14 Feb 2017 22:16:46 +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: d253bc69-e5a2-4738-813b-e44c77489bff X-Archives-Hash: de38d9f5a04105b2ef53a52b003a6ac6 commit: 8274b84fb061ddcb1318f1ba5625b41b197e6987 Author: Sergei Trofimovich gentoo org> AuthorDate: Tue Feb 14 10:01:08 2017 +0000 Commit: Sergei Trofimovich gentoo org> CommitDate: Tue Feb 14 22:16:39 2017 +0000 URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=8274b84f ghc: spell '-nopie' as '-no-pie' for gcc-6.3.0, bug #606666 Gentoo upstreamed -pie/-nopie patch to GCC upstream but there is a twist: '-nopie' gentoo flag became '-no-pie'. But at least '-no-pie' is accessible in both vanilla and hardened profiles of gcc-6.3.0. Reported-by: Toralf Förster Bug: https://bugs.gentoo.org/606666 Signed-off-by: Sergei Trofimovich gentoo.org> dev-lang/ghc/ghc-7.10.3.ebuild | 10 ++++++++-- dev-lang/ghc/ghc-8.0.2.ebuild | 10 ++++++++-- 2 files changed, 16 insertions(+), 4 deletions(-) diff --git a/dev-lang/ghc/ghc-7.10.3.ebuild b/dev-lang/ghc/ghc-7.10.3.ebuild index ac9989cf6e..a963d059c6 100644 --- a/dev-lang/ghc/ghc-7.10.3.ebuild +++ b/dev-lang/ghc/ghc-7.10.3.ebuild @@ -244,9 +244,15 @@ ghc_setup_cflags() { append-ghc-cflags link ${flag} done - # hardened-gcc needs to be disabled, because the mangler doesn't accept - # its output. + # hardened-gcc needs to be disabled, because our prebuilt binaries/libraries + # are not built with fPIC, bug #606666 gcc-specs-pie && append-ghc-cflags persistent compile link -nopie + tc-is-gcc && version_is_at_least 6.3 $(gcc-version) && if ! use ghcbootstrap; then + # gcc-6.3 has support for -no-pie upstream, but spelling differs from + # gentoo-specific '-nopie'. We enable it in non-bootstrap to allow + # hardened users try '-pie' in USE=ghcbootstrap mode. + append-ghc-cflags persistent compile link -no-pie + fi gcc-specs-ssp && append-ghc-cflags persistent compile -fno-stack-protector # prevent from failind building unregisterised ghc: diff --git a/dev-lang/ghc/ghc-8.0.2.ebuild b/dev-lang/ghc/ghc-8.0.2.ebuild index e6dc320cb7..e5abb43d94 100644 --- a/dev-lang/ghc/ghc-8.0.2.ebuild +++ b/dev-lang/ghc/ghc-8.0.2.ebuild @@ -236,9 +236,15 @@ ghc_setup_cflags() { append-ghc-cflags link ${flag} done - # hardened-gcc needs to be disabled, because the mangler doesn't accept - # its output. + # hardened-gcc needs to be disabled, because our prebuilt binaries/libraries + # are not built with fPIC, bug #606666 gcc-specs-pie && append-ghc-cflags persistent compile link -nopie + tc-is-gcc && version_is_at_least 6.3 $(gcc-version) && if ! use ghcbootstrap; then + # gcc-6.3 has support for -no-pie upstream, but spelling differs from + # gentoo-specific '-nopie'. We enable it in non-bootstrap to allow + # hardened users try '-pie' in USE=ghcbootstrap mode. + append-ghc-cflags persistent compile link -no-pie + fi gcc-specs-ssp && append-ghc-cflags persistent compile -fno-stack-protector # prevent from failind building unregisterised ghc: