[Pixman] [PATCH] pixman-private: include <float.h> only in C code

Oded Gabbay oded.gabbay at gmail.com
Sun Jan 31 06:16:36 PST 2016


On Sun, Jan 31, 2016 at 4:16 PM, Oded Gabbay <oded.gabbay at gmail.com> wrote:
> On Wed, Jan 20, 2016 at 8:34 AM, Siarhei Siamashka
> <siarhei.siamashka at gmail.com> wrote:
>> On Sun, 17 Jan 2016 15:22:50 +0100
>> Thomas Petazzoni <thomas.petazzoni at free-electrons.com> wrote:
>>
>>> <float.h> is included unconditionally by pixman-private.h, which in
>>> turn gets included by assembler files. Unfortunately, with certain C
>>> libraries (like the musl C library), <float.h> cannot be included in
>>> assembler files:
>>>
>>>   CCLD     libpixman-arm-simd.la
>>> /home/test/buildroot/output/host/usr/arm-buildroot-linux-musleabihf/sysroot/usr/include/float.h: Assembler messages:
>>> /home/test/buildroot/output/host/usr/arm-buildroot-linux-musleabihf/sysroot/usr/include/float.h:8: Error: bad instruction `int __flt_rounds(void)'
>>> /home/test/buildroot/output/host/usr/arm-buildroot-linux-musleabihf/sysroot/usr/include/float.h: Assembler messages:
>>> /home/test/buildroot/output/host/usr/arm-buildroot-linux-musleabihf/sysroot/usr/include/float.h:8: Error: bad instruction `int __flt_rounds(void)'
>>>
>>> It turns out however that <float.h> is not needed by assembly files,
>>> so we move its inclusion within the #ifndef __ASSEMBLER__ condition,
>>> which solves the problem.
>>>
>>> Signed-off-by: Thomas Petazzoni <thomas.petazzoni at free-electrons.com>
>>> ---
>>>  pixman/pixman-private.h | 3 +--
>>>  1 file changed, 1 insertion(+), 2 deletions(-)
>>>
>>> diff --git a/pixman/pixman-private.h b/pixman/pixman-private.h
>>> index 73108a0..73a5414 100644
>>> --- a/pixman/pixman-private.h
>>> +++ b/pixman/pixman-private.h
>>> @@ -1,5 +1,3 @@
>>> -#include <float.h>
>>> -
>>>  #ifndef PIXMAN_PRIVATE_H
>>>  #define PIXMAN_PRIVATE_H
>>>
>>> @@ -30,6 +28,7 @@
>>>  #include <stdio.h>
>>>  #include <string.h>
>>>  #include <stddef.h>
>>> +#include <float.h>
>>>
>>>  #include "pixman-compiler.h"
>>>
>>
>> Thanks, looks good.
>>
>> Reviewed-by: Siarhei Siamashka <siarhei.siamashka at gmail.com>
>>
>> --
>> Best regards,
>> Siarhei Siamashka
>> _______________________________________________
>> Pixman mailing list
>> Pixman at lists.freedesktop.org
>> http://lists.freedesktop.org/mailman/listinfo/pixman
>
> Pushed to master:
Sorry,

Pushed to master:

      342cbf1..7c6066b  master -> master

Oded


More information about the Pixman mailing list