mirror of
https://salsa.debian.org/dskoll/remind.git
synced 2026-04-17 06:48:47 +02:00
Only use -flto=auto and -ffat-lto-objects if C compiler supports them.
This commit is contained in:
8
configure
vendored
8
configure
vendored
@@ -3306,7 +3306,6 @@ fi
|
||||
|
||||
|
||||
|
||||
|
||||
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking for sqrt in -lm" >&5
|
||||
$as_echo_n "checking for sqrt in -lm... " >&6; }
|
||||
if ${ac_cv_lib_m_sqrt+:} false; then :
|
||||
@@ -3973,7 +3972,12 @@ fi
|
||||
|
||||
|
||||
if test "$GCC" = yes; then
|
||||
CFLAGS="$CFLAGS -Wall -Wextra -Wstrict-prototypes -flto=auto -ffat-lto-objects"
|
||||
CFLAGS="$CFLAGS -Wall -Wextra -Wstrict-prototypes"
|
||||
# Check for link-time optimization support
|
||||
for f in -flto=auto -ffat-lto-objects; do
|
||||
echo -n "Checking if C compiler supports $f... "
|
||||
if $CC -E $f /dev/null > /dev/null 2>&1 ; then echo "yes"; CFLAGS="$CFLAGS $f"; else echo "no"; fi
|
||||
done
|
||||
fi
|
||||
|
||||
if test "$ac_cv_perlartifacts" = "yes" ; then
|
||||
|
||||
@@ -28,8 +28,6 @@ AC_PROG_MAKE_SET
|
||||
AC_PATH_PROG([PERL], [perl])
|
||||
|
||||
dnl Checks for libraries.
|
||||
dnl Replace `main' with a function in -lm:
|
||||
|
||||
AC_CHECK_LIB(m, sqrt)
|
||||
|
||||
dnl Integer sizes
|
||||
@@ -47,7 +45,12 @@ AC_FUNC_UTIME_NULL
|
||||
AC_HEADER_TIME
|
||||
|
||||
if test "$GCC" = yes; then
|
||||
CFLAGS="$CFLAGS -Wall -Wextra -Wstrict-prototypes -flto=auto -ffat-lto-objects"
|
||||
CFLAGS="$CFLAGS -Wall -Wextra -Wstrict-prototypes"
|
||||
# Check for link-time optimization support
|
||||
for f in -flto=auto -ffat-lto-objects; do
|
||||
echo -n "Checking if C compiler supports $f... "
|
||||
if $CC -E $f /dev/null > /dev/null 2>&1 ; then echo "yes"; CFLAGS="$CFLAGS $f"; else echo "no"; fi
|
||||
done
|
||||
fi
|
||||
|
||||
if test "$ac_cv_perlartifacts" = "yes" ; then
|
||||
|
||||
Reference in New Issue
Block a user