Closed Bug 1216182 Opened 4 years ago Closed 4 years ago

Constant MODE_MASK interferes with Linux constant

Categories

(Core :: JavaScript Engine: JIT, defect)

defect
Not set

Tracking

()

RESOLVED FIXED
mozilla44
Tracking Status
firefox44 --- fixed

People

(Reporter: tzimmermann, Assigned: tzimmermann)

Details

Attachments

(1 file)

There's a MODE_MASK pre-processor constant on Linux. [1] This breaks the build on some B2G targets (e.g., flatfish).

[1] http://lxr.free-electrons.com/source/arch/avr32/include/uapi/asm/ptrace.h#L29
This token was apparently introduces in bug 991720. I guess the includes changed recently, so that the problem became visible now.
Attachment #8675742 - Flags: review?(hv1989)
BTW, the compile-time error is

In file included from ../../../../hg.mozilla.org/mozilla-central/js/src/jit/JitFrameIterator.h:15:0,
                 from ../../../../hg.mozilla.org/mozilla-central/js/src/vm/Stack.h:21,
                 from ../../../../hg.mozilla.org/mozilla-central/js/src/vm/Runtime.h:47,
                 from ../../../../hg.mozilla.org/mozilla-central/js/src/jscntxt.h:16,
                 from ../../../../hg.mozilla.org/mozilla-central/js/src/jsweakcache.h:10,
                 from ../../../../hg.mozilla.org/mozilla-central/js/src/jit/JitCompartment.h:13,
                 from ../../../../hg.mozilla.org/mozilla-central/js/src/jit/arm/Assembler-arm.h:17,
                 from /home/mozilla/Projects/mozilla/src/hg.mozilla.org/mozilla-central/js/src/jit/arm/Architecture-arm.cpp:16,
                 from Unified_cpp_js_src18.cpp:2:
../../../../hg.mozilla.org/mozilla-central/js/src/jit/Snapshots.h:83:9: error: expected identifier before numeric constant
         MODE_MASK           = 0x17f,
         ^
../../../../hg.mozilla.org/mozilla-central/js/src/jit/Snapshots.h:83:9: error: expected '}' before numeric constant
../../../../hg.mozilla.org/mozilla-central/js/src/jit/Snapshots.h:83:9: error: expected unqualified-id before numeric constant
../../../../hg.mozilla.org/mozilla-central/js/src/jit/Snapshots.h:106:3: error: expected unqualified-id before 'private'
   private:
   ^
../../../../hg.mozilla.org/mozilla-central/js/src/jit/Snapshots.h:163:41: error: 'Mode' was not declared in this scope
     static const Layout& layoutFromMode(Mode mode);
Comment on attachment 8675742 [details] [diff] [review]
[01] Bug 1216182: Rename MODE_MASK to MODE_BITS_MASK

Review of attachment 8675742 [details] [diff] [review]:
-----------------------------------------------------------------

Good catch
Attachment #8675742 - Flags: review?(hv1989) → review+
https://hg.mozilla.org/mozilla-central/rev/b3882ed5ba7a
Status: ASSIGNED → RESOLVED
Closed: 4 years ago
Resolution: --- → FIXED
Target Milestone: --- → mozilla44
You need to log in before you can comment on or make changes to this bug.