[svn.haxx.se] · SVN Dev · SVN Users · SVN Org · TSVN Dev · TSVN Users · Subclipse Dev · Subclipse Users · this month's index

[BUG] "-std=c90" passed to non-GCC compilers

From: Daniel Richard G. <skunk_at_iSKUNK.ORG>
Date: Thu, 15 Aug 2013 15:08:48 -0400

I am building Subversion 1.8.1 on Solaris 10 on AMD64, using the vendor
compiler. All of the compile lines produce a warning from the compiler:

/bin/bash /tmp/subversion-build/libtool --tag=CC --silent --mode=compile cc -std=c90 -D__EXTENSIONS__ -D_REENTRANT -DSOLARIS2=10 -D_POSIX_PTHREAD_SEMANTICS [...]
cc: Warning: illegal option -d=c90

The -std=c90 flag appears to be added by the SVN_CC_MODE_SETUP() macro
in build/ac-macros/compiler.m4. This then uses SVN_CFLAGS_ADD_IFELSE(),
which checks to see if the compiler accepts a specified flag. This macro
assumes that the compiler will throw an error if it doesn't recognize a
flag, which unfortunately does not hold true in the case of the Sun
compiler and this -std= flag.

According to "cc -flags", -s is "Strip symbol table from the executable
file". The cc(1) man page states "cc recognizes -a, -e, -r, -t, -u, and
-z and passes these options and their arguments to ld. cc also passes
any unrecognized options to ld with a warning."

Perhaps the macro should check the value of $GCC before testing
this flag?

--Daniel

P.S.: Please Cc: any replies, as I am not subscribed to this list.

-- 
Daniel Richard G. || skunk_at_iSKUNK.ORG
My ASCII-art .sig got a bad case of Times New Roman.
Received on 2013-08-15 21:09:45 CEST

This is an archived mail posted to the Subversion Users mailing list.

This site is subject to the Apache Privacy Policy and the Apache Public Forum Archive Policy.