Do not try to disable CTE support if gcc does not have the corresponding flag.
[CONFIGURATION] * BUG: Do not try to disable CTE support if gcc does not have the corresponding flag. [INTERPRETER] * BUG: Do not try to disable CTE support if gcc does not have the corresponding flag.
This commit is contained in:
parent
ce140f53a6
commit
542d72d39d
2 changed files with 12 additions and 1 deletions
11
acinclude.m4
11
acinclude.m4
|
@ -382,6 +382,16 @@ AC_DEFUN([GB_INIT],
|
|||
AC_DEFINE(HAVE_GCC_VISIBILITY, 1, [Whether gcc supports -fvisibility=hidden])
|
||||
fi
|
||||
|
||||
dnl ---- check for -fcf-protection=return compiler flag
|
||||
|
||||
have_gcc_nocte=no
|
||||
|
||||
GB_CFLAGS_GCC_OPTION([-fcf-protection=return],,
|
||||
[
|
||||
GB_CFLAGS_NOCTE=" -fcf-protection=return"
|
||||
have_gcc_nocte=yes
|
||||
])
|
||||
|
||||
dnl ---- check for -flto compiler flag
|
||||
|
||||
GB_CFLAGS_GCC_OPTION([-flto],,
|
||||
|
@ -465,6 +475,7 @@ AC_DEFUN([GB_INIT],
|
|||
AC_SUBST(AM_CXXFLAGS)
|
||||
AC_SUBST(AM_CXXFLAGS_OPT)
|
||||
AC_SUBST(GB_CFLAGS_LTO)
|
||||
AC_SUBST(GB_CFLAGS_NOCTE)
|
||||
AC_SUBST(GB_CXXFLAGS_STD_CPP11)
|
||||
AC_SUBST(GB_CXXFLAGS_STD_CPP17)
|
||||
|
||||
|
|
|
@ -5,7 +5,7 @@ bin_PROGRAMS = gbx3
|
|||
noinst_LIBRARIES = libgbx.a
|
||||
gblib_LTLIBRARIES = gb.la
|
||||
|
||||
libgbx_a_CFLAGS = -DGAMBAS_PATH="\"$(bindir)\"" -Wno-address-of-packed-member -Wno-stringop-truncation -fcf-protection=return $(AM_CFLAGS)
|
||||
libgbx_a_CFLAGS = -DGAMBAS_PATH="\"$(bindir)\"" -Wno-address-of-packed-member -Wno-stringop-truncation $(GB_CFLAGS_NOCTE) $(AM_CFLAGS)
|
||||
|
||||
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@
|
||||
|
|
Loading…
Reference in a new issue