Index: gcc/config/i386/sol2.h --- gcc/config/i386/sol2.h.orig 2025-04-25 10:18:00.000000000 +0200 +++ gcc/config/i386/sol2.h 2025-04-25 16:12:46.398095000 +0200 @@ -140,6 +140,9 @@ } while (0) #endif +#undef DEFAULT_PCC_STRUCT_RETURN +#define DEFAULT_PCC_STRUCT_RETURN 1 + /* The Solaris assembler wants a .local for non-exported aliases. */ #define ASM_OUTPUT_DEF_FROM_DECLS(FILE, DECL, TARGET) \ do { \ Index: gcc/config/sol2.h --- gcc/config/sol2.h.orig 2025-04-25 10:18:00.000000000 +0200 +++ gcc/config/sol2.h 2025-04-25 16:12:46.398219000 +0200 @@ -401,9 +401,9 @@ "%{h*} %{v:-V} \ %{!shared:%{!static:%{rdynamic: " RDYNAMIC_SPEC "}}} \ %{static:-dn -Bstatic} \ - %{shared:-G -dy %{!mimpure-text:-z text}} " \ + %{shared:-G -dy} " \ LINK_LIBGCC_MAPFILE_SPEC LINK_CLEARCAP_SPEC " \ - %{symbolic:-Bsymbolic -G -dy -z text} \ + %{symbolic:-Bsymbolic -G -dy} \ %(link_arch) \ %{Qy:} %{!Qn:-Qy}" Index: gcc/system.h --- gcc/system.h.orig 2025-04-25 10:18:01.000000000 +0200 +++ gcc/system.h 2025-04-25 16:12:46.398397000 +0200 @@ -94,7 +94,7 @@ # undef getchar # define getchar() getchar_unlocked () # endif -# ifdef HAVE_FPUTC_UNLOCKED +# if defined(HAVE_FPUTC_UNLOCKED) && !defined(__FreeBSD__) # undef fputc # define fputc(C, Stream) fputc_unlocked (C, Stream) # endif Index: libcpp/internal.h --- libcpp/internal.h.orig 2025-04-25 10:18:04.000000000 +0200 +++ libcpp/internal.h 2025-04-25 16:12:46.398533000 +0200 @@ -29,6 +29,7 @@ #if HAVE_ICONV #include #else +#undef HAVE_ICONV #define HAVE_ICONV 0 typedef int iconv_t; /* dummy */ #endif Index: libcpp/system.h --- libcpp/system.h.orig 2025-04-25 10:18:04.000000000 +0200 +++ libcpp/system.h 2025-04-25 16:12:46.398636000 +0200 @@ -90,7 +90,7 @@ # undef getchar # define getchar() getchar_unlocked () # endif -# ifdef HAVE_FPUTC_UNLOCKED +# if defined(HAVE_FPUTC_UNLOCKED) && !defined(__FreeBSD__) # undef fputc # define fputc(C, Stream) fputc_unlocked (C, Stream) # endif