From: DRC Date: Wed, 6 Jan 2016 20:02:27 +0000 (-0600) Subject: Fix iOS ARM64 build broken by removal of .arch X-Git-Tag: 1.4.90~51 X-Git-Url: https://granicus.if.org/sourcecode?a=commitdiff_plain;h=5f2cbbd039ee71586ef39d5e41695079bf96b139;p=libjpeg-turbo Fix iOS ARM64 build broken by removal of .arch The unnecessary .arch directive was removed from the ARM64 SIMD code in d70a5c12fcb72443483456a2cc8dd18a4c238618, 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. --- diff --git a/acinclude.m4 b/acinclude.m4 index 8d66784..c59c4b6 100644 --- a/acinclude.m4 +++ b/acinclude.m4 @@ -219,14 +219,20 @@ AC_DEFUN([AC_CHECK_COMPATIBLE_ARM64_ASSEMBLER_IFELSE],[ CC="$CCAS" AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ .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 if test "x$ac_good_gnu_arm_assembler" = "xno" ; then CC="gas-preprocessor.pl $CCAS" AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ .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 CFLAGS="$ac_save_CFLAGS" CC="$ac_save_CC"