Skip to content

Commit

Permalink
sys-devel/gcc-14.2.1_p20241221: fix compilation with libintl-0.23
Browse files Browse the repository at this point in the history
Closes: https://bugs.gentoo.org/946500
Signed-off-by: Fabian Groffen <[email protected]>
  • Loading branch information
grobian committed Dec 29, 2024
1 parent 4118d44 commit a0ff123
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 0 deletions.
25 changes: 25 additions & 0 deletions sys-devel/gcc/files/gcc-14.2.0-libintl-setlocale.patch
Original file line number Diff line number Diff line change
@@ -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
3 changes: 3 additions & 0 deletions sys-devel/gcc/gcc-14.2.1_p20241221.ebuild
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down

0 comments on commit a0ff123

Please sign in to comment.