Skip to content

Commit a0ff123

Browse files
committed
sys-devel/gcc-14.2.1_p20241221: fix compilation with libintl-0.23
Closes: https://bugs.gentoo.org/946500 Signed-off-by: Fabian Groffen <[email protected]>
1 parent 4118d44 commit a0ff123

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
libcpp/system.h: remove setlocale override
2+
3+
This is non-upstreamable as is, it seems the configure check for
4+
HAVE_SETLOCALE is missing, but since it comes from libintl.h not sure
5+
how trivial this is (needs gettext macros).
6+
7+
In Prefix setlocale is always present, either via the libc, or libintl.
8+
So we don't need to dummy it. Doing so results in problems with
9+
libintl-0.23, which is included right after dummifying.
10+
11+
Bug: https://bugs.gentoo.org/946500
12+
13+
--- a/libcpp/system.h
14+
+++ b/libcpp/system.h
15+
@@ -271,10 +271,6 @@
16+
# include <langinfo.h>
17+
#endif
18+
19+
-#ifndef HAVE_SETLOCALE
20+
-# define setlocale(category, locale) (locale)
21+
-#endif
22+
-
23+
#ifdef ENABLE_NLS
24+
#include <libintl.h>
25+
#else

sys-devel/gcc/gcc-14.2.1_p20241221.ebuild

+3
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,9 @@ src_prepare() {
5050
# run as with - on pipe (for Clang 16)
5151
eapply "${FILESDIR}"/${PN}-14.2.0-darwin-as-dash-pipe.patch
5252

53+
# fix build with libintl-0.23
54+
eapply "${FILESDIR}"/${PN}-14.2.0-libintl-setlocale.patch
55+
5356
# make sure 64-bits native targets don't screw up the linker paths
5457
eapply "${FILESDIR}"/gcc-12-no-libs-for-startfile.patch
5558

0 commit comments

Comments
 (0)