Jun Yuan Tan 3909103724 Update v8 source | 1 year ago | |
---|---|---|
.. | ||
patch | 1 year ago | |
v8-10.2.154.13 | 1 year ago | |
README.md | 1 year ago |
===v8 10.2.154.13 Cross-compiling===
Reference doc: https://github.com/riscv-collab/v8/wiki/Get-the-Source
Install depot_tools and add it into your PATH.
Then, create a new folder and ‘fetch v8’ in the directory, example as below:
$ mkdir v8-cr
$ cd v8-cr
$ fetch v8
Alternatively, you can use exisiting source code:
$ cd v8-10.2.154.13
Then, run the following so that the gclient tool will retrieve the dependencies that match to this particular branch. $ cd v8-cr/v8 $ gclient sync –with_branch_heads –with_tags
Prepare RISC-V Toolchain and add the toolchain path to PATH:
$ export PATH=»:$PATH»
The following files are need to be made:
gcc_toolchain(«riscv64») {
cc = «${toolprefix}-gcc» cxx = «${toolprefix}-g++»
Apply the following patches: $ git apply 0001-riscv64-disable-fp-multiply-and-accumulate-instructi.patch $ git apply 0002-riscv64-fix-the-staticstackframesize.patch
Use gn to configure the build as such:
$ gn gen out/riscv64.native.release –args=‘is_component_build=false is_debug=false target_cpu=«riscv64» v8_target_cpu=«riscv64» use_goma=false goma_dir=«None» treat_warnings_as_errors=false v8_use_external_startup_data=false’
$ ninja -C out/riscv64.native.release -j32