Check if the "-flto" link time optimzation flag is available.
[CONFIGURATION] * BUG: Check if the "-flto" link time optimzation flag is available.
This commit is contained in:
parent
85376261ea
commit
14614f4e67
2 changed files with 16 additions and 3 deletions
13
acinclude.m4
13
acinclude.m4
|
@ -322,6 +322,18 @@ AC_DEFUN([GB_INIT],
|
|||
AC_DEFINE(HAVE_GCC_VISIBILITY, 1, [Whether gcc supports -fvisibility=hidden])
|
||||
fi
|
||||
|
||||
dnl ---- check for -flto compiler flag
|
||||
|
||||
GB_CFLAGS_GCC_OPTION([-flto],,
|
||||
[
|
||||
GB_CFLAGS_LTO=" -flto"
|
||||
have_gcc_lto=yes
|
||||
])
|
||||
|
||||
if test "$have_gcc_lto" = "yes"; then
|
||||
AC_DEFINE(HAVE_GCC_LTO, 1, [Whether gcc supports -flto])
|
||||
fi
|
||||
|
||||
dnl ---- Debug flags
|
||||
|
||||
if test "$gambas_debug" = "yes"; then
|
||||
|
@ -350,6 +362,7 @@ AC_DEFUN([GB_INIT],
|
|||
AC_SUBST(AM_CFLAGS_OPT)
|
||||
AC_SUBST(AM_CXXFLAGS)
|
||||
AC_SUBST(AM_CXXFLAGS_OPT)
|
||||
AC_SUBST(GB_CFLAGS_LTO)
|
||||
|
||||
rm -f DISABLED DISABLED.*
|
||||
])
|
||||
|
|
|
@ -1,5 +1,5 @@
|
|||
AM_CFLAGS += -I$(top_srcdir)/share @INTL_INC@ @CONV_INC@ @GBX_THREAD_INC@ @FFI_INC@
|
||||
AM_CFLAGS_OPT += -I$(top_srcdir)/share
|
||||
AM_CFLAGS += $(GB_CFLAGS_LTO) -I$(top_srcdir)/share @INTL_INC@ @CONV_INC@ @GBX_THREAD_INC@ @FFI_INC@
|
||||
AM_CFLAGS_OPT += $(GB_CFLAGS_LTO) -I$(top_srcdir)/share
|
||||
|
||||
bin_PROGRAMS = gbx3
|
||||
noinst_LIBRARIES = libgbx.a
|
||||
|
@ -9,7 +9,7 @@ libgbx_a_CFLAGS = -DGAMBAS_PATH="\"$(bindir)\"" $(AM_CFLAGS_OPT)
|
|||
|
||||
gbx3_LDADD = @C_LIB@ @GBX_THREAD_LIB@ libgbx.a @MATH_LIB@ @INTL_LIB@ @CONV_LIB@ @GETTEXT_LIB@ @DL_LIB@ @FFI_LIB@ @RT_LIB@
|
||||
gbx3_LDFLAGS = @LD_FLAGS@ @GBX_THREAD_LDFLAGS@ @INTL_LDFLAGS@ @CONV_LDFLAGS@ @GETTEXT_LDFLAGS@ @FFI_LDFLAGS@ @RT_LDFLAGS@
|
||||
gbx3_CFLAGS = -DGAMBAS_PATH="\"$(bindir)\"" $(AM_CFLAGS) -flto
|
||||
gbx3_CFLAGS = -DGAMBAS_PATH="\"$(bindir)\"" $(AM_CFLAGS)
|
||||
|
||||
gb_la_LIBADD = @C_LIB@ @GBX_THREAD_LIB@ @MATH_LIB@ @INTL_LIB@ @CONV_LIB@ @GETTEXT_LIB@ @DL_LIB@ @FFI_LIB@ @RT_LIB@
|
||||
gb_la_LDFLAGS = -module @LD_FLAGS@ @INTL_LDFLAGS@ @CONV_LDFLAGS@ @GETTEXT_LDFLAGS@ @FFI_LDFLAGS@ @RT_LDFLAGS@
|
||||
|
|
Loading…
Reference in a new issue