[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
stdarg: don't put compiler in gnu99 mode by default
From: |
Simon Josefsson |
Subject: |
stdarg: don't put compiler in gnu99 mode by default |
Date: |
Thu, 10 Apr 2008 11:00:27 +0200 |
User-agent: |
Gnus/5.110007 (No Gnus v0.7) Emacs/22.1 (gnu/linux) |
My gnulib-comp.m4 contains, from modules/stdarg:
dnl Some compilers (e.g., AIX 5.3 cc) need to be in c99 mode
dnl for the builtin va_copy to work. With Autoconf 2.60 or later,
dnl AC_PROG_CC_STDC arranges for this. With older Autoconf AC_PROG_CC_STDC
dnl shouldn't hurt, though installers are on their own to set c99 mode.
AC_REQUIRE([AC_PROG_CC_STDC])
This puts the compiler in gnu99 mode with gcc. This causes problems on
Mac OS X if the package (e.g., gnutls) is linked with code that was not
compiled in gnu99 mode, for example GMP or Guile. The problem appears
to be conflicting linker behaviour for 'extern inline' and a problem
with the Mac OS X linker. See:
http://thread.gmane.org/gmane.network.gnutls.general/1061/focus=1136
The current solution in stdarg for the va_copy problem seems ugly to me.
For example, it doesn't test for a missing feature before applying a
workaround. Can't we make the code do a feature-test, so it only puts
the compiler in gnu99 mode if va_copy doesn't work? Or move all this to
a specific 'va_copy' module? Not everyone needs va_copy.
Thanks,
/Simon
- stdarg: don't put compiler in gnu99 mode by default,
Simon Josefsson <=