Skip to content
Permalink
Browse files

Fix link time optimization flag

`$cxx_build` does not exist so gcc is not called to report specifications
  • Loading branch information...
flip111 committed Feb 27, 2019
1 parent 7ebe0b1 commit 5ded82e00d41f60b70047293e3adcdb05c1505fa
Showing with 1 addition and 2 deletions.
  1. +1 −2 config.lib
@@ -379,14 +379,13 @@ check_params() {

if [ "$enable_lto" != "0" ]; then
# GCC 4.5 outputs '%{flto}', GCC 4.6 outputs '%{flto*}'
has_lto=`($cxx_build -dumpspecs 2>&1 | grep '\%{flto') || ($cxx_build -help ipo 2>&1 | grep '\-ipo')`
has_lto=`($cc_build -dumpspecs 2>&1 | grep '\%{flto') || ($cc_build -help ipo 2>&1 | grep '\-ipo')`
if [ -n "$has_lto" ]; then
log 1 "using link time optimization... yes"
else
enable_lto="0"
log 1 "using link time optimization... no"
log 1 "WARNING: you selected link time optimization but it is not found."
sleep 5
fi
else
log 1 "using link time optimization... no"

0 comments on commit 5ded82e

Please sign in to comment.
You can’t perform that action at this time.