Index: gcc/config/i386/sol2.h --- gcc/config/i386/sol2.h.orig 2017-11-13 13:38:16.005971000 +0100 +++ gcc/config/i386/sol2.h 2018-07-27 14:50:22.456238000 +0200 @@ -142,6 +142,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 2017-11-21 10:31:12.135035000 +0100 +++ gcc/config/sol2.h 2018-07-27 14:50:22.456433000 +0200 @@ -352,9 +352,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: libcpp/charset.c --- libcpp/charset.c.orig 2017-01-01 13:07:43.905435000 +0100 +++ libcpp/charset.c 2018-07-27 14:50:22.456768000 +0200 @@ -74,6 +74,7 @@ #define iconv_open(x, y) (errno = EINVAL, (iconv_t)-1) #define iconv(a,b,c,d,e) (errno = EINVAL, (size_t)-1) #define iconv_close(x) (void)0 +#undef ICONV_CONST #define ICONV_CONST #endif Index: libcpp/internal.h --- libcpp/internal.h.orig 2017-01-01 13:07:43.905435000 +0100 +++ libcpp/internal.h 2018-07-27 14:50:22.456967000 +0200 @@ -28,6 +28,7 @@ #if HAVE_ICONV #include #else +#undef HAVE_ICONV #define HAVE_ICONV 0 typedef int iconv_t; /* dummy */ #endif