You are viewing a plain text version of this content. The canonical link for it is here.
Posted to users@subversion.apache.org by "Daniel Richard G." <sk...@iSKUNK.ORG> on 2013/08/15 21:08:48 UTC
[BUG] "-std=c90" passed to non-GCC compilers
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@iSKUNK.ORG
My ASCII-art .sig got a bad case of Times New Roman.
Re: [BUG] "-std=c90" passed to non-GCC compilers
Posted by Branko Čibej <br...@wandisco.com>.
On 15.08.2013 21:08, Daniel Richard G. wrote:
> 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,
Indeed it does so assume ...
> 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?
Clearly it should. I was kind of hoping that wouldn't be necessary, but
compilers differ too much in how they handle unknown options. Note that
we already have a workaround for clang for the same issue, but I doubt
we can rely on a similar workaround for Sun CC (and all the other myriad
compilers out there).
Thanks for the report, I'll look into fixing this.
-- Brane
--
Branko Čibej | Director of Subversion
WANdisco // Non-Stop Data
e. brane@wandisco.com