+2020-08-15 Bruno Haible <bruno@clisp.org>
+
+ Determine asm output option and filename suffix for MSVC/clang.
+ * m4/asm-underscore.m4 (gl_C_ASM): Distinguish clang from cl and
+ clang-cl.
+
2020-08-15 Bruno Haible <bruno@clisp.org>
doc: Update for MSVC/clang.
-# asm-underscore.m4 serial 4
+# asm-underscore.m4 serial 5
dnl Copyright (C) 2010-2020 Free Software Foundation, Inc.
dnl This file is free software; the Free Software Foundation
dnl gives unlimited permission to copy and/or distribute it,
MicrosoftCompiler
#endif
],
- [gl_asmext='asm'
- gl_c_asm_opt='-c -Fa'
+ [dnl Microsoft's 'cl' and 'clang-cl' produce an .asm file, whereas 'clang'
+ dnl produces a .s file. Need to distinguish 'clang' and 'clang-cl'.
+ rm -f conftest*
+ echo 'int dummy;' > conftest.c
+ AC_TRY_COMMAND(${CC-cc} $CFLAGS $CPPFLAGS -c conftest.c) >/dev/null 2>&1
+ if test -f conftest.o; then
+ gl_asmext='s'
+ gl_c_asm_opt='-S'
+ else
+ gl_asmext='asm'
+ gl_c_asm_opt='-c -Fa'
+ fi
+ rm -f conftest*
],
[gl_asmext='s'
gl_c_asm_opt='-S'