summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAndreas K. Hüttel <dilfridge@gentoo.org>2018-08-03 22:19:57 +0200
committerAndreas K. Hüttel <dilfridge@gentoo.org>2018-08-03 22:20:44 +0200
commit2695b3da15699bdf40098dd409b32f9d87a9cc5c (patch)
treee96e454926e14503bfbe10f28243ff35411d4643 /sys-libs/glibc/glibc-9999.ebuild
parentprofiles: preemptively mask new glibc useflag cet (diff)
downloadgentoo-2695b3da15699bdf40098dd409b32f9d87a9cc5c.tar.gz
gentoo-2695b3da15699bdf40098dd409b32f9d87a9cc5c.tar.bz2
gentoo-2695b3da15699bdf40098dd409b32f9d87a9cc5c.zip
sys-libs/glibc: Add rudimentary Intel CET support (since glibc-2.29)
Before unmasking this flag we still need to add checks for binutils >=2.29 and gcc >=8 ... Package-Manager: Portage-2.3.44, Repoman-2.3.10
Diffstat (limited to 'sys-libs/glibc/glibc-9999.ebuild')
-rw-r--r--sys-libs/glibc/glibc-9999.ebuild8
1 files changed, 7 insertions, 1 deletions
diff --git a/sys-libs/glibc/glibc-9999.ebuild b/sys-libs/glibc/glibc-9999.ebuild
index f51a7785067f..82232b67b6dd 100644
--- a/sys-libs/glibc/glibc-9999.ebuild
+++ b/sys-libs/glibc/glibc-9999.ebuild
@@ -33,7 +33,7 @@ PATCH_VER=7
SRC_URI+=" https://dev.gentoo.org/~dilfridge/distfiles/${P}-patches-${PATCH_VER}.tar.bz2"
SRC_URI+=" multilib? ( https://dev.gentoo.org/~dilfridge/distfiles/gcc-multilib-bootstrap-${GCC_BOOTSTRAP_VER}.tar.xz )"
-IUSE="audit caps compile-locales doc gd hardened headers-only +multiarch multilib nscd profile selinux suid systemtap test vanilla"
+IUSE="audit caps cet compile-locales doc gd hardened headers-only +multiarch multilib nscd profile selinux suid systemtap test vanilla"
# Minimum kernel version that glibc requires
MIN_KERN_VER="3.2.0"
@@ -841,6 +841,12 @@ glibc_do_configure() {
*) myconf+=( libc_cv_ld_gnu_indirect_function=no ) ;;
esac
+ # Enable Intel Control-flow Enforcement Technology on amd64 if requested
+ case ${CTARGET} in
+ x86_64-*) myconf+=( $(use_enable cet) ) ;;
+ *) ;;
+ esac
+
[[ $(tc-is-softfloat) == "yes" ]] && myconf+=( --without-fp )
myconf+=( --enable-kernel=${MIN_KERN_VER} )