1
0
mirror of https://github.com/gryf/wmaker.git synced 2025-12-21 13:28:05 +01:00

Detect if gcc is able to compile x86 asm and if it supports passing more

than 10 parameters in inline asm, else disable asm code.
This should enable it to work on any x86 platform (not just linux as before)
given that a recent enough gcc is available (no more need to guess by looking
at $host)

This should also fix the issues of compiling wrlib with gcc-2.95
This commit is contained in:
dan
2004-10-31 05:33:39 +00:00
parent d292143af1
commit d7d3003e06

View File

@@ -205,23 +205,19 @@ dnl -----------------------
asm_support=no
mmx_support=no
if test "$ac_cv_prog_gcc" = yes; then
# gcc-3.4 complains about some of our stuff without this
# gcc-3.3 or newer complains about some of our stuff without this
NOSTRICTALIASING="-fno-strict-aliasing"
x86=0
changequote(,)dnl
case "$host_cpu" in
i[3456]86) x86=1
;;
esac
changequote([,])dnl
AC_CACHE_CHECK(whether gcc supports x86 inline asm,
ac_cv_c_inline_asm,
[AC_TRY_LINK(,[{int x; asm volatile("movl %%eax, %%ebx\n"::
"m" (x),"m" (x),"m" (x),"m" (x),"m" (x),"m" (x),
"m" (x),"m" (x),"m" (x),"m" (x),"m" (x),"m" (x));}],
ac_cv_c_inline_asm=yes,
ac_cv_c_inline_asm=no)])
if test "$host_os" != "linux" -a "$host_os" != "linux-gnu" ; then
x86=0
fi
if test $x86 = 1; then
if test "x$ac_cv_c_inline_asm" = xyes; then
AC_DEFINE(ASM_X86, 1, [define if processor is x86 (normally detected by configure)])
asm_support=yes