Skip to content

Commit b3c5ad1

Browse files
kapouerjasnell
authored andcommitted
build: add --with-arm-fpu option
Fixes: #2942 PR-URL: #3228 Reviewed-By: Ben Noordhuis <[email protected]> Reviewed-By: Brian White <[email protected]>
1 parent e922716 commit b3c5ad1

File tree

1 file changed

+14
-3
lines changed

1 file changed

+14
-3
lines changed

configure

+14-3
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@ valid_os = ('win', 'mac', 'solaris', 'freebsd', 'openbsd', 'linux',
3030
valid_arch = ('arm', 'arm64', 'ia32', 'mips', 'mipsel', 'ppc', 'ppc64', 'x32',
3131
'x64', 'x86')
3232
valid_arm_float_abi = ('soft', 'softfp', 'hard')
33+
valid_arm_fpu = ('vfp', 'vfpv2', 'vfpv3', 'vfpv3-d16', 'neon')
3334
valid_mips_arch = ('loongson', 'r1', 'r2', 'r6', 'rx')
3435
valid_mips_fpu = ('fp32', 'fp64', 'fpxx')
3536
valid_mips_float_abi = ('soft', 'hard')
@@ -219,6 +220,13 @@ parser.add_option('--with-arm-float-abi',
219220
help='specifies which floating-point ABI to use ({0}).'.format(
220221
', '.join(valid_arm_float_abi)))
221222

223+
parser.add_option('--with-arm-fpu',
224+
action='store',
225+
dest='arm_fpu',
226+
choices=valid_arm_fpu,
227+
help='ARM FPU mode ({0}) [default: %default]'.format(
228+
', '.join(valid_arm_fpu)))
229+
222230
parser.add_option('--with-mips-arch-variant',
223231
action='store',
224232
dest='mips_arch_variant',
@@ -607,20 +615,23 @@ def configure_arm(o):
607615
else:
608616
arm_float_abi = 'default'
609617

618+
arm_fpu = 'vfpv2'
619+
610620
if is_arch_armv7():
611-
o['variables']['arm_fpu'] = 'vfpv3'
621+
arm_fpu = 'vfpv3'
612622
o['variables']['arm_version'] = '7'
613623
else:
614-
o['variables']['arm_fpu'] = 'vfpv2'
615624
o['variables']['arm_version'] = '6' if is_arch_armv6() else 'default'
616625

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

620629
if options.dest_os == 'android':
621-
o['variables']['arm_fpu'] = 'vfpv3'
630+
arm_fpu = 'vfpv3'
622631
o['variables']['arm_version'] = '7'
623632

633+
o['variables']['arm_fpu'] = options.arm_fpu or arm_fpu
634+
624635

625636
def configure_mips(o):
626637
can_use_fpu_instructions = (options.mips_float_abi != 'soft')

0 commit comments

Comments
 (0)