In configure.as we attempt to add compiler flags by detecting whether or
not the compiler accepts them.  It's unreliable on Solaris:

    SVN_CFLAGS_ADD_IFELSE([-fno-inline])
    SVN_CFLAGS_ADD_IFELSE([-fno-omit-frame-pointer])

$ touch x.c
$ cc -c -fno-omit-frame-pointer x.c
cc: Warning: Option -fomit-frame-pointer passed to ld, if ld is invoked, 
ignored otherwise
"x.c", line 1: warning: empty translation unit
$ echo $?
0

I think that counts as working as far as SVN_CFLAGS_ADD_IFELSE is
concerned, these flags certainly get added.

However adding these flags causes the compiler to fail to link:

$ echo 'int main(){}' > x.c
$ cc -fomit-frame-pointer x.c
cc: Warning: Option -fomit-frame-pointer passed to ld, if ld is invoked, 
ignored otherwise
ld: fatal: option -f and building a dynamic executable are incompatible
ld: fatal: Flags processing errors

So we have to get SVN_CFLAGS_ADD_IFELSE to recognise that these flags
should not be added.  I suppose we could change the AC_COMPILE_IFELSE to
an AC_LINK_IFELSE.

-- 
Philip Martin | Subversion Committer
WANdisco // *Non-Stop Data*

Reply via email to