# HG changeset patch # Parent 85f8b72d36b77c99997c044e6383f825596017ad Fix use of Solaris values-Xc.o (PR target/40411) diff --git a/gcc/config/sol2.h b/gcc/config/sol2.h --- a/gcc/config/sol2.h +++ b/gcc/config/sol2.h @@ -180,7 +180,9 @@ along with GCC; see the file COPYING3. The values-X[ac].o objects set the variable _lib_version. The Studio C compilers use values-Xc.o with either -Xc or (since Studio 12.6) -pedantic to select strictly conformant ISO C behaviour, otherwise - values-Xa.o. + values-Xa.o. Since -pedantic is a diagnostic option only in GCC, we + need to specifiy the -std=c* options and -std=iso9899:199409. -ansi is + omitted from that list to avoid influencing C++. The values-xpg[46].o objects define either or both __xpg[46] variables, selecting XPG4 mode (__xpg4) and conforming C99/SUSv3 behavior (__xpg6). @@ -195,7 +197,7 @@ along with GCC; see the file COPYING3. #undef STARTFILE_ARCH_SPEC #define STARTFILE_ARCH_SPEC \ "%{!shared:%{!symbolic: \ - %{pedantic:values-Xc.o%s; :values-Xa.o%s} \ + %{std=c9*|std=iso9899\\:199409|std=c1*:values-Xc.o%s; :values-Xa.o%s} \ %{std=c90|std=gnu90:values-xpg4.o%s; :values-xpg6.o%s}}}" #if defined(HAVE_LD_PIE) && defined(HAVE_SOLARIS_CRTS)