summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSergei Trofimovich <slyfox@gentoo.org>2021-02-11 20:17:33 +0000
committerSergei Trofimovich <slyfox@gentoo.org>2021-02-11 20:21:56 +0000
commitcd833222cbaef1cd344f3b06c528b858c06dc04a (patch)
treebdb9c5c294f08e8f4cd7eecee403b6511f064c5d /sys-devel
parentsys-libs/binutils-libs: make CET optional (and disabled by default) (diff)
downloadgentoo-cd833222cbaef1cd344f3b06c528b858c06dc04a.tar.gz
gentoo-cd833222cbaef1cd344f3b06c528b858c06dc04a.tar.bz2
gentoo-cd833222cbaef1cd344f3b06c528b858c06dc04a.zip
sys-devel/binutils: make CET optional (and disabled by default)
Reported-by: subzero_ro@yahoo.com Bug: https://bugs.gentoo.org/770061 Package-Manager: Portage-3.0.14, Repoman-3.0.2 Signed-off-by: Sergei Trofimovich <slyfox@gentoo.org>
Diffstat (limited to 'sys-devel')
-rw-r--r--sys-devel/binutils/binutils-2.35.1-r1.ebuild7
-rw-r--r--sys-devel/binutils/binutils-2.35.2.ebuild7
-rw-r--r--sys-devel/binutils/binutils-2.36.1.ebuild7
-rw-r--r--sys-devel/binutils/binutils-9999.ebuild7
-rw-r--r--sys-devel/binutils/metadata.xml1
5 files changed, 25 insertions, 4 deletions
diff --git a/sys-devel/binutils/binutils-2.35.1-r1.ebuild b/sys-devel/binutils/binutils-2.35.1-r1.ebuild
index a98e259e36a6..516f5642244a 100644
--- a/sys-devel/binutils/binutils-2.35.1-r1.ebuild
+++ b/sys-devel/binutils/binutils-2.35.1-r1.ebuild
@@ -8,7 +8,7 @@ inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs
DESCRIPTION="Tools necessary to build programs"
HOMEPAGE="https://sourceware.org/binutils/"
LICENSE="GPL-3+"
-IUSE="default-gold doc +gold multitarget +nls +plugins static-libs test vanilla"
+IUSE="cet default-gold doc +gold multitarget +nls +plugins static-libs test vanilla"
REQUIRED_USE="default-gold? ( gold )"
# Variables that can be set here (ignored for live ebuilds)
@@ -265,6 +265,11 @@ src_configure() {
# avoid automagic dependency on (currently prefix) systems
# systems with debuginfod library, bug #754753
--without-debuginfod
+
+ # Allow user to opt into CET for host libraries.
+ # Ideally we would like automagic-or-disabled here.
+ # But the check does not quite work on i686: bug #760926.
+ $(use_enable cet)
)
echo ./configure "${myconf[@]}"
"${S}"/configure "${myconf[@]}" || die
diff --git a/sys-devel/binutils/binutils-2.35.2.ebuild b/sys-devel/binutils/binutils-2.35.2.ebuild
index dae533747ec2..2aff27700144 100644
--- a/sys-devel/binutils/binutils-2.35.2.ebuild
+++ b/sys-devel/binutils/binutils-2.35.2.ebuild
@@ -8,7 +8,7 @@ inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs
DESCRIPTION="Tools necessary to build programs"
HOMEPAGE="https://sourceware.org/binutils/"
LICENSE="GPL-3+"
-IUSE="default-gold doc +gold multitarget +nls +plugins static-libs test vanilla"
+IUSE="cet default-gold doc +gold multitarget +nls +plugins static-libs test vanilla"
REQUIRED_USE="default-gold? ( gold )"
# Variables that can be set here (ignored for live ebuilds)
@@ -264,6 +264,11 @@ src_configure() {
# avoid automagic dependency on (currently prefix) systems
# systems with debuginfod library, bug #754753
--without-debuginfod
+
+ # Allow user to opt into CET for host libraries.
+ # Ideally we would like automagic-or-disabled here.
+ # But the check does not quite work on i686: bug #760926.
+ $(use_enable cet)
)
echo ./configure "${myconf[@]}"
"${S}"/configure "${myconf[@]}" || die
diff --git a/sys-devel/binutils/binutils-2.36.1.ebuild b/sys-devel/binutils/binutils-2.36.1.ebuild
index 209b2daf9dbb..3d820fcc6f81 100644
--- a/sys-devel/binutils/binutils-2.36.1.ebuild
+++ b/sys-devel/binutils/binutils-2.36.1.ebuild
@@ -8,7 +8,7 @@ inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs
DESCRIPTION="Tools necessary to build programs"
HOMEPAGE="https://sourceware.org/binutils/"
LICENSE="GPL-3+"
-IUSE="default-gold doc +gold multitarget +nls +plugins static-libs test vanilla"
+IUSE="cet default-gold doc +gold multitarget +nls +plugins static-libs test vanilla"
REQUIRED_USE="default-gold? ( gold )"
# Variables that can be set here (ignored for live ebuilds)
@@ -264,6 +264,11 @@ src_configure() {
# avoid automagic dependency on (currently prefix) systems
# systems with debuginfod library, bug #754753
--without-debuginfod
+
+ # Allow user to opt into CET for host libraries.
+ # Ideally we would like automagic-or-disabled here.
+ # But the check does not quite work on i686: bug #760926.
+ $(use_enable cet)
)
echo ./configure "${myconf[@]}"
"${S}"/configure "${myconf[@]}" || die
diff --git a/sys-devel/binutils/binutils-9999.ebuild b/sys-devel/binutils/binutils-9999.ebuild
index 50d528443d77..014a2d716125 100644
--- a/sys-devel/binutils/binutils-9999.ebuild
+++ b/sys-devel/binutils/binutils-9999.ebuild
@@ -8,7 +8,7 @@ inherit eutils libtool flag-o-matic gnuconfig multilib toolchain-funcs
DESCRIPTION="Tools necessary to build programs"
HOMEPAGE="https://sourceware.org/binutils/"
LICENSE="GPL-3+"
-IUSE="default-gold doc +gold multitarget +nls +plugins static-libs test vanilla"
+IUSE="cet default-gold doc +gold multitarget +nls +plugins static-libs test vanilla"
REQUIRED_USE="default-gold? ( gold )"
# Variables that can be set here (ignored for live ebuilds)
@@ -265,6 +265,11 @@ src_configure() {
# avoid automagic dependency on (currently prefix) systems
# systems with debuginfod library, bug #754753
--without-debuginfod
+
+ # Allow user to opt into CET for host libraries.
+ # Ideally we would like automagic-or-disabled here.
+ # But the check does not quite work on i686: bug #760926.
+ $(use_enable cet)
)
echo ./configure "${myconf[@]}"
"${S}"/configure "${myconf[@]}" || die
diff --git a/sys-devel/binutils/metadata.xml b/sys-devel/binutils/metadata.xml
index 66f4f23df42b..165a135caf69 100644
--- a/sys-devel/binutils/metadata.xml
+++ b/sys-devel/binutils/metadata.xml
@@ -6,6 +6,7 @@
<name>Gentoo Toolchain Project</name>
</maintainer>
<use>
+ <flag name="cet">Enable Intel Control-flow Enforcement Technology.</flag>
<flag name="default-gold">Set ld to point to ld.gold instead of ld.bfd</flag>
<flag name="gold">Build ld.gold linker</flag>
<flag name="plugins">Enable plugin support in tools</flag>