Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

xorg-3.eclass: strip -fno-plt from *FLAGS #20166

Closed
wants to merge 2 commits into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
15 changes: 10 additions & 5 deletions eclass/xorg-3.eclass
Expand Up @@ -48,6 +48,10 @@ fi
# before inheriting this eclass.
: ${XORG_MULTILIB:="no"}

# Due to changes to autotools.eclass, we need to define some variables before inheriting
WANT_AUTOCONF="latest"
WANT_AUTOMAKE="latest"

# we need to inherit autotools first to get the deps
inherit autotools libtool multilib toolchain-funcs flag-o-matic \
${FONT_ECLASS} ${GIT_ECLASS}
Expand Down Expand Up @@ -142,8 +146,6 @@ if [[ ${PN} != util-macros ]] ; then
# Required even by xorg-server
[[ ${PN} == "font-util" ]] || EAUTORECONF_DEPEND+=" >=media-fonts/font-util-1.2.0"
fi
WANT_AUTOCONF="latest"
WANT_AUTOMAKE="latest"
for arch in ${XORG_EAUTORECONF_ARCHES}; do
EAUTORECONF_DEPENDS+=" ${arch}? ( ${EAUTORECONF_DEPEND} )"
done
Expand Down Expand Up @@ -334,9 +336,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
Expand Down