[OE-core] [PATCH 2/2] libx11: fix nativesdk build on older distros

McClintock Matthew-B29882 B29882 at freescale.com
Wed Sep 26 17:55:40 UTC 2012


On Wed, Sep 26, 2012 at 4:30 AM, Burton, Ross <ross.burton at intel.com> wrote:
> On 26 September 2012 00:11, Daniel Stone <daniel at fooishbar.org> wrote:
>>> The best fix is to just #define _GNU_SOURCE at the top of makekeys
>>> then, and push that upstream (mail patch to xorg-devel at lists.x.org).
>>
>> Actually, it isn't, as that breaks non-glibc badly.  glibc takes
>> _GNU_SOURCE to mean 'please add useful GNU extensions to this POSIX
>> wasteland', whereas BSD and/or Solaris take it to mean 'please make
>> this only GNU and don't use any other extensions at all'.  So we have
>> to do whatever AC_USE_SYSTEM_EXTENSIONS does, because that really is
>> the only thing that actually works.
>
> What do you mean non-glibc? :)
>
> Ignoring Minix as a build host (I think that's reasonable),
> AC_USE_SYSTEM_EXTENSIONS  defines _ALL_SOURCE _GNU_SOURCE
> _POSIX_PTHREAD_SEMANTICS _TANDEM_SOURCE, and does a compile-time
> sanity test of __EXTENSIONS__ (because it's possible that some
> combination of these defines make the system headers unusable on
> Solaris).
>
> This is annoying.  How about for oe-core we patch in -D_GNU_SOURCE to
> src/util/Makefile.am's CPPFLAGS definition and I'll discuss with
> xorg-dev for a proper fix?

Would this be OK for now in libx11.inc?

-export CFLAGS_FOR_BUILD = "${BUILD_CFLAGS}"
+export CFLAGS_FOR_BUILD = "${BUILD_CFLAGS} -D_GNU_SOURCE"

-M




More information about the Openembedded-core mailing list