diff options
author | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2017-03-12 01:28:46 +0200 |
---|---|---|
committer | Costa Tsaousis (ktsaou) <costa@tsaousis.gr> | 2017-03-12 01:28:46 +0200 |
commit | aa20eece28fce4517d781b6c47ada472cb188faf (patch) | |
tree | 431c19c8015d4952c8a2ba19ac5b98ec98dcdfa2 /configure.ac | |
parent | a2b6ad6782b46f97a092addfa082e19e11053a9b (diff) |
allow -flto to be set when cross compiling
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/configure.ac b/configure.ac index 3eeedc4a1c..ddbc28e44f 100644 --- a/configure.ac +++ b/configure.ac @@ -405,9 +405,11 @@ fi if test "${have_lto}" = "yes"; then oCFLAGS="${CFLAGS}" CFLAGS="${CFLAGS} -flto ${OPTIONAL_MATH_CLFAGS} ${OPTIONAL_NFACCT_CLFAGS} ${OPTIONAL_ZLIB_CLFAGS} ${OPTIONAL_UUID_CLFAGS} ${OPTIONAL_LIBCAP_CFLAGS} ${OPTIONAL_IPMIMONITORING_CFLAGS}" + ac_cv_c_lto_cross_compile="${enable_lto}" + test "${ac_cv_c_lto_cross_compile}" != "yes" && ac_cv_c_lto_cross_compile="no" AC_C_LTO CFLAGS="${oCFLAGS}" - test "${ac_cv_c_lto}" = "no" && have_lto="no" + test "${ac_cv_c_lto}" != "yes" && have_lto="no" fi test "${enable_lto}" = "yes" -a "${have_lto}" != "yes" && \ AC_MSG_ERROR([LTO is required but is not available.]) |