buildroot/package/pixman/pixman-01-loongson-cflags.patch
Thomas Petazzoni a9baea4345 pixman: add patch to fix Microblaze build failure
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>
Signed-off-by: Peter Korsgaard <peter@korsgaard.com>
2014-02-22 23:48:11 +01:00

39 lines
1.5 KiB
Diff

configure.ac: Verify that the Loongson MMI code can link
The Loongson MMI code modifies -march and as a result it breaks linking
when the rest of the code is built with a different -match/-mtune.
This patch fixes the problem by trying to link the code instead of just
compiling it. This patch is already committed upstream.
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
From d77d75cc6e5de14d027d22b70389a4d0c71048b9 Mon Sep 17 00:00:00 2001
From: Markos Chandras <markos.chandras@imgtec.com>
Date: Wed, 15 May 2013 16:51:20 +0000
Subject: Use AC_LINK_IFELSE to check if the Loongson MMI code can link
The Loongson code is compiled with -march=loongson2f to enable the MMI
instructions, but binutils refuses to link object code compiled with
different -march settings, leading to link failures later in the
compile. This avoids that problem by checking if we can link code
compiled for Loongson.
Reviewed-by: Matt Turner <mattst88@gmail.com>
Signed-off-by: Markos Chandras <markos.chandras@imgtec.com>
---
diff --git a/configure.ac b/configure.ac
index c43a0d2..221179f 100644
--- a/configure.ac
+++ b/configure.ac
@@ -279,7 +279,7 @@ AC_MSG_CHECKING(whether to use Loongson MMI assembler)
xserver_save_CFLAGS=$CFLAGS
CFLAGS=" $LS_CFLAGS $CFLAGS -I$srcdir"
-AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
+AC_LINK_IFELSE([AC_LANG_SOURCE([[
#ifndef __mips_loongson_vector_rev
#error "Loongson Multimedia Instructions are only available on Loongson"
#endif
--
cgit v0.9.0.2-2-gbebe