From: Julian Seward Date: Sun, 3 Jul 2005 10:41:02 +0000 (+0000) Subject: gcc-4.0.1 rejects insn_{mmx,sse,sse2}.c despite the fact that X-Git-Tag: svn/VALGRIND_3_0_0~222 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=546fa768bad6b96e31a541fefe8c6ff909d89e2c;p=thirdparty%2Fvalgrind.git gcc-4.0.1 rejects insn_{mmx,sse,sse2}.c despite the fact that gcc-4.0.0 accepted it. This commit adds flags to placate 4.0.1 (from Dirk Mueller). git-svn-id: svn://svn.valgrind.org/valgrind/trunk@4096 --- diff --git a/configure.in b/configure.in index 7a615c8b42..4e7135eda2 100644 --- a/configure.in +++ b/configure.in @@ -316,6 +316,48 @@ CFLAGS=$safe_CFLAGS AC_SUBST(FLAG_M32) +# does this compiler support -mmmx ? +AC_MSG_CHECKING([if gcc accepts -mmmx]) + +safe_CFLAGS=$CFLAGS +CFLAGS="-mmmx" + +AC_TRY_COMPILE(, [ +int main () { return 0 ; } +], +[ +FLAG_MMMX="-mmmx" +AC_MSG_RESULT([yes]) +], [ +FLAG_MMMX="" +AC_MSG_RESULT([no]) +]) +CFLAGS=$safe_CFLAGS + +AC_SUBST(FLAG_MMMX) + + +# does this compiler support -msse ? +AC_MSG_CHECKING([if gcc accepts -msse]) + +safe_CFLAGS=$CFLAGS +CFLAGS="-msse" + +AC_TRY_COMPILE(, [ +int main () { return 0 ; } +], +[ +FLAG_MSSE="-msse" +AC_MSG_RESULT([yes]) +], [ +FLAG_MSSE="" +AC_MSG_RESULT([no]) +]) +CFLAGS=$safe_CFLAGS + +AC_SUBST(FLAG_MSSE) + + # does this compiler support -mpreferred-stack-boundary=2 ? AC_MSG_CHECKING([if gcc accepts -mpreferred-stack-boundary]) diff --git a/none/tests/x86/Makefile.am b/none/tests/x86/Makefile.am index b6476db88e..2c62d7df30 100644 --- a/none/tests/x86/Makefile.am +++ b/none/tests/x86/Makefile.am @@ -24,7 +24,10 @@ check_PROGRAMS = \ getseg $(INSN_TESTS) \ int pushpopseg seg_override sigcontext -AM_CFLAGS = $(WERROR) -Winline -Wall -Wshadow -g -I$(top_srcdir)/include +AM_CFLAGS = $(WERROR) -Winline -Wall -Wshadow \ + -g -I$(top_srcdir)/include \ + $(FLAG_MMMX) $(FLAG_MSSE) + AM_CXXFLAGS = $(AM_CFLAGS) # generic C ones