[Help-gnutls] Re: duplicate symbols complaint on Mac OS X 10.5.2
Simon Josefsson
simon at josefsson.org
Thu Mar 20 10:47:31 CET 2008
ludo at gnu.org (Ludovic Courtès) writes:
> Hello,
>
> David Reiser <dbreiser at gmail.com> writes:
>
>> cc1: error: unrecognized command line option "-fgnu89-inline"
>
> Damn it, I just noticed that this option appeared in GCC 4.1.3 [0]. The
> attached patch (applied to `master') fixes it (Simon: can you apply it
> to other branches as well, if needed?).
Thanks. I haven't branched off gnutls_2_4_x yet, fortunately, so there
is nothing for me to do about this.
> BTW, is there any reason why GnuTLS is now compiled in C99 mode? It
> doesn't seem to be explicitly set in `configure.in', so maybe some
> Gnulib module requires it somehow?
Yeah, gnulib calls AC_PROG_CC_STDC, which in modern autoconf enables C99
mode if the compiler supports it. The test looks like:
checking for gcc option to accept ISO C99... -std=gnu99
checking for gcc -std=gnu99 option to accept ISO Standard C... (cached) -std=gnu99
Anyway, I don't see any harm in setting the compiler in C99 mode if the
compiler supports it. GnuTLS optionally use several C99 features, such
as __func__, CPP macros with flexible number of parameters, stdbool.h.
If the compiler doesn't supports those, we'll disable those features or
use our gnulib-workarounds, which seems sub-optimal. We want our code
to work with C99.
I still don't see how this problem occur though. Exactly how is the
gmpz_abs symbol pulled into guile/src/*.o files? If gmpz_abs is inline
in gmp.h, should that be inlined into the guile code? Does setting the
compiler in gnu99 mode also set the linker in a different mode, that
causes this problem?
David, could you try build GnuTLS and passing ./configure the parameter
'ac_cv_prog_cc_c99=no'? Make sure configure output looks like:
checking for gcc option to accept ISO C99... (cached) unsupported
/Simon
More information about the Gnutls-help
mailing list