⛏️ index : buildtools.git

author Augustin Cavalier <waddlesplash@gmail.com> 2019-02-20 19:31:21.0 -05:00:00
committer Augustin Cavalier <waddlesplash@gmail.com> 2019-02-20 22:49:25.0 -05:00:00
commit
fd2fd983c5b1aa7d079e92e46a67c16f231fac5b [patch]
tree
91a772943ca71960302bc44abc40386914a2771d
parent
abcbee7bbace3ae5b6df384e879a0d1d24808476
download
fd2fd983c5b1aa7d079e92e46a67c16f231fac5b.tar.gz

gcc/mpfr: Disable LTO unconditionally.

This is kind of a hack, but really it's the configure script that
is broken, as it hard-checks for "gcc-ar" which of course does not
work with Clang builds. We want LTO to be enabled in GCC, and
GCC unconditionally passes all arguments it gets to sub-configures,
so all we can do is stop the flag from having any effect.

Fixes #14733.

Diff

 gcc/mpfr/configure | 19 ++++++++++---------
 1 file changed, 10 insertions(+), 9 deletions(-)

diff --git a/gcc/mpfr/configure b/gcc/mpfr/configure
index 6089eee..d4c5aa4 100755
--- a/gcc/mpfr/configure
+++ a/gcc/mpfr/configure
@@ -13399,16 +13399,17 @@


# Check whether --enable-lto was given.
enable_lto=no
if test "${enable_lto+set}" = set; then :
  enableval=$enable_lto;  case $enableval in
      yes)  if test "$enable_shared" != "no"; then
              as_fn_error $? "--enable-lto can only work in static mode (--disable-shared)" "$LINENO" 5
            fi
            enable_lto=yes
            ;;
      no)   ;;
      *)    as_fn_error $? "bad value for --enable-lto: yes or no" "$LINENO" 5 ;;
     esac
#  enableval=$enable_lto;  case $enableval in
#      yes)  if test "$enable_shared" != "no"; then
#              as_fn_error $? "--enable-lto can only work in static mode (--disable-shared)" "$LINENO" 5
#            fi
#            enable_lto=yes
#            ;;
#      no)   ;;
#      *)    as_fn_error $? "bad value for --enable-lto: yes or no" "$LINENO" 5 ;;
#     esac
fi