diff options
author | Niklāvs Koļesņikovs <89q1r14hd@relay.firefox.com> | 2021-03-28 15:14:45 +0300 |
---|---|---|
committer | Sam James <sam@gentoo.org> | 2022-06-18 03:45:14 +0100 |
commit | 3cc0092c3e6ce8988912fce260932639e5554d17 (patch) | |
tree | 968cddde52d9cb08840279066ffca7d162a85a7b /eclass/xorg-3.eclass | |
parent | dev-vcs/python-gitlab: add some missing test deps (diff) | |
download | gentoo-3cc0092c3e6ce8988912fce260932639e5554d17.tar.gz gentoo-3cc0092c3e6ce8988912fce260932639e5554d17.tar.bz2 gentoo-3cc0092c3e6ce8988912fce260932639e5554d17.zip |
xorg-3.eclass: strip -fno-plt from *FLAGS
As discussed in #778494, the GCC flag -fno-plt will break lazy
binding, which appears to still be necessary for Xorg. Stripping the
offending flag out is the next best solution for reliable user
experience on Gentoo.
Closes: https://github.com/gentoo/gentoo/pull/20166
Closes: https://bugs.gentoo.org/778494
Signed-off-by: Niklāvs Koļesņikovs <89q1r14hd@relay.firefox.com>
Signed-off-by: Sam James <sam@gentoo.org>
Diffstat (limited to 'eclass/xorg-3.eclass')
-rw-r--r-- | eclass/xorg-3.eclass | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/eclass/xorg-3.eclass b/eclass/xorg-3.eclass index 378a7b8c4103..d7ff91417caf 100644 --- a/eclass/xorg-3.eclass +++ b/eclass/xorg-3.eclass @@ -337,9 +337,12 @@ xorg-3_flags_setup() { # Win32 require special define [[ ${CHOST} == *-winnt* ]] && append-cppflags -DWIN32 -D__STDC__ - # hardened ldflags - [[ ${PN} == xorg-server || ${PN} == xf86-video-* || ${PN} == xf86-input-* ]] \ - && append-ldflags -Wl,-z,lazy + + # Hardened flags break module autoloading et al (also fixes #778494) + if [[ ${PN} == xorg-server || ${PN} == xf86-video-* || ${PN} == xf86-input-* ]]; then + filter-flags -fno-plt + append-ldflags -Wl,-z,lazy + fi # Quite few libraries fail on runtime without these: if has static-libs ${IUSE//+}; then |