summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFabian Groffen <grobian@gentoo.org>2024-12-29 14:32:15 +0100
committerFabian Groffen <grobian@gentoo.org>2024-12-29 14:32:15 +0100
commita0ff1230984dd1d740c823eead6a091777d3d0fa (patch)
treee6e6aa3b990e01055ab9fab01776f0c3b7e57951
parentsys-devel/gcc-14.2.1_p20241221: version bump (diff)
downloadprefix-master.tar.gz
prefix-master.tar.bz2
prefix-master.zip
sys-devel/gcc-14.2.1_p20241221: fix compilation with libintl-0.23HEADmaster
Closes: https://bugs.gentoo.org/946500 Signed-off-by: Fabian Groffen <grobian@gentoo.org>
-rw-r--r--sys-devel/gcc/files/gcc-14.2.0-libintl-setlocale.patch25
-rw-r--r--sys-devel/gcc/gcc-14.2.1_p20241221.ebuild3
2 files changed, 28 insertions, 0 deletions
diff --git a/sys-devel/gcc/files/gcc-14.2.0-libintl-setlocale.patch b/sys-devel/gcc/files/gcc-14.2.0-libintl-setlocale.patch
new file mode 100644
index 0000000000..2962b677af
--- /dev/null
+++ b/sys-devel/gcc/files/gcc-14.2.0-libintl-setlocale.patch
@@ -0,0 +1,25 @@
+libcpp/system.h: remove setlocale override
+
+This is non-upstreamable as is, it seems the configure check for
+HAVE_SETLOCALE is missing, but since it comes from libintl.h not sure
+how trivial this is (needs gettext macros).
+
+In Prefix setlocale is always present, either via the libc, or libintl.
+So we don't need to dummy it. Doing so results in problems with
+libintl-0.23, which is included right after dummifying.
+
+Bug: https://bugs.gentoo.org/946500
+
+--- a/libcpp/system.h
++++ b/libcpp/system.h
+@@ -271,10 +271,6 @@
+ # include <langinfo.h>
+ #endif
+
+-#ifndef HAVE_SETLOCALE
+-# define setlocale(category, locale) (locale)
+-#endif
+-
+ #ifdef ENABLE_NLS
+ #include <libintl.h>
+ #else
diff --git a/sys-devel/gcc/gcc-14.2.1_p20241221.ebuild b/sys-devel/gcc/gcc-14.2.1_p20241221.ebuild
index e99242970c..a070196cdd 100644
--- a/sys-devel/gcc/gcc-14.2.1_p20241221.ebuild
+++ b/sys-devel/gcc/gcc-14.2.1_p20241221.ebuild
@@ -50,6 +50,9 @@ src_prepare() {
# run as with - on pipe (for Clang 16)
eapply "${FILESDIR}"/${PN}-14.2.0-darwin-as-dash-pipe.patch
+ # fix build with libintl-0.23
+ eapply "${FILESDIR}"/${PN}-14.2.0-libintl-setlocale.patch
+
# make sure 64-bits native targets don't screw up the linker paths
eapply "${FILESDIR}"/gcc-12-no-libs-for-startfile.patch