]> granicus.if.org Git - libjpeg-turbo/commitdiff
Fix iOS ARM64 build broken by removal of .arch
authorDRC <information@libjpeg-turbo.org>
Wed, 6 Jan 2016 20:02:27 +0000 (14:02 -0600)
committerDRC <information@libjpeg-turbo.org>
Wed, 6 Jan 2016 20:02:27 +0000 (14:02 -0600)
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.

acinclude.m4

index 8d6678495225cd91dc390b966a2ea83a53214255..c59c4b63b3fb12b858212bbc24fa1cbf258c7d95 100644 (file)
@@ -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"