Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 650220 - =dev-lang/spidermonkey-1.8.5-r6 - In file included from jsarray.cpp:109: ./assembler/wtf/Platform.h:287:6: error: #error "Not supported ARM architecture"
Summary: =dev-lang/spidermonkey-1.8.5-r6 - In file included from jsarray.cpp:109: ./as...
Status: RESOLVED OBSOLETE
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: ARM Linux
: Normal normal (vote)
Assignee: Mozilla Gentoo Team
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2018-03-11 15:03 UTC by Walter Hüttenmeyer
Modified: 2022-11-24 11:29 UTC (History)
1 user (show)

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


Attachments
dev-lang:spidermonkey-1.8.5-r6:20180311-150425.log (dev-lang:spidermonkey-1.8.5-r6:20180311-150425.log,77.84 KB, text/plain)
2018-03-11 15:10 UTC, Walter Hüttenmeyer
Details
GCC defines without -marm (file_650220.txt,10.90 KB, text/plain)
2018-03-11 15:14 UTC, Walter Hüttenmeyer
Details
GCC defines with -marm (file_650220.txt,11.00 KB, text/plain)
2018-03-11 15:16 UTC, Walter Hüttenmeyer
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Walter Hüttenmeyer 2018-03-11 15:03:44 UTC
When compiling =dev-lang/spidermonkey-1.8.5-r6 on arm it fails at two points.

First one: if there's no "-mthumb" in the CFLAGS, GCC does not define "__thumb2__" and the configure script fails here.

(Defining __thumb2__ by hand makes it compile, but fail at linking stage, complaining that the selected processor does not support <a lot of instructions here> in ARM mode). Only enabling "-marm" makes it compile happy.
I've enabled "-marm" via package.env and it works like a charm, until running into the next issue.


Second one: if there's no "-fpermissive" in the CFLAGS, it fails complaining about a const char being cast to an integer.
This is a really stupid crash, because all it complains about is that a define is being set to a literal.

From file njcpudetect.h:
#define NJ_COMPILER_ARM_ARCH "Unable to determine valid NJ_COMPILER_ARM_ARCH (nanojit only supports ARMv4T or later)"

Changing the line to read     #define NJ_COMPILER_ARM_ARCH 0
makes it happy again. or applying "-fpermissive" to the CFLAGS.
Comment 1 Walter Hüttenmeyer 2018-03-11 15:10:12 UTC
Created attachment 523510 [details]
dev-lang:spidermonkey-1.8.5-r6:20180311-150425.log

It's throwing errors due to __thumb2__ or __thumb__ not being defined.
Comment 2 Walter Hüttenmeyer 2018-03-11 15:14:35 UTC
Created attachment 523514 [details]
GCC defines without -marm

gcc -dM -E - < /dev/null gives me this on a Raspberry Pi3.
Note the missing __thumb__ and __thumb2__ defines.
Comment 3 Walter Hüttenmeyer 2018-03-11 15:16:31 UTC
Created attachment 523516 [details]
GCC defines with -marm

gcc -marm -dM -E - < /dev/null gives me this on a Raspberry Pi3.
Note the defined __thumb__ and __thumb2__ macros.
Comment 4 Walter Hüttenmeyer 2018-03-11 15:33:24 UTC
strangely I cannot reproduce the second issue of breaking the compile due to the define being set to a string literal.

The first one is reproducable and is fixed by compiling with -mthumb.

However, I do not know if this is desirable, as the source has code to swtich between ARM and THUMB mode for compilation.

AFAIK ARM mode is faster than THUMB, but I could not get spidermonkey to compile in any other way than using -marm.
Comment 5 Sam James archtester Gentoo Infrastructure gentoo-dev Security 2022-11-24 11:29:20 UTC
spidermonkey <78 is no longer in tree. The codebase has changed substantially since then, so closing.