From: Mark Wooding Date: Wed, 5 Jul 2017 21:09:59 +0000 (+0100) Subject: configure.ac: Check for some brain damage from Clang's assembler. X-Git-Tag: 2.4.2~40 X-Git-Url: http://www.chiark.greenend.org.uk/ucgi/~mdw/git/catacomb/commitdiff_plain/8ed49b833de82dd5f8cf4c010a37cf8d2dc0e4ea configure.ac: Check for some brain damage from Clang's assembler. It doesn't understand `.arch' or the `adcd' instruction. I'm damned if I'm writing `dword ptr' everywhere, so Clang users will have to figure out some way to use Gas if they want the assembler code. --- diff --git a/configure.ac b/configure.ac index 8c32c92a..bdc94be7 100644 --- a/configure.ac +++ b/configure.ac @@ -98,8 +98,8 @@ case $host_cpu,$host_os in *) CPUFAM=nil ABI=nil ;; esac -dnl Now check the assembler. We may have target-specific requirements here, -dnl so we couldn't do this any earlier. +dnl Now check the assembler. We have target-specific requirements here, so +dnl we couldn't do this any earlier. AC_CACHE_CHECK( [whether the assembler is likely to work], [mdw_cv_gnuish_as], [AC_LANG_PUSH([CPPAS]) @@ -113,6 +113,22 @@ AC_CACHE_CHECK( .extern bar mymac]])], [mdw_cv_gnuish_as=yes], [mdw_cv_gnuish_as=no]) + case $CPUFAM in + x86 | amd64) + AC_COMPILE_IFELSE([AC_LANG_SOURCE([[ + .text + .arch pentium4 + .intel_syntax noprefix + .globl foo +foo: + adcd var, 0 + ret + .data +var: .long 1 + ]])], + [:], [mdw_cv_gnuish_as=no]) + ;; + esac AC_LANG_POP([CPPAS])]) AM_CONDITIONAL([GNUISH_AS], [test $mdw_cv_gnuish_as = yes]) if test $mdw_cv_gnuish_as = no; then CPUFAM=nil ABI=nil; fi