commit:     0364868c119730d972ce101909856db7385513b6
Author:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
AuthorDate: Tue May 19 22:02:16 2020 +0000
Commit:     Sergei Trofimovich <slyfox <AT> gentoo <DOT> org>
CommitDate: Tue May 19 22:02:16 2020 +0000
URL:        https://gitweb.gentoo.org/proj/gcc-patches.git/commit/?id=0364868c

10.1.0: Trick libintl not to use '_INTL_REDIRECT_ASM' mode as it's
incompatible with LTO builds.

glibc does not normally use libintl implementations and uses
it's own primitives. But musl ond others do fall back to libintl.

Reported-by: Andrew Savchenko
Bug: https://bugs.gentoo.org/723370
Bug: https://gcc.gnu.org/PR95194
Signed-off-by: Sergei Trofimovich <slyfox <AT> gentoo.org>

 .../gentoo/30_all_lto-intl-workaround-PR95194.patch  | 20 ++++++++++++++++++++
 10.1.0/gentoo/README.history                         |  1 +
 2 files changed, 21 insertions(+)

diff --git a/10.1.0/gentoo/30_all_lto-intl-workaround-PR95194.patch 
b/10.1.0/gentoo/30_all_lto-intl-workaround-PR95194.patch
new file mode 100644
index 0000000..9613216
--- /dev/null
+++ b/10.1.0/gentoo/30_all_lto-intl-workaround-PR95194.patch
@@ -0,0 +1,20 @@
+Trick libintl not to use '_INTL_REDIRECT_ASM' mode as it's
+incompatible with LTO builds.
+
+glibc does not normally use libintl implementations and uses
+it's own primitives. But musl ond others do fall back to libintl.
+
+Reported-by: Andrew Savchenko
+Bug: https://bugs.gentoo.org/723370
+Bug: https://gcc.gnu.org/PR95194
+--- a/intl/libgnuintl.h
++++ b/intl/libgnuintl.h
+@@ -93,7 +93,7 @@ extern "C" {
+    If he doesn't, we choose the method.  A third possible method is
+    _INTL_REDIRECT_ASM, supported only by GCC.  */
+ #if !(defined _INTL_REDIRECT_INLINE || defined _INTL_REDIRECT_MACROS)
+-# if __GNUC__ >= 2 && !defined __APPLE_CC__ && (defined __STDC__ || defined 
__cplusplus)
++# if __GNUC__ >= 2 && !defined __APPLE_CC__ && (defined __STDC__ || defined 
__cplusplus) && USE_ASM_ALIASES_THAT_BREAK_LTO
+ #  define _INTL_REDIRECT_ASM
+ # else
+ #  ifdef __cplusplus

diff --git a/10.1.0/gentoo/README.history b/10.1.0/gentoo/README.history
index 0ed3a9d..d7a8c51 100644
--- a/10.1.0/gentoo/README.history
+++ b/10.1.0/gentoo/README.history
@@ -1,5 +1,6 @@
 2              TODO
        + 29_all_fix-float-hang-PR95118.patch
+       + 30_all_lto-intl-workaround-PR95194.patch
 
 1              05 May 2020
        + 01_all_default-fortify-source.patch

Reply via email to