Skip to contentSkip to conversation

pixman: Apply upstream patch to fix compilation on MIPS

PATCH New Markos Chandras 2 participants 6 messages May 20, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 pixman: Apply upstream patch to fix compilation on MIPS

From: Markos Chandras <[email protected]>

Fixes:
http://autobuild.buildroot.net/results/38aa4f2a2269b80226b910c46e0c9abe7dc38ff8/

---
 package/pixman/pixman-0.30.0-loongson-cflags.patch | 38 ++++++++++++++++++++++
 package/pixman/pixman.mk                           |  3 +-
 2 files changed, 40 insertions(+), 1 deletion(-)
 create mode 100644 package/pixman/pixman-0.30.0-loongson-cflags.patch
package/pixman/pixman-0.30.0-loongson-cflags.patch new file +38 -0
new file mode 100644
index 0000000..fc53be2
@@ -0,0 +1,38 @@
+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 <[email protected]>
+
+From d77d75cc6e5de14d027d22b70389a4d0c71048b9 Mon Sep 17 00:00:00 2001
+From: Markos Chandras <[email protected]>
+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 <[email protected]>
+Signed-off-by: Markos Chandras <[email protected]>
+---
+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
package/pixman/pixman.mk +2 -1
index c2ee035..7822ede 100644
@@ -3,11 +3,12 @@
 # pixman
 #
 ################################################################################
-PIXMAN_VERSION = 0.28.2
+PIXMAN_VERSION = 0.30.0
 PIXMAN_SITE = http://xorg.freedesktop.org/releases/individual/lib
 PIXMAN_LICENSE = MIT
 PIXMAN_LICENSE_FILES = COPYING
 
+PIXMAN_AUTORECONF = YES
 PIXMAN_INSTALL_STAGING = YES
 PIXMAN_DEPENDENCIES = host-pkgconf
 # don't build gtk based demos
Signature · 1 line
1.8.2.1
#1 lore raw

PATCH 1/1 pixman: Apply upstream patch to fix compilation on MIPS

Quoted 78 lines · Markos Chandras

From: Markos Chandras <[email protected]>

Fixes:
http://autobuild.buildroot.net/results/38aa4f2a2269b80226b910c46e0c9abe7dc38ff8/

---
 package/pixman/pixman-0.30.0-loongson-cflags.patch | 38 ++++++++++++++++++++++
 package/pixman/pixman.mk                           |  3 +-
 2 files changed, 40 insertions(+), 1 deletion(-)
 create mode 100644 package/pixman/pixman-0.30.0-loongson-cflags.patch
package/pixman/pixman-0.30.0-loongson-cflags.patch new file +38 -0
new file mode 100644
index 0000000..fc53be2
@@ -0,0 +1,38 @@
+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 <[email protected]>
+
+From d77d75cc6e5de14d027d22b70389a4d0c71048b9 Mon Sep 17 00:00:00 2001
+From: Markos Chandras <[email protected]>
+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 <[email protected]>
+Signed-off-by: Markos Chandras <[email protected]>
+---
+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
package/pixman/pixman.mk +2 -2
index c2ee035..7822ede 100644
@@ -3,11 +3,12 @@
 # pixman
 #
 ################################################################################
-PIXMAN_VERSION = 0.28.2
+PIXMAN_VERSION = 0.30.0
 PIXMAN_SITE = http://xorg.freedesktop.org/releases/individual/lib
 PIXMAN_LICENSE = MIT
 PIXMAN_LICENSE_FILES = COPYING
 
+PIXMAN_AUTORECONF = YES
 PIXMAN_INSTALL_STAGING = YES
 PIXMAN_DEPENDENCIES = host-pkgconf
 # don't build gtk based demos
--

1.8.2.1

Quoted 4 lines

_______________________________________________
buildroot mailing list
buildroot at busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

Hi,

I accidentally bumped pixman to 0.30.0 in order to test this patch, but this is already in the -next branch. Apologies for that. Do you want me to resend this patch without the version bump or you will fix it yourself before committing it?

--
Regards,
Markos Chandras

#2 lore raw

PATCH 1/1 pixman: Apply upstream patch to fix compilation on MIPS

In reply to Markos Chandras

Hi Markos,

Quoted 8 lines · Markos Chandras

From: Markos Chandras <[email protected]>

