Closed Bug 2056917 Opened 3 months ago Closed

[riscv64] Compilation failure on GCC 15+: declaration of ‘int js::jit::InstructionBase::BaseOpcode() const’ changes meaning of ‘BaseOpcode’

Categories

(Core :: JavaScript Engine: JIT, defect)

RISCV64
Unspecified
defect

Tracking

()

RESOLVED FIXED
155 Branch
Tracking Status
firefox-esr153 --- fixed
firefox153 --- fixed
firefox154 --- fixed
firefox155 --- fixed

People

(Reporter: csmantle, Assigned: csmantle)

References

(Blocks 1 open bug)

Details

Attachments

(3 external files)

When building SM/Fx targeting riscv64{,-simulator} with GCC 15.3.0 or 16.1.1, the following error occurs:

74:33.11 E /var/cache/acbs/build/acbs.gndd9uk9/firefox-153.0/js/src/jit/riscv64/base/Instruction.h:215:14: error: declaration of ‘int js::jit::InstructionBase::BaseOpcode() const’ changes meaning of ‘BaseOpcode’ [-Wchanges-meaning]
74:33.11 E 215 | inline int BaseOpcode() const { return InstructionBits() & kBaseOpcodeMask; }
74:33.12 E | ^~~~~~~~~~
74:33.13 E /var/cache/acbs/build/acbs.gndd9uk9/firefox-153.0/js/src/jit/riscv64/base/Instruction.h:133:10: note: used here to mean ‘enum js::jit::BaseOpcode’
74:33.13 E 133 | inline BaseOpcode BaseOpcodeFieldRaw() const {
74:33.14 E | ^~~~~~~~~~
74:33.14 W In file included from /var/cache/acbs/build/acbs.gndd9uk9/firefox-153.0/js/src/jit/riscv64/constant/Constant-riscv64.h:8,
74:33.15 W from /var/cache/acbs/build/acbs.gndd9uk9/firefox-153.0/js/src/jit/riscv64/base/Instruction.h:13:
74:33.16 W /var/cache/acbs/build/acbs.gndd9uk9/firefox-153.0/js/src/jit/riscv64/constant/Base-constant-riscv.h:258:6: note: declared here
74:33.16 W 258 | enum BaseOpcode : uint32_t {
74:33.17 W | ^~~~~~~~~~
74:36.87 W In file included from /var/cache/acbs/build/acbs.gndd9uk9/firefox-153.0/js/src/jit/riscv64/base/base-assembler-riscv.h:42, 

Qualifying BaseOpcode in the return type position should fix it (Compiler Explorer before, after).

Hardware: Unspecified → RISCV64
Blocks: sm-riscv64
Assignee: nobody → webmaster
Status: NEW → ASSIGNED
Pushed by webmaster@csmantle.top: https://github.com/mozilla-firefox/firefox/commit/0be02e974718 https://hg.mozilla.org/integration/autoland/rev/dbd09a636597 [riscv64] Qualify enum BaseOpcode in return type position in InstructionBase. r=anba
Status: ASSIGNED → RESOLVED
Closed: 3 months ago
Closed: 3 months ago
Resolution: --- → FIXED
Target Milestone: --- → 155 Branch
Attachment #9616100 - Flags: approval-mozilla-beta?

firefox-beta Uplift Approval Request

  • User impact if declined/Reason for urgency: Firefox would fail to build on RISC-V platforms using GCC.
  • Code covered by automated testing?: no
  • Fix verified in Nightly?: yes
  • Needs manual QE testing?: no
  • Steps to reproduce for manual QE testing: N/A.
  • Risk associated with taking this patch: low
  • Explanation of risk level: This is a two-line fix targeting a Tier-3 platform, so the impact is limited.
  • String changes made/needed?: None.
  • Is Android affected?: no

firefox-release Uplift Approval Request

  • User impact if declined/Reason for urgency: Firefox would fail to build on RISC-V platforms using GCC.
  • Code covered by automated testing?: no
  • Fix verified in Nightly?: yes
  • Needs manual QE testing?: no
  • Steps to reproduce for manual QE testing: N/A.
  • Risk associated with taking this patch: low
  • Explanation of risk level: This is a two-line fix targeting a Tier-3 platform, so the impact is limited.
  • String changes made/needed?: None.
  • Is Android affected?: no
Attachment #9616101 - Flags: approval-mozilla-release?
Attachment #9616100 - Flags: approval-mozilla-beta? → approval-mozilla-beta+
Attachment #9616101 - Flags: approval-mozilla-release? → approval-mozilla-release+
QA Whiteboard: [qa-triage-done-c155/b154]
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: