[MPlayer-cvslog] r36022 - trunk/configure

Diego Biurrun diego at biurrun.de
Fri Mar 22 18:55:03 CET 2013


On Fri, Mar 22, 2013 at 02:45:20AM +0200, Ivan Kalvachev wrote:
> On 3/20/13, Diego Biurrun <diego at biurrun.de> wrote:
> > On Wed, Mar 20, 2013 at 01:44:22PM +0100, Reimar Döffinger wrote:
> >> diego <subversion at mplayerhq.hu> wrote:
> >> >
> >> >Log:
> >> >configure: Only add _POSIX_C_SOURCE and _XOPEN_SOURCE to CFLAGS for
> >> >glibc.
> >>
> >> Could you please explain that a bit an add comments?
> >
> > Oops, I wanted to amend the commit and add a small comment to this
> > yesterday,
> > but I forgot before pushing today when I saw the Cygwin/MinGW tests had
> > run successfully.
> >
> >> Because I am rather inclined to agree with Ivan that this is a silly,
> >> messy hack. To my knowledge _POSIX_C_SOURCE is in no way specific
> >> to glibc and should be used to indicate that we want to use POSIX
> >> features. To me it seems that with this change it would be reasonable
> >> to expect compilation to fail on all non-glibc systems with pedantic
> >> headers (which probably is an empty set though).
> >
> > The way different libcs handle CPPFLAGS is not compatible, so trying to
> > reuse flags is bound to fail.  FreeBSD for example enables everything by
> > default and POSIX (or whatever) flags trigger limitations in the APIs
> > that are exposed.  For glibc it is the other way around.
> >
> > I tried for a very long time to find a set of common flags to satisfy
> > all system libcs, but that is just a fool's errand.  There will always
> > be one system that chokes on a flag that another requires.
> 
> This still holds true, even if you split it on glibc and everything else.

You misread.  The wrong approach is trying to find a set of flags that
all libcs can handle.  The right approach is setting individual flags
for each libc.  I did this for glibc.

> > What we did before my set of commits - setting libc-specific flags
> > depending on the compiler that is detected is just completely wrong.
> 
> There is a user on irc who is having problem, linked to r36009.
> ( Linux Mint Elyssa,  glibc 2.7.  gcc 4.2.4 )
> 
> The problem is related to our "osdep/strsep.h". It seems that the
> configure detection fails, but later when the compilation begins, it
> conflicts with the system strsep() macro.
> 
> It turned out that SDL adds -D_GNU_SOURCE to the cflags, this
> revealing strsep() . Since SDL test is after libc tests, it is not
> discovered at configure time.

strsep requires _BSD_SOURCE.  Go ahead, fix it.

Diego


More information about the MPlayer-cvslog mailing list