Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bugzilla DB migration completed. Please report issues to Infra team via email via infra@gentoo.org or IRC
Bug 717344 - >=dev-lang/spidermonkey-68.7.0 - please add support for CPU_FLAGS_ARM="neon"
Summary: >=dev-lang/spidermonkey-68.7.0 - please add support for CPU_FLAGS_ARM="neon"
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal enhancement (vote)
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-04-13 17:15 UTC by tt_1
Modified: 2020-09-20 14:04 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description tt_1 2020-04-13 17:15:32 UTC
I just ran a test with all the optimizations from the firefox ebuilds: 

--enable-fpu=neon --with-thumb=yes --with-thumb-interwork=no

they work fine with gcc, and both saves a lot of space and should give faster runtime binaries. 

If you intend pick it up, please don't forget that CC=clang doesn't understand all of these options. A simple copy of the log from the firefox ebuild should work for both cases.
Comment 1 tt_1 2020-04-13 20:48:18 UTC
without neon optimization: 

bloaty /usr/lib/libmozjs-68.so.0
     VM SIZE                      FILE SIZE
 --------------                --------------
  89.6%  8.27Mi .text           8.27Mi  89.6%
   3.1%   291Ki .rodata          291Ki   3.1%
   1.6%   149Ki .rel.dyn         149Ki   1.6%
   1.4%   131Ki .dynstr          131Ki   1.4%
   1.3%   126Ki .ARM.extab       126Ki   1.3%
   1.2%   109Ki .ARM.exidx       109Ki   1.2%
   1.1%   107Ki .data.rel.ro     107Ki   1.1%
   0.4%  38.6Ki .dynsym         38.6Ki   0.4%
   0.2%  14.6Ki .gnu.hash       14.6Ki   0.2%
   0.1%  5.16Ki .bss                 0   0.0%
   0.1%  4.83Ki .gnu.version    4.83Ki   0.1%
   0.0%  3.37Ki .got            3.37Ki   0.0%
   0.0%  2.84Ki .plt            2.84Ki   0.0%
   0.0%  1.88Ki .rel.plt        1.88Ki   0.0%
   0.0%       9 [Unmapped]      1.85Ki   0.0%
   0.0%     276 [ELF Headers]   1.32Ki   0.0%
   0.0%     416 .data              416   0.0%
   0.0%     368 .gnu.version_r     368   0.0%
   0.0%     328 .dynamic           328   0.0%
   0.0%       0 .shstrtab          240   0.0%
   0.0%     136 [Other]            185   0.0%
 100.0%  9.24Mi TOTAL           9.24Mi 100.0%

with all optimizations: 

bloaty /usr/lib/libmozjs-68.so.0
     VM SIZE                      FILE SIZE
 --------------                --------------
  86.6%  5.68Mi .text           5.68Mi  86.6%
   4.3%   291Ki .rodata          291Ki   4.3%
   2.2%   149Ki .rel.dyn         149Ki   2.2%
   2.0%   131Ki .dynstr          131Ki   2.0%
   1.6%   107Ki .data.rel.ro     107Ki   1.6%
   1.6%   107Ki .ARM.exidx       107Ki   1.6%
   0.6%  40.5Ki .ARM.extab      40.5Ki   0.6%
   0.6%  38.6Ki .dynsym         38.6Ki   0.6%
   0.2%  14.6Ki .gnu.hash       14.6Ki   0.2%
   0.1%  5.16Ki .bss                 0   0.0%
   0.1%  4.83Ki .gnu.version    4.83Ki   0.1%
   0.1%  3.37Ki .got            3.37Ki   0.1%
   0.0%  2.94Ki .plt            2.94Ki   0.0%
   0.0%  1.88Ki .rel.plt        1.88Ki   0.0%
   0.0%     276 [ELF Headers]   1.32Ki   0.0%
   0.0%     416 .data              416   0.0%
   0.0%     368 .gnu.version_r     368   0.0%
   0.0%     328 .dynamic           328   0.0%
   0.0%       5 [Unmapped]         314   0.0%
   0.0%       0 .shstrtab          240   0.0%
   0.0%     136 [Other]            187   0.0%
 100.0%  6.56Mi TOTAL           6.56Mi 100.0%
Comment 2 tt_1 2020-07-02 10:25:02 UTC
for now I've dropped this into /usr/armv7a-unknown-linux-gnueabihf/etc/portage/env/dev-lang/spidermonkey

EXTRA_ECONF="--with-fpu=neon --with-thumb=yes --with-thumb-interwork=no"

if you want to compile nativly, please make sure to use gcc. clang doesn't understand thumb instructions. So only apply --with-fpu=neon in this case.
Comment 3 tt_1 2020-07-15 10:17:03 UTC
I've tested this extensivly, and I would suggest to add only

--enable-fpu=neon 

for now, so that we can spare the headache with gcc vs clang about thumb support
Comment 4 Larry the Git Cow gentoo-dev 2020-09-20 14:04:17 UTC
The bug has been closed via the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=0ffddcc20f7ac8ce504a8937ffaa1f2942ce9715

commit 0ffddcc20f7ac8ce504a8937ffaa1f2942ce9715
Author:     Thomas Deutschmann <whissi@gentoo.org>
AuthorDate: 2020-09-20 13:36:33 +0000
Commit:     Thomas Deutschmann <whissi@gentoo.org>
CommitDate: 2020-09-20 14:04:04 +0000

    dev-lang/spidermonkey: add CPU_FLAGS_ARM=neon
    
    Closes: https://bugs.gentoo.org/717344
    Package-Manager: Portage-3.0.7, Repoman-3.0.1
    Signed-off-by: Thomas Deutschmann <whissi@gentoo.org>

 dev-lang/spidermonkey/spidermonkey-68.12.0.ebuild | 53 +++++++++++++++--------
 dev-lang/spidermonkey/spidermonkey-78.2.0.ebuild  | 53 +++++++++++++++--------
 2 files changed, 68 insertions(+), 38 deletions(-)