Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
* [Buildroot] [PATCH] pixman: add patch to fix Microblaze build failure
@ 2014-02-22 22:23 Thomas Petazzoni
  2014-02-22 22:48 ` Peter Korsgaard
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2014-02-22 22:23 UTC (permalink / raw)
  To: buildroot

The Microblaze build of pixman was failing due to FE_DIVBYZERO not
being implemented. It turns out that the usage of it, like fenv.h and
feenableexcept() is optional. So the patch simply adds a configure
check and disables the appropriate code (which is only use in the
tests anyway).

This commit also renames the existing patch to follow the patch naming
convention, and get a reliable ordering when applying patches.

Fixes:

  http://autobuild.buildroot.org/results/806/8064092cdbac85fbf4322429d29d5d11dc51860f/

Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
---
 ...flags.patch => pixman-01-loongson-cflags.patch} |  0
 package/pixman/pixman-02-check-fe-divbyzero.patch  | 41 ++++++++++++++++++++++
 2 files changed, 41 insertions(+)
 rename package/pixman/{pixman-loongson-cflags.patch => pixman-01-loongson-cflags.patch} (100%)
 create mode 100644 package/pixman/pixman-02-check-fe-divbyzero.patch

diff --git a/package/pixman/pixman-loongson-cflags.patch b/package/pixman/pixman-01-loongson-cflags.patch
similarity index 100%
rename from package/pixman/pixman-loongson-cflags.patch
rename to package/pixman/pixman-01-loongson-cflags.patch
diff --git a/package/pixman/pixman-02-check-fe-divbyzero.patch b/package/pixman/pixman-02-check-fe-divbyzero.patch
new file mode 100644
index 0000000..44dd691
--- /dev/null
+++ b/package/pixman/pixman-02-check-fe-divbyzero.patch
@@ -0,0 +1,41 @@
+Add a check for FE_DIVBYZERO
+
+Some architectures (namely Microblaze) do have fenv.h and
+feenableexcept, but they don't have the FE_DIVBYZERO definition. This
+patch adds a configure check for FE_DIVBYZERO, and only uses it if
+it's available.
+
+Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
+
+Index: b/configure.ac
+===================================================================
+--- a/configure.ac
++++ b/configure.ac
+@@ -838,6 +838,11 @@
+    AC_DEFINE(HAVE_FEENABLEEXCEPT, 1, [Whether we have feenableexcept()])
+ fi
+ 
++AC_CHECK_DECL([FE_DIVBYZERO], [], [], [[#include <fenv.h>]])
++if test x$have_fe_divbyzero = xyes; then
++   AC_DEFINE(HAVE_FEDIVBYZERO, 1, [Whether we have FE_DIVBYZERO])
++fi
++
+ AC_CHECK_FUNC(gettimeofday, have_gettimeofday=yes, have_gettimeofday=no)
+ AC_CHECK_HEADER(sys/time.h, have_sys_time_h=yes, have_sys_time_h=no)
+ if test x$have_gettimeofday = xyes && test x$have_sys_time_h = xyes; then
+Index: b/test/utils.c
+===================================================================
+--- a/test/utils.c
++++ b/test/utils.c
+@@ -776,9 +776,11 @@
+ {
+ #ifdef HAVE_FENV_H
+ #ifdef HAVE_FEENABLEEXCEPT
++#ifdef HAVE_FE_DIVBYZERO
+     feenableexcept (FE_DIVBYZERO);
+ #endif
+ #endif
++#endif
+ }
+ 
+ void *
-- 
1.8.3.2

^ permalink raw reply related	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH] pixman: add patch to fix Microblaze build failure
  2014-02-22 22:23 [Buildroot] [PATCH] pixman: add patch to fix Microblaze build failure Thomas Petazzoni
@ 2014-02-22 22:48 ` Peter Korsgaard
  2014-02-22 22:57   ` Thomas Petazzoni
  0 siblings, 1 reply; 4+ messages in thread
From: Peter Korsgaard @ 2014-02-22 22:48 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 > The Microblaze build of pixman was failing due to FE_DIVBYZERO not
 > being implemented. It turns out that the usage of it, like fenv.h and
 > feenableexcept() is optional. So the patch simply adds a configure
 > check and disables the appropriate code (which is only use in the
 > tests anyway).

 > This commit also renames the existing patch to follow the patch naming
 > convention, and get a reliable ordering when applying patches.

 > Fixes:

 >   http://autobuild.buildroot.org/results/806/8064092cdbac85fbf4322429d29d5d11dc51860f/

 > Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>

Committed, thanks.

Don't forget to send the patch upstream.

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH] pixman: add patch to fix Microblaze build failure
  2014-02-22 22:48 ` Peter Korsgaard
@ 2014-02-22 22:57   ` Thomas Petazzoni
  2014-02-22 23:02     ` Peter Korsgaard
  0 siblings, 1 reply; 4+ messages in thread
From: Thomas Petazzoni @ 2014-02-22 22:57 UTC (permalink / raw)
  To: buildroot

Dear Peter Korsgaard,

On Sat, 22 Feb 2014 23:48:39 +0100, Peter Korsgaard wrote:

> Don't forget to send the patch upstream.

http://lists.freedesktop.org/archives/pixman/2014-February/003172.html

 :-)

Thomas
-- 
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* [Buildroot] [PATCH] pixman: add patch to fix Microblaze build failure
  2014-02-22 22:57   ` Thomas Petazzoni
@ 2014-02-22 23:02     ` Peter Korsgaard
  0 siblings, 0 replies; 4+ messages in thread
From: Peter Korsgaard @ 2014-02-22 23:02 UTC (permalink / raw)
  To: buildroot

>>>>> "Thomas" == Thomas Petazzoni <thomas.petazzoni@free-electrons.com> writes:

 > Dear Peter Korsgaard,
 > On Sat, 22 Feb 2014 23:48:39 +0100, Peter Korsgaard wrote:

 >> Don't forget to send the patch upstream.

 > http://lists.freedesktop.org/archives/pixman/2014-February/003172.html

 >  :-)

Great, thanks!

-- 
Bye, Peter Korsgaard

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2014-02-22 23:02 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-02-22 22:23 [Buildroot] [PATCH] pixman: add patch to fix Microblaze build failure Thomas Petazzoni
2014-02-22 22:48 ` Peter Korsgaard
2014-02-22 22:57   ` Thomas Petazzoni
2014-02-22 23:02     ` Peter Korsgaard

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox