[MPlayer-cvslog] r25535 - trunk/configure
Uoti Urpala
uoti.urpala at pp1.inet.fi
Sat Dec 29 17:27:43 CET 2007
On Sat, 2007-12-29 at 11:08 -0500, Rich Felker wrote:
> On Sat, Dec 29, 2007 at 09:30:15AM +0100, Jindrich Makovicka wrote:
> > It enables C99 features and bunch of other stuff,
> > see /usr/include/features.h. -D_ISOC99_SOURCE could be used as well in
> > this case.
> >
> > With newer GCCs, -std=c99 is preferred.
For MPlayer we probably want -std=gnu99 instead. -std=c99 means strict
standard mode without compiler extensions like "asm", which also doesn't
work well with some current kernel headers (at least).
> Am I the only one who finds it really annoying that gcc/glibc chooses
> to be "broken by default" and requires special options to conform to
> modern standards? It should be legacy applications which conflict with
> standards that need the special CFLAGS, not modern correct apps. Are
> developers of C99 apps expected to provide custom CFLAGS for each
> combination of compiler and libc?? This is O(k*n*m) where k is the
> number of apps, n is the number of compilers, and m is the number of
> libcs...
>
> Does posix getconf(1) work for getting the correct CFLAGS? Or do we
> need to hard-code this brain damage in configure?
POSIX specifies the compiler name "c99" which is expected to compile in
C99 mode. We could try c99 before cc as a "generic" compiler name.
Unfortunately at least on Debian c99 invokes gcc in the strict standard
mode -std=c99 instead of -std=gnu99, so configure should still test for
gcc first and add a "-std=gnu99" flag when it is used.
More information about the MPlayer-cvslog
mailing list