Fixes:
http://autobuild.buildroot.net/results/38aa4f2a2269b80226b910c46e0c9abe7dc38ff8/

---
 package/pixman/pixman-0.30.0-loongson-cflags.patch | 38 ++++++++++++++++++++++

We now usually omit version numbers from bundled patches file names.

Quoted 3 lines
 package/pixman/pixman.mk                           |  3 +-
 2 files changed, 40 insertions(+), 1 deletion(-)
 create mode 100644 package/pixman/pixman-0.30.0-loongson-cflags.patch

[snip]

package/pixman/pixman.mk line 6

Quoted 10 lines
package/pixman/pixman.mk +1 -1
index c2ee035..7822ede 100644
@@ -3,11 +3,12 @@
 # pixman
 #
 ################################################################################
-PIXMAN_VERSION = 0.28.2
+PIXMAN_VERSION = 0.30.0

This is a version bump. The commit log should change accordingly.

package/pixman/pixman.mk line 11

Quoted 5 lines
package/pixman/pixman.mk +1 -0
 PIXMAN_SITE = http://xorg.freedesktop.org/releases/individual/lib
 PIXMAN_LICENSE = MIT
 PIXMAN_LICENSE_FILES = COPYING
 
+PIXMAN_AUTORECONF = YES

Please add a comment explaining why this is needed.

package/pixman/pixman.mk line 14

Quoted 3 lines
package/pixman/pixman.mk +0 -0
 PIXMAN_INSTALL_STAGING = YES
 PIXMAN_DEPENDENCIES = host-pkgconf
 # don't build gtk based demos

baruch

Signature · 3 lines
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
#3 lore raw

PATCH 1/1 pixman: Apply upstream patch to fix compilation on MIPS

Hi Baruch,

Quoted 2 lines

We now usually omit version numbers from bundled patches file names.

Oh sorry I didn't notice. I will fix it.

Quoted 5 lines

package/pixman/pixman.mk line 6

Quoted 3 lines
package/pixman/pixman.mk +1 -1
-PIXMAN_VERSION = 0.28.2
+PIXMAN_VERSION = 0.30.0

This is a version bump. The commit log should change accordingly.

Yes, I sent a follow-up e-mail explaining this was an accident. The version bump is already present the -next branch.

Quoted 8 lines
Quoted 6 lines

PIXMAN_SITE = http://xorg.freedesktop.org/releases/individual/lib
PIXMAN_LICENSE = MIT
PIXMAN_LICENSE_FILES = COPYING

+PIXMAN_AUTORECONF = YES

Please add a comment explaining why this is needed.

I thought it was obvious because the patch fixes the configure.ac file. But ok, I will add a comment.

Thanks for the review.

#4 lore raw

PATCH 1/1 pixman: Apply upstream patch to fix compilation on MIPS

Hi Markos,

Quoted 10 lines · Markos Chandras
Quoted 7 lines
Quoted 5 lines

PIXMAN_SITE = http://xorg.freedesktop.org/releases/individual/lib
PIXMAN_LICENSE = MIT
PIXMAN_LICENSE_FILES = COPYING

+PIXMAN_AUTORECONF = YES

Please add a comment explaining why this is needed.

I thought it was obvious because the patch fixes the configure.ac file. But ok, I will add a comment.

I missed that. In this case a comment is not needed I guess, unless others have a different opinion.

baruch

Signature · 3 lines
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
#5 lore raw

PATCH 1/1 pixman: Apply upstream patch to fix compilation on MIPS

Hi Baruch,

Quoted 11 lines · Baruch Siach

Hi Markos,

Quoted 8 lines · Markos Chandras
Quoted 7 lines
Quoted 5 lines

PIXMAN_SITE = http://xorg.freedesktop.org/releases/individual/lib
PIXMAN_LICENSE = MIT
PIXMAN_LICENSE_FILES = COPYING

+PIXMAN_AUTORECONF = YES

Please add a comment explaining why this is needed.

Quoted 8 lines
Quoted 2 lines

I thought it was obvious because the patch fixes the configure.ac file. But ok, I will add a comment.

I missed that. In this case a comment is not needed I guess, unless others have a different opinion.

baruch

I sent v2. I didn't add a comment because I see that most of packages do not explain with AUTORECONF is needed.

Thank you for your comments.

--
Regards,
Markos Chandras