[Mesa-dev] [PATCH 1/1] Fix endianess detection with musl-based toolchains

Emil Velikov emil.l.velikov at gmail.com
Tue Nov 8 14:48:25 UTC 2016


On 5 November 2016 at 01:55, Jonathan Gray <jsg at jsg.id.au> wrote:
> On Fri, Nov 04, 2016 at 07:53:25PM +0100, Bernd Kuhls wrote:
>> Musl does not define __GLIBC__ and will not provide a __MUSL__ macro:
>> http://wiki.musl-libc.org/wiki/FAQ#Q:_why_is_there_no_MUSL_macro_.3F
>>
>> This patch checks for the presence of endian.h and promotes the result
>> to src/amd/Makefile.addrlib.am which executes the broken build command.
>> Fixes compile errors detected by the autobuilder infrastructure of the
>> buildroot project:
>
> This will break OpenBSD and perhaps other platforms which
> have endian.h that does not define glibc definitions.
>
>From a quick skim on my system glibc provides the non __ prefixed
symbols (BYTE_ORDER and friends) if _DEFAULT_SOURCE is set. The latter
of which being implicitly set though a wide variation (once you get
through the ifdef spaghetti).

Worth checking if the non __ defines are available across the board
and using them ?

-Emil


More information about the mesa-dev mailing list