0002-pixman-private-include-float.h-only-in-C-code.patch 1.7 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546
  1. From 2a5b33fe5cb921993573392afac19185e224b49a Mon Sep 17 00:00:00 2001
  2. From: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  3. Date: Sun, 17 Jan 2016 14:14:28 +0100
  4. Subject: [PATCH] pixman-private: include <float.h> only in C code
  5. <float.h> is included unconditionally by pixman-private.h, which in
  6. turn gets included by assembler files. Unfortunately, with certain C
  7. libraries (like the musl C library), <float.h> cannot be included in
  8. assembler files:
  9. CCLD libpixman-arm-simd.la
  10. /home/test/buildroot/output/host/usr/arm-buildroot-linux-musleabihf/sysroot/usr/include/float.h: Assembler messages:
  11. /home/test/buildroot/output/host/usr/arm-buildroot-linux-musleabihf/sysroot/usr/include/float.h:8: Error: bad instruction `int __flt_rounds(void)'
  12. /home/test/buildroot/output/host/usr/arm-buildroot-linux-musleabihf/sysroot/usr/include/float.h: Assembler messages:
  13. /home/test/buildroot/output/host/usr/arm-buildroot-linux-musleabihf/sysroot/usr/include/float.h:8: Error: bad instruction `int __flt_rounds(void)'
  14. It turns out however that <float.h> is not needed by assembly files,
  15. so we move its inclusion within the #ifndef __ASSEMBLER__ condition,
  16. which solves the problem.
  17. Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
  18. ---
  19. pixman/pixman-private.h | 3 +--
  20. 1 file changed, 1 insertion(+), 2 deletions(-)
  21. diff --git a/pixman/pixman-private.h b/pixman/pixman-private.h
  22. index 73108a0..73a5414 100644
  23. --- a/pixman/pixman-private.h
  24. +++ b/pixman/pixman-private.h
  25. @@ -1,5 +1,3 @@
  26. -#include <float.h>
  27. -
  28. #ifndef PIXMAN_PRIVATE_H
  29. #define PIXMAN_PRIVATE_H
  30. @@ -30,6 +28,7 @@
  31. #include <stdio.h>
  32. #include <string.h>
  33. #include <stddef.h>
  34. +#include <float.h>
  35. #include "pixman-compiler.h"
  36. --
  37. 2.6.4