diff --git a/sys-kernel/hurd/hurd-0.9_p20251029.ebuild b/sys-kernel/hurd/hurd-0.9_p20251029.ebuild index 1562e9113f91d..b42a14cdb1428 100644 --- a/sys-kernel/hurd/hurd-0.9_p20251029.ebuild +++ b/sys-kernel/hurd/hurd-0.9_p20251029.ebuild @@ -29,9 +29,9 @@ fi LICENSE="GPL-2 BSD-2" SLOT="0" if is_crosspkg ; then - IUSE="headers-only" + IUSE="custom-cflags headers-only" else - IUSE="headers-only ncurses xkb" + IUSE="custom-cflags headers-only ncurses xkb" fi [[ ${PV} != 9999 ]] && KEYWORDS="~amd64 ~x86" @@ -80,6 +80,11 @@ src_configure() { --host=${CTARGET} ) + if ! use custom-cflags ; then + strip-flags + filter-lto + fi + append-flags -Wl,--no-error-rwx-segments -Wl,--no-error-execstack -Wl,-z,notext if use headers-only ; then diff --git a/sys-kernel/hurd/hurd-9999.ebuild b/sys-kernel/hurd/hurd-9999.ebuild index dd314f61f1691..ee8043092cd16 100644 --- a/sys-kernel/hurd/hurd-9999.ebuild +++ b/sys-kernel/hurd/hurd-9999.ebuild @@ -29,9 +29,9 @@ fi LICENSE="GPL-2 BSD-2" SLOT="0" if is_crosspkg ; then - IUSE="headers-only" + IUSE="custom-cflags headers-only" else - IUSE="headers-only ncurses xkb" + IUSE="custom-cflags headers-only ncurses xkb" fi [[ ${PV} != 9999 ]] && KEYWORDS="~amd64 ~x86" @@ -76,6 +76,11 @@ src_configure() { --host=${CTARGET} ) + if ! use custom-cflags ; then + strip-flags + filter-lto + fi + append-flags -Wl,--no-error-rwx-segments -Wl,--no-error-execstack -Wl,-z,notext if use headers-only ; then