Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

build: add --with-arm-fpu option #3228

Closed
wants to merge 2 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
17 changes: 14 additions & 3 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ valid_os = ('win', 'mac', 'solaris', 'freebsd', 'openbsd', 'linux',
valid_arch = ('arm', 'arm64', 'ia32', 'mips', 'mipsel', 'ppc', 'ppc64', 'x32',
'x64', 'x86')
valid_arm_float_abi = ('soft', 'softfp', 'hard')
valid_arm_fpu = ('vfp', 'vfpv2', 'vfpv3', 'neon')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

V8 also knows about vfpv3-d16. I don't know how common it is but might be nice to add.

valid_mips_arch = ('loongson', 'r1', 'r2', 'r6', 'rx')
valid_mips_fpu = ('fp32', 'fp64', 'fpxx')
valid_mips_float_abi = ('soft', 'hard')
Expand Down Expand Up @@ -219,6 +220,13 @@ parser.add_option('--with-arm-float-abi',
help='specifies which floating-point ABI to use ({0}).'.format(
', '.join(valid_arm_float_abi)))

parser.add_option('--with-arm-fpu',
action='store',
dest='arm_fpu',
choices=valid_arm_fpu,
help='ARM FPU mode ({0}) [default: %default]'.format(
', '.join(valid_arm_fpu)))

parser.add_option('--with-mips-arch-variant',
action='store',
dest='mips_arch_variant',
Expand Down Expand Up @@ -605,21 +613,24 @@ def configure_arm(o):
arm_float_abi = 'hard'
else:
arm_float_abi = 'default'

arm_fpu = 'vfpv2'

if is_arch_armv7():
o['variables']['arm_fpu'] = 'vfpv3'
arm_fpu = 'vfpv3'
o['variables']['arm_version'] = '7'
else:
o['variables']['arm_fpu'] = 'vfpv2'
o['variables']['arm_version'] = '6' if is_arch_armv6() else 'default'

o['variables']['arm_thumb'] = 0 # -marm
o['variables']['arm_float_abi'] = arm_float_abi

if options.dest_os == 'android':
o['variables']['arm_fpu'] = 'vfpv3'
arm_fpu = 'vfpv3'
o['variables']['arm_version'] = '7'

o['variables']['arm_fpu'] = options.arm_fpu or arm_fpu


def configure_mips(o):
can_use_fpu_instructions = (options.mips_float_abi != 'soft')
Expand Down