New issue
Advanced search Search tips

Issue 793487 link

Starred by 1 user

Issue metadata

Status: Verified
Owner:
Closed: Dec 2017
EstimatedDays: ----
NextAction: ----
OS: Chrome
Pri: 2
Type: Bug



Sign in to add a comment

Build pixman with clang

Project Member Reported by manojgupta@chromium.org, Dec 8 2017

Issue description

Currently pixman is forced to build with gcc.
When building with clang, it encounters following error:

../../pixman-0.32.4/pixman/pixman-mmx.c:100:20: error: constraint 'K' expects an integer constant expression
        : "y" (__A), "K" (__N)

 
clang also can't handle the arm assembly used in pixman (predates non-unified syntax).
Project Member

Comment 2 by bugdroid1@chromium.org, Dec 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/chromiumos-overlay/+/f6d9206856c4f12c8140deff936210cf03a8fd8e

commit f6d9206856c4f12c8140deff936210cf03a8fd8e
Author: Manoj Gupta <manojgupta@google.com>
Date: Wed Dec 13 08:32:19 2017

pixman: Stop forced building with gcc.

Pixman can be built with clang with a simple patch.

BUG= chromium:793487 
TEST=pixman builds with clang.

CQ-DEPEND=CL:818306

Change-Id: Icda7035ff2af504040dd086feef99910ee06cb72
Reviewed-on: https://chromium-review.googlesource.com/818176
Commit-Ready: Manoj Gupta <manojgupta@chromium.org>
Tested-by: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: Yunlian Jiang <yunlian@chromium.org>

[delete] https://crrev.com/79decd4e85076b35ef9132829db359c9bd6b8b9b/chromeos/config/env/x11-libs/pixman

Project Member

Comment 3 by bugdroid1@chromium.org, Dec 13 2017

The following revision refers to this bug:
  https://chromium.googlesource.com/chromiumos/overlays/portage-stable/+/66428faa607c3b72f95ca69feba044f3a5e13421

commit 66428faa607c3b72f95ca69feba044f3a5e13421
Author: Manoj Gupta <manojgupta@google.com>
Date: Wed Dec 13 08:32:19 2017

pixman: Add an upstream patch to make it build with clang.

Pixman currently does not build with clang because of following error:
pixman-mmx.c:100:20: error: constraint 'K' expects an integer constant expression
        : "y" (__A), "K" (__N)

The error happens because __N is a function parameter and clang does not
process it as an integer literal by design.
Fix this by forcing the macro version of the function which exposes __N value
as an integer literal.

Also disable integrated assembler since clang's integerated assembler can't handle
pixman's assembly syntax.

BUG= chromium:793487 
TEST=pixman builds with clang on caroline/kevin boards.

CQ-DEPEND=CL:818176

Change-Id: I82d608a440304f7743cfce2bc2ffce5b1e4f366f
Reviewed-on: https://chromium-review.googlesource.com/818306
Commit-Ready: Manoj Gupta <manojgupta@chromium.org>
Tested-by: Manoj Gupta <manojgupta@chromium.org>
Reviewed-by: Luis Lozano <llozano@chromium.org>

[add] https://crrev.com/66428faa607c3b72f95ca69feba044f3a5e13421/x11-libs/pixman/files/pixman-clang.patch
[rename] https://crrev.com/66428faa607c3b72f95ca69feba044f3a5e13421/x11-libs/pixman/pixman-0.32.4-r1.ebuild

Status: Verified (was: Untriaged)

Sign in to add a comment