commit:     c390fa2cb398038e30190e64d6ed41e88db5d5ea
Author:     Mats Lidell <matsl <AT> gentoo <DOT> org>
AuthorDate: Fri Oct 18 20:29:31 2024 +0000
Commit:     Mats Lidell <matsl <AT> gentoo <DOT> org>
CommitDate: Fri Oct 18 20:37:48 2024 +0000
URL:        https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=c390fa2c

app-editors/xemacs: Let compiler driver handle LDFLAGS

Add upstream patch to no longer use XE_PROTECT_LINKER_FLAGS on
LDFLAGS.

Closes: https://bugs.gentoo.org/940327

Signed-off-by: Mats Lidell <matsl <AT> gentoo.org>

 .../xemacs/files/xemacs-21.5.35-linker-flags.patch | 24 ++++++++++++++++++++++
 app-editors/xemacs/xemacs-21.5.35-r4.ebuild        |  1 +
 2 files changed, 25 insertions(+)

diff --git a/app-editors/xemacs/files/xemacs-21.5.35-linker-flags.patch 
b/app-editors/xemacs/files/xemacs-21.5.35-linker-flags.patch
new file mode 100644
index 000000000000..4d95b56608f0
--- /dev/null
+++ b/app-editors/xemacs/files/xemacs-21.5.35-linker-flags.patch
@@ -0,0 +1,24 @@
+changeset:   7521:ce06831b299c
+parent:      7519:fb35ba719d24
+user:        Aidan Kehoe <[email protected]>
+date:        Thu Oct 17 09:01:54 2024 +0100
+summary:     configure.ac: No longer use XE_PROTECT_LINKER_FLAGS on LDFLAGS.
+
+diff -r fb35ba719d24 -r ce06831b299c configure.ac
+--- a/configure.ac     Mon Oct 14 19:18:08 2024 +0100
++++ b/configure.ac     Thu Oct 17 09:01:54 2024 +0100
+@@ -2155,8 +2155,12 @@
+ XE_PROTECT_LINKER_FLAGS(ld_switch_system)
+ XE_PROTECT_LINKER_FLAGS(ld_switch_machine)
+ XE_PROTECT_LINKER_FLAGS(ld_switch_site)
+-XE_PROTECT_LINKER_FLAGS(LDFLAGS)
+ XE_PROTECT_LINKER_FLAGS(ld_call_shared)
++dnl No longer do this for LDFLAGS, since that interacts poorly with link time
++dnl optimization. Unclear if XE_PROTECT_LINKER_FLAGS() is still needed in
++dnl general, it was introduced for GCC versions in the 90s and things have
++dnl changed, but unlikely to be an issue with the other flags. See
++dnl https://bugs.gentoo.org/940327 for a relevant bug report.
+ 
+ dnl Add s&m-determined objects to link line
+ test -n "$objects_machine" && XE_ADD_OBJS($objects_machine)
+

diff --git a/app-editors/xemacs/xemacs-21.5.35-r4.ebuild 
b/app-editors/xemacs/xemacs-21.5.35-r4.ebuild
index 7e74432b1405..766ac26ff39b 100644
--- a/app-editors/xemacs/xemacs-21.5.35-r4.ebuild
+++ b/app-editors/xemacs/xemacs-21.5.35-r4.ebuild
@@ -68,6 +68,7 @@ src_prepare() {
        eapply "${FILESDIR}/${P}-which.patch"
        eapply "${FILESDIR}/${P}-misalignment.patch"
        eapply "${FILESDIR}/${P}-va_args.patch"
+       eapply "${FILESDIR}/${P}-linker-flags.patch"
 
        eapply_user
 

Reply via email to