Firefox 152 does not compile correctly on riscv64.
Categories
(Core :: JavaScript Engine: JIT, defect, P5)
Tracking
()
People
(Reporter: jason, Unassigned)
References
(Blocks 1 open bug)
Details
User Agent: Mozilla/5.0 (X11; Linux x86_64; rv:152.0) Gecko/20100101 Firefox/152.0
Steps to reproduce:
Tried to build firefox 152.0 on Fedora Linux riscv64. The build log is here:
https://riscv-kojipkgs.fedoraproject.org//work/tasks/7616/227616/build.log
This is a regression. 151.0.3 builds fine. https://riscv-kojipkgs.fedoraproject.org/koji/buildinfo?buildID=91316
Starting with this commit jit/riscv64/Simulator-riscv64.h causes a build failure if JS_SIMULATOR_RISCV64 is not defined.
https://github.com/mozilla-firefox/firefox/commit/50ee31654072305236581ecd5e1bb87a4411af49#diff-153ebaad3fd2c836795d9d8e687e096329ade2021f0c57fc2e8d2c79b7c07458R31-R33
js/src/jit/riscv64/constant/Base-constant-riscv.cpp unconditionally includes jit/riscv64/Simulator-riscv64.h even if JS_SIMULATOR_RISCV64 is not defined.
Adding an ifdef allows the build to succeed.
diff --git a/js/src/jit/riscv64/constant/Base-constant-riscv.cpp b/js/src/jit/riscv64/constant/Base-constant-riscv.cpp
--- a/js/src/jit/riscv64/constant/Base-constant-riscv.cpp
+++ b/js/src/jit/riscv64/constant/Base-constant-riscv.cpp
@@ -13,7 +13,9 @@
#include "jit/riscv64/constant/Constant-riscv-v.h"
#include "jit/riscv64/constant/Constant-riscv-zicsr.h"
#include "jit/riscv64/constant/Constant-riscv-zifencei.h"
+#ifdef JS_SIMULATOR_RISCV64
#include "jit/riscv64/Simulator-riscv64.h"
+#endif
namespace js {
namespace jit {
Successful scratch build with this patched
https://riscv-kojipkgs.fedoraproject.org/koji/taskinfo?taskID=227669
Actual results:
The build fails.
Expected results:
The build should have succeeded.
Comment 1•3 months ago
|
||
The Bugbug bot thinks this bug should belong to the 'Core::JavaScript Engine: JIT' component, and is moving the bug to that component. Please correct in case you think the bot is wrong.
Comment 2•3 months ago
•
|
||
I have also experienced the same before; CC'ing :anba.
This seems to be a transient state between two series of patches, the first of which managed to get onto Fx152 train while the later one didn't.
I used https://github.com/AOSC-Dev/aosc-os-abbs/blob/a2b3abf61f9244342b88a2f1dd19e9fada1825bd/app-web/firefox/autobuild/patches/0005-AOSCOS-Guard-stray-inclusion-of-Simulator-riscv64.h.patch as a solution which is similar to what Jason proposed.
Updated•3 months ago
|
Description
•