Support building JavaScriptCore with the Bionic C library
authorzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Sep 2017 07:07:45 +0000 (07:07 +0000)
committerzandobersek@gmail.com <zandobersek@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Tue, 26 Sep 2017 07:07:45 +0000 (07:07 +0000)
commit60b55c9a350e99daa80d327226d5b1f2b11c03b3
tree0f944a7a965eddc46442bbe67a972b3a7b3afb02
parent9ff4cfb8597c6623a065c51816cf338bd4216f3a
Support building JavaScriptCore with the Bionic C library
https://bugs.webkit.org/show_bug.cgi?id=177427

Reviewed by Michael Catanzaro.

Source/JavaScriptCore:

When compiling with the Bionic C library, the MachineContext.h header
should enable the same code paths that are enabled for the GNU C library.

The Bionic C library defines the __BIONIC__ macro, but unlike other C
libraries that mimic the GNU one, it doesn't define __GLIBC__. So the
__BIONIC__ macro checks have to match the __GLIBC__ ones.

* runtime/MachineContext.h:
(JSC::MachineContext::stackPointer):
(JSC::MachineContext::framePointer):
(JSC::MachineContext::instructionPointer):
(JSC::MachineContext::argumentPointer<1>):
(JSC::MachineContext::llintInstructionPointer):

Source/WTF:

* wtf/Platform.h: Define HAVE_MACHINE_CONTEXT when __BIONIC__
is defined, i.e. when building with the Bionic C library.

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@222495 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/MachineContext.h
Source/WTF/ChangeLog
Source/WTF/wtf/Platform.h