[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Monotone-devel] Re: illegal instruction again [was: Re: monotone 0.11 t
From: |
Peter Simons |
Subject: |
[Monotone-devel] Re: illegal instruction again [was: Re: monotone 0.11 test failures] |
Date: |
11 Apr 2004 11:25:35 +0200 |
Jonathan Matthew writes:
> AC_CHECK_HEADERS(emmintrin.h, [CXXFLAGS_MSSE2="-msse2"])
> test "z$CXXFLAGS" = "z" && CXXFLAGS="-O2 -fno-strict-aliasing
> $CXXFLAGS_MSSE2"
A (somewhat) minor problem with this code is that it tests
for the existence of $CXXFLAGS in a sub-shell. The variable
will not be visible for the test unless it has been
exported. You cannot say
CXXFLAGS=-O0 ./configure
but have to use:
export CXXFLAGS=-O0
./configure
This is uncommon for configure scripts, so I'd recommend
using the shell-internal mechanism for the test instead:
CXXFLAGS=${CXXFLAGS:--O2 -fno-strict-aliasing $CXXFLAGS_MSSE2}
Oh, and about the '-msse2' flag: I wouldn't enable MSSE
support, just because some header file exists! Personally, I
would never enable it automatically but provide an
--enable-msse2 option to configure. If one wants to check, I
think
grep msse /proc/cpuinfo
is a better test -- at least on Linux. But all that fails
miserable when you are cross-compiling.
Peter