Fix iOS ARM64 build broken by removal of .arch

The unnecessary .arch directive was removed from the ARM64 SIMD code
in d70a5c12fc, thus allowing clang's
integrated assembler to assemble the code on Linux systems.  However,
this broke the detection mechanism in acinclude.m4 that tells the build
system whether it needs to use gas-preprocessor.pl.  Since one of the
primary motivators for using gas-preprocessor.pl with ARM64 builds is
the lack of .req/.unreq directives in Apple's implementation of clang,
acinclude.m4 now checks whether .req/.unreq can be properly assembled
and uses gas-preprocessor.pl if not.

Closes #33.
This commit is contained in:
DRC
2016-01-06 14:02:27 -06:00
parent fbe5007fbc
commit 5f2cbbd039

View File

@@ -219,14 +219,20 @@ AC_DEFUN([AC_CHECK_COMPATIBLE_ARM64_ASSEMBLER_IFELSE],[
CC="$CCAS" CC="$CCAS"
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
.text .text
movi v0.16b, #100]])], ac_good_gnu_arm_assembler=yes) MYVAR .req x0
movi v0.16b, #100
mov MYVAR, #100
.unreq MYVAR]])], ac_good_gnu_arm_assembler=yes)
ac_use_gas_preprocessor=no ac_use_gas_preprocessor=no
if test "x$ac_good_gnu_arm_assembler" = "xno" ; then if test "x$ac_good_gnu_arm_assembler" = "xno" ; then
CC="gas-preprocessor.pl $CCAS" CC="gas-preprocessor.pl $CCAS"
AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ AC_COMPILE_IFELSE([AC_LANG_SOURCE([[
.text .text
movi v0.16b, #100]])], ac_use_gas_preprocessor=yes) MYVAR .req x0
movi v0.16b, #100
mov MYVAR, #100
.unreq MYVAR]])], ac_use_gas_preprocessor=yes)
fi fi
CFLAGS="$ac_save_CFLAGS" CFLAGS="$ac_save_CFLAGS"
CC="$ac_save_CC" CC="$ac_save_CC"