Bug 83358 - pixman-0.32.6 fails to build on mips32r2
Summary: pixman-0.32.6 fails to build on mips32r2
Status: RESOLVED MOVED
Alias: None
Product: pixman
Classification: Unclassified
Component: pixman (show other bugs)
Version: other
Hardware: Other All
: high normal
Assignee: Søren Sandmann Pedersen
QA Contact: Søren Sandmann Pedersen
URL:
Whiteboard:
Keywords: patch, regression
Depends on:
Blocks:
 
Reported: 2014-09-01 14:47 UTC by Vicente Olivert Riera
Modified: 2018-06-05 15:28 UTC (History)
2 users (show)

See Also:
i915 platform:
i915 features:


Attachments
pixman-01-fix-mips-dspr2-asm.patch (1.46 KB, patch)
2014-09-01 14:47 UTC, Vicente Olivert Riera
Details | Splinter Review
Fix C pre-processor issues in LEAF_MIPS32R2 (1.19 KB, patch)
2014-09-12 14:17 UTC, Vicente Olivert Riera
Details | Splinter Review

Description Vicente Olivert Riera 2014-09-01 14:47:56 UTC
Created attachment 105565 [details] [review]
pixman-01-fix-mips-dspr2-asm.patch

Building pixman-0.32.6 on mips32r2 targets results in the following problems:

pixman-mips-dspr2-asm.S:4267: Error: opcode not supported on this processor:
mips32r2 (mips32r2) `precr.qb.ph $12,$24,$25'
pixman-mips-dspr2-asm.S:4267: Error: opcode not supported on this processor:
mips32r2 (mips32r2) `precrq.qb.ph $8,$14,$12'
pixman-mips-dspr2-asm.S:4271: Error: opcode not supported on this processor:
mips32r2 (mips32r2) `replv.ph $9,$9'
[...]

This is a regression from pixman-0.32.4. There is a change in pixman/pixman-mips-dspr2-asm.h between pixman-0.32.4 and pixman-0.32.6. The
diff is:

-------------------------------------------------------------
--- pixman-0.32.4/pixman/pixman-mips-dspr2-asm.h    2013-05-14
00:29:26.000000000 +0100
+++ pixman-0.32.6/pixman/pixman-mips-dspr2-asm.h    2014-07-03
18:35:21.000000000 +0100
@@ -72,7 +72,10 @@
 #define LEAF_MIPS32R2(symbol)                           \
                 .globl  symbol;                         \
                 .align  2;                              \
+#ifdef __ELF__
+                .hidden symbol;                         \
                 .type   symbol, @function;              \
+#endif
                 .ent    symbol, 0;                      \
 symbol:         .frame  sp, 0, ra;                      \
                 .set    push;                           \
-------------------------------------------------------------

If you revert those changes pixman-0.32.6 builds fine. It seems that putting
that #if clause in that place is causing the problem. The attached patch rewrites that logic to do the same thing as that #if clause does and fixes the problem.
Comment 1 Vicente Olivert Riera 2014-09-12 14:17:26 UTC
Created attachment 106185 [details] [review]
Fix C pre-processor issues in LEAF_MIPS32R2

As per conversations with Nemanja Lukic in the mailing list, this patch should be fine to be applied upstream.
Comment 2 Vicente Olivert Riera 2014-10-07 13:05:27 UTC
ping
Comment 3 Pekka Paalanen 2015-05-07 09:53:53 UTC
The master branch now has:
commit cf086d4949092861dc3729465a3881d229cc1060
Author: James Cowgill <james410@cowgill.org.uk>
Date:   Tue May 5 16:39:38 2015 +0100

    MIPS: Drop #ifdef __ELF__ in definition of LEAF_MIPS32R2


Is that enough to mark this bug as fixed?
I'm not sure how the get this into the stable branch.
Comment 4 GitLab Migration User 2018-06-05 15:28:17 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/pixman/pixman/issues/23.


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.