Bug 61235 - JavaScriptCore doesn't build on MinGW-w64
Summary: JavaScriptCore doesn't build on MinGW-w64
Status: RESOLVED INVALID
Alias: None
Product: WebKit
Classification: Unclassified
Component: JavaScriptCore (show other bugs)
Version: 528+ (Nightly build)
Hardware: PC Windows 7
: P1 Blocker
Assignee: Nobody
URL:
Keywords:
Depends on:
Blocks: 65313
  Show dependency treegraph
 
Reported: 2011-05-20 20:28 PDT by Jonathan Liu
Modified: 2011-08-28 00:52 PDT (History)
2 users (show)

See Also:


Attachments
Fix compilation on MinGW-w64 (682 bytes, patch)
2011-05-20 20:28 PDT, Jonathan Liu
no flags Details | Formatted Diff | Diff
Fix compilation on MinGW-w64 (588 bytes, patch)
2011-05-20 20:37 PDT, Jonathan Liu
no flags Details | Formatted Diff | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Jonathan Liu 2011-05-20 20:28:24 PDT
Created attachment 94311 [details]
Fix compilation on MinGW-w64

On MinGW-w64, ENABLE_EXECUTABLE_ALLOCATOR_FIXED is defined to 1 which causes JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp to fail to compile as it includes sys/mman.h which MinGW-w64 doesn't have.

Previously, sys/mman.h was only included by JavaScriptCore/jit/ExecutableAllocatorFixedVMPool.cpp if the OS is Darwin.
To fix this, JavaScriptCore/wtf/Platform.h is modified to only define ENABLE_EXECUTABLE_ALLOCATOR_FIXED to 1 if OS is Darwin.
Comment 1 Jonathan Liu 2011-05-20 20:37:25 PDT
Created attachment 94313 [details]
Fix compilation on MinGW-w64

As sys/mman.h is available on Linux, i've updated the patch to check whether the compiler is not MinGW instead of whether it is Darwin.
Comment 2 vanboxem.ruben 2011-08-04 09:11:13 PDT
Note that this probably also affects MSVC x64 by the looks of it. So any Win64 compiler really.
Comment 3 Jonathan Liu 2011-08-28 00:52:59 PDT
Disabling JIT as in bug 65313 means that ENABLE_ASSEMBLER will not be enabled. As a result, an executable allocator won't be enabled and compilation will succeed.