Browse Source

* More robust definition of CL_HAVE_ATTRIBUTE_FLATTEN.

master
Richard Kreckel 17 years ago
parent
commit
7c57b746de
  1. 5
      ChangeLog
  2. 12
      m4/cc.m4
  3. 2
      src/base/cl_maybe_inline.h

5
ChangeLog

@ -1,3 +1,8 @@
2007-02-15 Richard B. Kreckel <kreckel@ginac.de>
* m4/cc.m4 (CL_HAVE_ATTRIBUTE_FLATTEN): More robust definition allows...
* src/base/cl_maybe_inline.h (CL_FLATTEN): ...simplification here.
2007-02-10 Richard B. Kreckel <kreckel@ginac.de>
* autoconf/ltmain.sh: Update to libtool-1.5.26.

12
m4/cc.m4

@ -76,11 +76,15 @@ AC_CACHE_CHECK([whether the compiler supports __attribute__((flatten))], cl_cv_h
cat > conftest.cc <<EOF
void f() __attribute__((flatten));
EOF
AC_TRY_COMMAND(${CXX-g++} $CXXFLAGS -c conftest.cc >/dev/null 2>conftest.out)
if grep -i "warning" conftest.out > /dev/null; then
cl_cv_have_attr_flatten=no
if AC_TRY_COMMAND(${CXX-g++} $CXXFLAGS -c conftest.cc >/dev/null 2>conftest.stderr)
then
if grep -i "warning" conftest.stderr > /dev/null; then
cl_cv_have_attr_flatten=no
else
cl_cv_have_attr_flatten=yes
fi
else
cl_cv_have_attr_flatten=yes
cl_cv_have_attr_flatten=no
fi
rm -f conftest*
])

2
src/base/cl_maybe_inline.h

@ -102,7 +102,7 @@
* a function.
* 2. It's ignored if the optimization is switched off.
*/
#if defined(__GNUC__) && defined(CL_HAVE_ATTRIBUTE_FLATTEN)
#if defined(CL_HAVE_ATTRIBUTE_FLATTEN)
#define CL_FLATTEN __attribute__((flatten))
#else
#define CL_FLATTEN

Loading…
Cancel
Save