arm_float_abi/arm_use_neon has different defaults for host and target when building v8 on linux arm
Reported by
rog...@opera.com,
Nov 7 2016
|
||
Issue description
Version: refs/heads/master@{#429543} (56.0.2909.0)
OS: Linux
What steps will reproduce the problem?
(1) gn gen out_arm --args="target_cpu=\"arm\""
(2) ninja -C out_arm/ -v v8
(3) Analyze the log
What is the expected output?
Host should be built with: -DUSE_EABI_HARDFLOAT=1 and -DCAN_USE_NEON
Target should be built with: -mfloat-abi=hard and -mfpu=neon
What do you see instead?
Host is built with: -DUSE_EABI_HARDFLOAT=0
Target is built with: -mfloat-abi=hard and -mfpu=neon
Please use labels and text to provide additional information.
Introduced by the following two CLs:
https://codereview.chromium.org/2187563004 (neon)
https://codereview.chromium.org/2182473002 (float_abi)
I think this makes the v8 snapshot data be built with different float configuration than v8. I'm experiencing issues with (at least) Math.pow(...) due to this and explicitly specifying arm_float_abi="hard" helps resolving that.
In an attempt to see where the problem comes from I added this code to build/config/arm.gni:
print("arm_float_abi : ", arm_float_abi)
print("arm_use_neon : ", arm_use_neon)
print("current_cpu : ", current_cpu)
print("v8_current_cpu: ", v8_current_cpu)
print("--")
assert(arm_float_abi != "softfp")
This is the output I get from gn:
arm_float_abi : hard
arm_use_neon : true
current_cpu : arm
v8_current_cpu: arm
--
arm_float_abi : softfp
arm_use_neon : false
current_cpu : x86
v8_current_cpu: arm
--
ERROR at //build/config/arm.gni:108:3: Assertion failed.
assert(arm_float_abi != "softfp")
^-----
See //v8/BUILD.gn:6:1: whence it was imported.
import("//build/config/arm.gni")
^------------------------------
See //BUILD.gn:1018:9: which caused the file to be included.
"//v8:v8_shell($v8_snapshot_toolchain)",
^--------------------------------------
,
Nov 9 2016
The following revision refers to this bug: https://chromium.googlesource.com/chromium/src.git/+/2c53ba1d955a7da25dbf63829b8e7052e7bf0ceb commit 2c53ba1d955a7da25dbf63829b8e7052e7bf0ceb Author: rogerj <rogerj@opera.com> Date: Wed Nov 09 00:00:19 2016 Build v8 snapshot with correct default float configuration on Linux ARM V8 currently defaults to arm_float_abi="hard" and arm_use_neon=true but the V8 snapshot defaults to arm_float_abi="softfp" and arm_use_neon=false on Linux ARM builds. This patch makes both targets default to hard + neon by changing the "is simulator build" check from comparing current_cpu with v8_current_cpu to comparing target_cpu with v8_target_cpu instead. Similarly to how it is checked in v8/BUILD.gn. BUG= 662856 Review-Url: https://codereview.chromium.org/2483153004 Cr-Commit-Position: refs/heads/master@{#430776} [modify] https://crrev.com/2c53ba1d955a7da25dbf63829b8e7052e7bf0ceb/build/config/arm.gni
,
Nov 9 2016
I think you're right, thanks for the fix! Feel free to set this to fixed, if it had the desired effect.
,
Nov 10 2016
Closing as fixed. Thanks for the prompt feedback. |
||
►
Sign in to add a comment |
||
Comment 1 by rog...@opera.com
, Nov 8 2016