diff options
author | Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> | 2018-01-30 21:18:40 +0000 |
---|---|---|
committer | Rainer Orth <ro@gcc.gnu.org> | 2018-01-30 21:18:40 +0000 |
commit | f58d41ff24cd35c9a351c2d805c869552576baae (patch) | |
tree | a53e08caeffeb0120d837ca840f7a113ca9e7094 /gcc | |
parent | 3d9436982577e8436dd25d9957814affde81f691 (diff) | |
download | gcc-f58d41ff24cd35c9a351c2d805c869552576baae.zip gcc-f58d41ff24cd35c9a351c2d805c869552576baae.tar.gz gcc-f58d41ff24cd35c9a351c2d805c869552576baae.tar.bz2 |
Fix use of Solaris values-Xc.o (PR target/40411)
PR target/40411
* config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*,
-std=iso9899:199409 instead of -pedantic to select values-Xc.o.
From-SVN: r257209
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 6 | ||||
-rw-r--r-- | gcc/config/sol2.h | 7 |
2 files changed, 11 insertions, 2 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 56a1649..0d2f6da 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,9 @@ +2018-01-30 Rainer Orth <ro@CeBiTec.Uni-Bielefeld.DE> + + PR target/40411 + * config/sol2.h (STARTFILE_ARCH_SPEC): Use -std=c*, + -std=iso9899:199409 instead of -pedantic to select values-Xc.o. + 2018-01-30 Vladimir Makarov <vmakarov@redhat.com> PR target/84112 diff --git a/gcc/config/sol2.h b/gcc/config/sol2.h index f296cf5..ec4b111 100644 --- a/gcc/config/sol2.h +++ b/gcc/config/sol2.h @@ -180,7 +180,10 @@ along with GCC; see the file COPYING3. If not see 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. We + traditionally include -ansi, which affects C and C++, and also -std=c++* + for consistency. 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 +198,7 @@ along with GCC; see the file COPYING3. If not see #undef STARTFILE_ARCH_SPEC #define STARTFILE_ARCH_SPEC \ "%{!shared:%{!symbolic: \ - %{pedantic:values-Xc.o%s; :values-Xa.o%s} \ + %{ansi|std=c*|std=iso9899\\:199409: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) |