Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 473260 - www-client/chromium is always built without NEON and with no ARMv7 support
Summary: www-client/chromium is always built without NEON and with no ARMv7 support
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: ARM Linux
: Normal normal (vote)
Assignee: Chromium Project
URL:
Whiteboard: ht-wanted
Keywords:
Depends on:
Blocks:
 
Reported: 2013-06-14 11:00 UTC by Vladimir Smirnov (RETIRED)
Modified: 2013-08-13 16:20 UTC (History)
2 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
chromium-28.0.1500.45-arm.patch (chromium-28.0.1500.45-arm.patch,1.13 KB, patch)
2013-06-16 20:58 UTC, Markus Meier
Details | Diff
Proposed patch (chromium.patch,806 bytes, patch)
2013-06-16 22:35 UTC, Vladimir Smirnov (RETIRED)
Details | Diff
chromium-29.0.1521.3-arm.patch (chromium.patch,1.19 KB, patch)
2013-06-17 08:56 UTC, Vladimir Smirnov (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Vladimir Smirnov (RETIRED) gentoo-dev 2013-06-14 11:00:58 UTC
Chromium is compiled with -Darmv7=0 -Darm_neon=0, which can greatly improve performance on armv7 and neon-enabled hardware, such as most Cortex-A8/A9 CPUs.



Reproducible: Always

Steps to Reproduce:
1. Emerge Chromium
2. See for flags at compile time
Actual Results:  
Chromium compiled for most generic arm, ignoring all optimizations for specific hardware

Expected Results:  
Chromium should be compiled for certain hardware
Comment 1 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2013-06-15 16:29:22 UTC
Vladimir, do you have some patch suggestions?

I don't really use ARM here - it'd be great to get some patches/testing from people who do.
Comment 2 Agostino Sarubbo gentoo-dev 2013-06-16 20:26:54 UTC
if needed I can test, CC me
Comment 3 Markus Meier gentoo-dev 2013-06-16 20:58:38 UTC
Created attachment 351156 [details, diff]
chromium-28.0.1500.45-arm.patch

(In reply to Paweł Hajdan, Jr. from comment #1)
> Vladimir, do you have some patch suggestions?
> 
> I don't really use ARM here - it'd be great to get some patches/testing from
> people who do.

I'd say, for "-Darmv7=0" we do the same as in dev-lang/v8. And for "-Darm_neon=0" adding a neon USE-flag plus configure switch should be enough.

Attaching proposed changes (untested!).
Comment 4 Vladimir Smirnov (RETIRED) gentoo-dev 2013-06-16 22:35:15 UTC
Created attachment 351158 [details, diff]
Proposed patch

In fact there are more problem. I've tried to address them in this patch. Chromium will fail to compile on arm-hardfloat if you won't pass hardfloat abi param in config.
Comment 5 Mike Gilbert gentoo-dev 2013-06-16 23:09:05 UTC
I don't think using CTARGET here is appropriate; we are not building a cross-compiler.

CBUILD maps to the "host" toolchain in gyp.
CHOST maps to the "target" toolchain in gyp.
Comment 6 Vladimir Smirnov (RETIRED) gentoo-dev 2013-06-16 23:44:47 UTC
Both CTARGET and CHOST are used in tc-is-softfloat function.

As it's written in http://www.gentoo.org/proj/en/base/embedded/cross-development.xml, CTARGET is platform, that cross-toolchain builds for. AFAIK, chromium can't be cross-compiled with current ebuild, but still, I think it's better to make it as much cross-friendly, as possible.
Comment 7 Mike Gilbert gentoo-dev 2013-06-17 00:00:56 UTC
The relevant description from that page is in the Meaning When Building Cross Binaries column.

CTARGET: Platform running the cross binary.

Which certainly fits the bill here. I retract my earlier comment.
Comment 8 SpanKY gentoo-dev 2013-06-17 06:03:18 UTC
Comment on attachment 351158 [details, diff]
Proposed patch

the is-flagq check for neon is incorrect.  it should be USE=neon and orthogonal to any cpu check.

i'm not sure why the Gentoo ebuild is disabling nacl.  maybe old code ?  we're building nacl in CrOS fine ...

might want to also see the defines we use in CrOS ... there's some v8 stuff in there we probably want.

http://git.chromium.org/gitweb/?p=chromiumos/overlays/chromiumos-overlay.git;a=blob;f=chromeos-base/chromeos-chrome/chromeos-chrome-9999.ebuild;hb=HEAD#l236
Comment 9 Vladimir Smirnov (RETIRED) gentoo-dev 2013-06-17 07:57:30 UTC
(In reply to SpanKY from comment #8)
> Comment on attachment 351158 [details, diff] [details, diff]
> Proposed patch
> 
> the is-flagq check for neon is incorrect.  it should be USE=neon and
> orthogonal to any cpu check.
> 
> i'm not sure why the Gentoo ebuild is disabling nacl.  maybe old code ? 
> we're building nacl in CrOS fine ...
> 
> might want to also see the defines we use in CrOS ... there's some v8 stuff
> in there we probably want.
> 
> http://git.chromium.org/gitweb/?p=chromiumos/overlays/chromiumos-overlay.git;
> a=blob;f=chromeos-base/chromeos-chrome/chromeos-chrome-9999.ebuild;
> hb=HEAD#l236

I've used is-flagq for neon check, because you can't specify mfpu=vfp* and USE=neon at the same time. Chromium build system, by default, will add defines for neon, add -mfpu=neon and then it'll be overriden by user's -mfpu=vfpv3-d16, for example. Gcc will fail to compile neon code with wrong -mfpu flag.

If is-flagq is worse then use flag, then it's better to filter out mfpu completely and pass -Darm_fpu=${ARM_FPU} to build system.
Comment 10 Vladimir Smirnov (RETIRED) gentoo-dev 2013-06-17 08:56:15 UTC
Created attachment 351188 [details, diff]
chromium-29.0.1521.3-arm.patch

Another proporsal.

By the way, I think CTARGET should be compared to arm[78], not only to arm7.
Comment 11 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2013-07-25 21:24:46 UTC
(In reply to Vladimir from comment #10)
> Created attachment 351188 [details, diff] [details, diff]
> chromium-29.0.1521.3-arm.patch
> 
> Another proporsal.

I think I can apply that patch. Any comments before I do? Mike (vapier)?
Comment 12 Markus Meier gentoo-dev 2013-08-04 18:43:36 UTC
(In reply to Paweł Hajdan, Jr. from comment #11)
> (In reply to Vladimir from comment #10)
> > Created attachment 351188 [details, diff] [details, diff] [details, diff]
> > chromium-29.0.1521.3-arm.patch
> > 
> > Another proporsal.
> 
> I think I can apply that patch. Any comments before I do? Mike (vapier)?

yes, please apply it, since chromium-29* doesn't build on arm hardfloat anymore with the current ebuilds. compiles and works fine with attachment 351188 [details, diff].
thanks in advance!
Comment 13 Matt Whitlock 2013-08-05 03:23:11 UTC
(In reply to Mike Gilbert from comment #5)
> I don't think using CTARGET here is appropriate; we are not building a
> cross-compiler.
> 
> CBUILD maps to the "host" toolchain in gyp.
> CHOST maps to the "target" toolchain in gyp.

I'm pretty certain Mike Gilbert is correct. The three C* variables are:

CBUILD: What arch will build the binaries?

CHOST: On what arch will the binaries execute?

CTARGET: For what arch will the binaries produce output?

Unless you're building a compiler, CTARGET doesn't have any meaning.

If CHOST != CTARGET, you're building a cross-compiler. If CBUILD != CHOST, you're cross-compiling. (And, logically, if CBUILD != CHOST != CTARGET, you're cross-compiling a cross-compiler.)


FWIW, I too would like to see Chromium built for ARM with -Darmv7=1 -Darm_neon=1 -Ddisable_nacl=0.
Comment 14 Paweł Hajdan, Jr. (RETIRED) gentoo-dev 2013-08-13 16:20:05 UTC
Patch applied in chromium-30.0.1588.0, thanks!

Please send any further changes in a new bug.