mirror of
https://github.com/gryf/wmaker.git
synced 2025-12-21 21:38:00 +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:
22
configure.ac
22
configure.ac
@@ -206,22 +206,18 @@ asm_support=no
|
|||||||
mmx_support=no
|
mmx_support=no
|
||||||
if test "$ac_cv_prog_gcc" = yes; then
|
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"
|
NOSTRICTALIASING="-fno-strict-aliasing"
|
||||||
|
|
||||||
x86=0
|
AC_CACHE_CHECK(whether gcc supports x86 inline asm,
|
||||||
changequote(,)dnl
|
ac_cv_c_inline_asm,
|
||||||
case "$host_cpu" in
|
[AC_TRY_LINK(,[{int x; asm volatile("movl %%eax, %%ebx\n"::
|
||||||
i[3456]86) x86=1
|
"m" (x),"m" (x),"m" (x),"m" (x),"m" (x),"m" (x),
|
||||||
;;
|
"m" (x),"m" (x),"m" (x),"m" (x),"m" (x),"m" (x));}],
|
||||||
esac
|
ac_cv_c_inline_asm=yes,
|
||||||
changequote([,])dnl
|
ac_cv_c_inline_asm=no)])
|
||||||
|
|
||||||
if test "$host_os" != "linux" -a "$host_os" != "linux-gnu" ; then
|
if test "x$ac_cv_c_inline_asm" = xyes; then
|
||||||
x86=0
|
|
||||||
fi
|
|
||||||
|
|
||||||
if test $x86 = 1; then
|
|
||||||
AC_DEFINE(ASM_X86, 1, [define if processor is x86 (normally detected by configure)])
|
AC_DEFINE(ASM_X86, 1, [define if processor is x86 (normally detected by configure)])
|
||||||
asm_support=yes
|
asm_support=yes
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user