Don't enable LTO on Solaris.

This commit is contained in:
Dianne Skoll
2025-10-20 11:40:18 -04:00
parent aa56d27aea
commit 8e4987eeba
2 changed files with 8 additions and 4 deletions

6
configure vendored
View File

@@ -4225,8 +4225,10 @@ printf "%s\n" "#define TM_IN_SYS_TIME 1" >>confdefs.h
fi
U="`uname -s`"
if test "$GCC" = yes; then
# LTO fails on Solaris for some reason
if test "$U" != "SunOS" -a "$GCC" = yes; then
CFLAGS="$CFLAGS -Wall -Wextra -Wstrict-prototypes"
# Check for link-time optimization support
CFLAGS="$CFLAGS -flto=auto"
@@ -4260,7 +4262,7 @@ printf "%s\n" "$lto" >&6; }
else
{ printf "%s\n" "$as_me:${as_lineno-$LINENO}: checking whether $CC supports -ffat-lto-object" >&5
printf %s "checking whether $CC supports -ffat-lto-object... " >&6; }
CFLAGS="$CFLAGS -flto=auto -ffat-lto-objects"
CFLAGS="$CFLAGS -ffat-lto-objects"
cat confdefs.h - <<_ACEOF >conftest.$ac_ext
/* end confdefs.h. */
int x = 1;

View File

@@ -44,8 +44,10 @@ AC_CHECK_HEADERS(strings.h sys/types.h glob.h wctype.h locale.h langinfo.h sys/i
dnl Checks for typedefs, structures, and compiler characteristics.
AC_STRUCT_TM
U="`uname -s`"
if test "$GCC" = yes; then
# LTO fails on Solaris for some reason
if test "$U" != "SunOS" -a "$GCC" = yes; then
CFLAGS="$CFLAGS -Wall -Wextra -Wstrict-prototypes"
# Check for link-time optimization support
CFLAGS="$CFLAGS -flto=auto"
@@ -62,7 +64,7 @@ if test "$GCC" = yes; then
CFLAGS="$CFLAGS -Wall -Wextra -Wstrict-prototypes"
else
AC_MSG_CHECKING([whether $CC supports -ffat-lto-object])
CFLAGS="$CFLAGS -flto=auto -ffat-lto-objects"
CFLAGS="$CFLAGS -ffat-lto-objects"
AC_LINK_IFELSE(
[AC_LANG_PROGRAM(
[[int x = 1;]],