Commit fb7f71e1 authored by Matthieu Schaller's avatar Matthieu Schaller
Browse files

Merge branch 'autotools-update' into 'master'

Update the IPO support for GCC and CLANG.

Closes #539

See merge request !735
parents 3b874df8 6d2ea709
......@@ -104,9 +104,17 @@ if test "$enable_ipo" = "yes"; then
elif test "$ax_cv_c_compiler_vendor" = "gnu"; then
CFLAGS="$CFLAGS -flto"
LDFLAGS="$LDFLAGS -flto"
AX_COMPARE_VERSION($ax_cv_c_compiler_version, [ge], [5.0.0],
[
: ${AR="gcc-ar"}
: ${RANLIB="gcc-ranlib"}
], [:] )
AC_MSG_RESULT([added GCC interprocedural optimization support])
elif test "$ax_cv_c_compiler_vendor" = "clang"; then
CFLAGS="$CFLAGS -emit-llvm"
CFLAGS="$CFLAGS -flto"
: ${AR="llvm-ar"}
: ${LD="llvm-ld"}
: ${RANLIB="llvm-ranlib"}
AC_MSG_RESULT([added LLVM interprocedural optimization support])
else
AC_MSG_WARN([Compiler does not support interprocedural optimization])
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment