Skip to content

Commit 5594d7a

Browse files
committed
configure: add --disable-lto option
lto is not universally available.
1 parent 3e55a4e commit 5594d7a

1 file changed

Lines changed: 7 additions & 2 deletions

File tree

configure.ac

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,6 @@ PKG_CHECK_MODULES([TG], [thunk_gen >= 1.5],, [
5050
DJ64_CFLAGS="$CFLAGS \
5151
-fno-common \
5252
-fpic \
53-
-flto=auto -ffat-lto-objects \
5453
-nostdinc \
5554
-ggdb3 \
5655
-O2 \
@@ -69,7 +68,13 @@ DJ64_CFLAGS="$CFLAGS \
6968
-Wsign-compare \
7069
-Wold-style-definition"
7170

72-
DJ64_LDFLAGS="$LDFLAGS -flto=auto -O2"
71+
DJ64_LDFLAGS="$LDFLAGS"
72+
73+
AC_ARG_ENABLE(lto, AS_HELP_STRING([--disable-lto], [disable LTO]))
74+
if test "$enable_lto" != "no" ; then
75+
DJ64_CFLAGS="$DJ64_CFLAGS -flto=auto -ffat-lto-objects"
76+
DJ64_LDFLAGS="$DJ64_LDFLAGS -flto=auto -O2"
77+
fi
7378

7479
machine=`$CC -dumpmachine | cut -d- -f1 | sed 's/i.86/i386/'`
7580
CONFIG_HOST=`uname -s`

0 commit comments

Comments
 (0)