diff mbox

Fix lto-bootstrap (PR bootstrap/79003).

Message ID 2f762812-0bda-0f35-a397-0bff66f39752@suse.cz
State Accepted
Commit eb0f878074743d4bcb63e32948ab7c1748c1efb8
Headers show

Commit Message

Martin Liška Jan. 6, 2017, 12:41 p.m. UTC
Hello.

This enables doable LTO bootstrap w/o -disable-werror. First change is mentioned
in the PR, second is adding -fno-lto to libdecnumber. Honza told me that proper
fix would take more effort as it's an old library. Last needed hunk handles -Wmaybe-uninitialized,
as described in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79003#c4.

Patch LTO bootstraps on x86_64-linux-gnu, can bootstrap on ppc64le-redhat-linux
and survives regression tests.

Ready to be installed?
Martin

Comments

Jakub Jelinek Jan. 6, 2017, 12:54 p.m. UTC | #1
On Fri, Jan 06, 2017 at 01:41:15PM +0100, Martin Liška wrote:
> Hello.

> 

> This enables doable LTO bootstrap w/o -disable-werror. First change is mentioned

> in the PR, second is adding -fno-lto to libdecnumber. Honza told me that proper

> fix would take more effort as it's an old library. Last needed hunk handles -Wmaybe-uninitialized,

> as described in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79003#c4.

> 

> Patch LTO bootstraps on x86_64-linux-gnu, can bootstrap on ppc64le-redhat-linux

> and survives regression tests.

> 

> Ready to be installed?

> Martin


> >From 67a3ccd99963ac19cbaebf17453cb51819c7bf1d Mon Sep 17 00:00:00 2001

> From: marxin <mliska@suse.cz>

> Date: Thu, 5 Jan 2017 17:18:27 +0100

> Subject: [PATCH] Fix lto-bootstrap (PR bootstrap/79003).

> 

> gcc/ChangeLog:

> 

> 2017-01-05  Martin Liska  <mliska@suse.cz>

> 

> 	PR bootstrap/79003

> 	* lra-constraints.c: Rename invariant to lra_invariant.

> 	* predict.c (set_even_probabilities): Initialize e to NULL.

> 

> libdecnumber/ChangeLog:

> 

> 2017-01-05  Martin Liska  <mliska@suse.cz>

> 

> 	PR bootstrap/79003

> 	* Makefile.in: Add -fno-lto to {C,CPP,LD}FLAGS.


Ok, thanks.

	Jakub
Christophe Lyon Jan. 6, 2017, 4:12 p.m. UTC | #2
Hi,


On 6 January 2017 at 13:54, Jakub Jelinek <jakub@redhat.com> wrote:
> On Fri, Jan 06, 2017 at 01:41:15PM +0100, Martin Liška wrote:

>> Hello.

>>

>> This enables doable LTO bootstrap w/o -disable-werror. First change is mentioned

>> in the PR, second is adding -fno-lto to libdecnumber. Honza told me that proper

>> fix would take more effort as it's an old library. Last needed hunk handles -Wmaybe-uninitialized,

>> as described in https://gcc.gnu.org/bugzilla/show_bug.cgi?id=79003#c4.

>>

>> Patch LTO bootstraps on x86_64-linux-gnu, can bootstrap on ppc64le-redhat-linux

>> and survives regression tests.

>>

>> Ready to be installed?

>> Martin

>

>> >From 67a3ccd99963ac19cbaebf17453cb51819c7bf1d Mon Sep 17 00:00:00 2001

>> From: marxin <mliska@suse.cz>

>> Date: Thu, 5 Jan 2017 17:18:27 +0100

>> Subject: [PATCH] Fix lto-bootstrap (PR bootstrap/79003).

>>

>> gcc/ChangeLog:

>>

>> 2017-01-05  Martin Liska  <mliska@suse.cz>

>>

>>       PR bootstrap/79003

>>       * lra-constraints.c: Rename invariant to lra_invariant.

>>       * predict.c (set_even_probabilities): Initialize e to NULL.

>>

>> libdecnumber/ChangeLog:

>>

>> 2017-01-05  Martin Liska  <mliska@suse.cz>

>>

>>       PR bootstrap/79003

>>       * Makefile.in: Add -fno-lto to {C,CPP,LD}FLAGS.

>

> Ok, thanks.

>

>         Jakub



This makes all my builds fail.
(The *linux* ones are broken after Alexandre's pragma, and
this commit breaks the remaining bare-metal configurations).
make[2]: Entering directory
`/tmp/3119026_6.tmpdir/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-aarch64-none-linux-gnu/gcc1/libdecnumber'
source='/tmp/3119026_6.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libdecnumber/decNumber.c'
object='decNumber.o' libtool=no gcc  -I/tmp/3
119026_6.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libdecnumber -I.
-fno-lto -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissi
ng-prototypes -Wold-style-definition -Wmissing-format-attribute
-Wcast-qual -pedantic -Wno-long-long
-I/tmp/3119026_6.tmpdir/aci-gcc-fs
f/sources/gcc-fsf/gccsrc/libdecnumber -I. -fno-lto  -c
/tmp/3119026_6.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libdecnumber/decNumber.c
cc1: error: unrecognized command line option "-fno-lto"
cc1: error: unrecognized command line option "-fno-lto"

Still using gcc-4.4.7 on RHEL6....

Christophe
Jakub Jelinek Jan. 6, 2017, 4:33 p.m. UTC | #3
On Fri, Jan 06, 2017 at 05:12:54PM +0100, Christophe Lyon wrote:
> This makes all my builds fail.

> (The *linux* ones are broken after Alexandre's pragma, and

> this commit breaks the remaining bare-metal configurations).

> make[2]: Entering directory

> `/tmp/3119026_6.tmpdir/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-aarch64-none-linux-gnu/gcc1/libdecnumber'

> source='/tmp/3119026_6.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libdecnumber/decNumber.c'

> object='decNumber.o' libtool=no gcc  -I/tmp/3

> 119026_6.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libdecnumber -I.

> -fno-lto -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissi

> ng-prototypes -Wold-style-definition -Wmissing-format-attribute

> -Wcast-qual -pedantic -Wno-long-long

> -I/tmp/3119026_6.tmpdir/aci-gcc-fs

> f/sources/gcc-fsf/gccsrc/libdecnumber -I. -fno-lto  -c

> /tmp/3119026_6.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libdecnumber/decNumber.c

> cc1: error: unrecognized command line option "-fno-lto"

> cc1: error: unrecognized command line option "-fno-lto"

> 

> Still using gcc-4.4.7 on RHEL6....


Actually, I'm surprised it is doing anything, because the toplevel
Makefile should be doing:
        $(HOST_EXPORTS)  \
        (cd $(HOST_SUBDIR)/libdecnumber && \
          $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS)  \
                $(TARGET-libdecnumber))
and both HOST_EXPORTS and BASE_FLAGS_TO_PASS include
        "CFLAGS=$(CFLAGS)" \
        "CXXFLAGS=$(CXXFLAGS)" \
        "LDFLAGS=$(LDFLAGS)" \
so it should override the libdecnumber/Makefile vars that way.
In any case, I think libdecnumber/configure* should check for whether
-fno-lto works and if yes, should substitute it into some var that is then
CFLAGS += $(NO_LTO)
CXXFLAGS += $(NO_LTO)
LDFLAGS += $(NO_LTO)

	Jakub
Christophe Lyon Jan. 6, 2017, 4:58 p.m. UTC | #4
On 6 January 2017 at 17:46, Jakub Jelinek <jakub@redhat.com> wrote:
> On Fri, Jan 06, 2017 at 05:33:03PM +0100, Jakub Jelinek wrote:

>> On Fri, Jan 06, 2017 at 05:12:54PM +0100, Christophe Lyon wrote:

>> > This makes all my builds fail.

>> > (The *linux* ones are broken after Alexandre's pragma, and

>> > this commit breaks the remaining bare-metal configurations).

>> > make[2]: Entering directory

>> > `/tmp/3119026_6.tmpdir/aci-gcc-fsf/builds/gcc-fsf-gccsrc/obj-aarch64-none-linux-gnu/gcc1/libdecnumber'

>> > source='/tmp/3119026_6.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libdecnumber/decNumber.c'

>> > object='decNumber.o' libtool=no gcc  -I/tmp/3

>> > 119026_6.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libdecnumber -I.

>> > -fno-lto -g -O2 -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissi

>> > ng-prototypes -Wold-style-definition -Wmissing-format-attribute

>> > -Wcast-qual -pedantic -Wno-long-long

>> > -I/tmp/3119026_6.tmpdir/aci-gcc-fs

>> > f/sources/gcc-fsf/gccsrc/libdecnumber -I. -fno-lto  -c

>> > /tmp/3119026_6.tmpdir/aci-gcc-fsf/sources/gcc-fsf/gccsrc/libdecnumber/decNumber.c

>> > cc1: error: unrecognized command line option "-fno-lto"

>> > cc1: error: unrecognized command line option "-fno-lto"

>> >

>> > Still using gcc-4.4.7 on RHEL6....

>>

>> Actually, I'm surprised it is doing anything, because the toplevel

>> Makefile should be doing:

>>         $(HOST_EXPORTS)  \

>>         (cd $(HOST_SUBDIR)/libdecnumber && \

>>           $(MAKE) $(BASE_FLAGS_TO_PASS) $(EXTRA_HOST_FLAGS) $(STAGE1_FLAGS_TO_PASS)  \

>>                 $(TARGET-libdecnumber))

>> and both HOST_EXPORTS and BASE_FLAGS_TO_PASS include

>>         "CFLAGS=$(CFLAGS)" \

>>         "CXXFLAGS=$(CXXFLAGS)" \

>>         "LDFLAGS=$(LDFLAGS)" \

>> so it should override the libdecnumber/Makefile vars that way.

The actual invocation does not appear in the logs, so I can't see
what is actually wrong.

>> In any case, I think libdecnumber/configure* should check for whether

>> -fno-lto works and if yes, should substitute it into some var that is then

>> CFLAGS += $(NO_LTO)

>> CXXFLAGS += $(NO_LTO)

>> LDFLAGS += $(NO_LTO)

>

> Trying now:

>

> 2017-01-06  Jakub Jelinek  <jakub@redhat.com>

>

>         * Makefile.in (CFLAGS, CPPFLAGS, LDFLAGS): Remove -fno-lto.

>         (NOLTO_FLAGS): New variable.

>         (ALL_CFLAGS): Use it.

>         * configure.ac (nolto_flags): New ACX_PROG_CC_WARNING_OPTS,

>         check for whether -fno-lto works.

>         * configure: Regenerated.

>

OK thanks for the prompt fix, I'll let you know if it doesn't work.

Christophe

> --- libdecnumber/Makefile.in.jj 2017-01-06 16:58:42.000000000 +0100

> +++ libdecnumber/Makefile.in    2017-01-06 17:40:31.520582350 +0100

> @@ -31,19 +31,20 @@ ACLOCAL = @ACLOCAL@

>  AUTOCONF = @AUTOCONF@

>  AUTOHEADER = @AUTOHEADER@

>  CC = @CC@

> -CFLAGS = @CFLAGS@ -fno-lto

> +CFLAGS = @CFLAGS@

>  WARN_CFLAGS = @WARN_CFLAGS@ @WARN_PEDANTIC@ @WERROR@

>  CPP = @CPP@

> -CPPFLAGS = @CPPFLAGS@ -fno-lto

> +CPPFLAGS = @CPPFLAGS@

>  INSTALL_DATA = @INSTALL_DATA@

>  INSTALL_PROGRAM = @INSTALL_PROGRAM@

> -LDFLAGS = @LDFLAGS@ -fno-lto

> +LDFLAGS = @LDFLAGS@

>  LIBICONV = @LIBICONV@

>  PACKAGE = @PACKAGE@

>  PICFLAG = @PICFLAG@

>  RANLIB = @RANLIB@

>  SHELL = @SHELL@

>  objext = @OBJEXT@

> +NOLTO_FLAGS = @nolto_flags@

>

>  datarootdir = @datarootdir@

>  datadir = @datadir@

> @@ -58,7 +59,8 @@ enable_decimal_float= @enable_decimal_fl

>

>  INCLUDES = -I$(srcdir) -I.

>

> -ALL_CFLAGS = $(CFLAGS) $(WARN_CFLAGS) $(INCLUDES) $(CPPFLAGS) $(PICFLAG)

> +ALL_CFLAGS = $(CFLAGS) $(WARN_CFLAGS) $(NOLTO_FLAGS) $(INCLUDES) $(CPPFLAGS) \

> +            $(PICFLAG)

>

>  bid_OBJS = bid2dpd_dpd2bid.$(objext) host-ieee32.$(objext) \

>         host-ieee64.$(objext) host-ieee128.$(objext)

> --- libdecnumber/configure.ac.jj        2017-01-02 18:15:32.000000000 +0100

> +++ libdecnumber/configure.ac   2017-01-06 17:38:37.391078242 +0100

> @@ -43,6 +43,8 @@ ACX_PROG_CC_WARNING_OPTS([-W -Wall -Wwri

>                           -Wmissing-format-attribute -Wcast-qual])

>  ACX_PROG_CC_WARNING_ALMOST_PEDANTIC([-Wno-long-long])

>

> +ACX_PROG_CC_WARNING_OPTS([-fno-lto], [nolto_flags])

> +

>  # Only enable with --enable-werror-always until existing warnings are

>  # corrected.

>  ACX_PROG_CC_WARNINGS_ARE_ERRORS([manual])

> --- libdecnumber/configure.jj   2016-11-16 16:38:07.000000000 +0100

> +++ libdecnumber/configure      2017-01-06 17:41:44.430626719 +0100

> @@ -613,6 +613,7 @@ EGREP

>  GREP

>  CPP

>  WERROR

> +nolto_flags

>  WARN_PEDANTIC

>  WARN_CFLAGS

>  AUTOHEADER

> @@ -3377,6 +3378,64 @@ fi

>  ac_ext=c

>  ac_cpp='$CPP $CPPFLAGS'

>  ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'

> +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'

> +ac_compiler_gnu=$ac_cv_c_compiler_gnu

> +

> +

> +

> +ac_ext=c

> +ac_cpp='$CPP $CPPFLAGS'

> +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'

> +ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'

> +ac_compiler_gnu=$ac_cv_c_compiler_gnu

> +

> +nolto_flags=

> +save_CFLAGS="$CFLAGS"

> +for real_option in -fno-lto; do

> +  # Do the check with the no- prefix removed since gcc silently

> +  # accepts any -Wno-* option on purpose

> +  case $real_option in

> +    -Wno-*) option=-W`expr x$real_option : 'x-Wno-\(.*\)'` ;;

> +    *) option=$real_option ;;

> +  esac

> +  as_acx_Woption=`$as_echo "acx_cv_prog_cc_warning_$option" | $as_tr_sh`

> +

> +  { $as_echo "$as_me:${as_lineno-$LINENO}: checking whether $CC supports $option" >&5

> +$as_echo_n "checking whether $CC supports $option... " >&6; }

> +if { as_var=$as_acx_Woption; eval "test \"\${$as_var+set}\" = set"; }; then :

> +  $as_echo_n "(cached) " >&6

> +else

> +  CFLAGS="$option"

> +    cat confdefs.h - <<_ACEOF >conftest.$ac_ext

> +/* end confdefs.h.  */

> +

> +int

> +main ()

> +{

> +

> +  ;

> +  return 0;

> +}

> +_ACEOF

> +if ac_fn_c_try_compile "$LINENO"; then :

> +  eval "$as_acx_Woption=yes"

> +else

> +  eval "$as_acx_Woption=no"

> +fi

> +rm -f core conftest.err conftest.$ac_objext conftest.$ac_ext

> +

> +fi

> +eval ac_res=\$$as_acx_Woption

> +              { $as_echo "$as_me:${as_lineno-$LINENO}: result: $ac_res" >&5

> +$as_echo "$ac_res" >&6; }

> +  if test `eval 'as_val=${'$as_acx_Woption'};$as_echo "$as_val"'` = yes; then :

> +  nolto_flags="$nolto_flags${nolto_flags:+ }$real_option"

> +fi

> +  done

> +CFLAGS="$save_CFLAGS"

> +ac_ext=c

> +ac_cpp='$CPP $CPPFLAGS'

> +ac_compile='$CC -c $CFLAGS $CPPFLAGS conftest.$ac_ext >&5'

>  ac_link='$CC -o conftest$ac_exeext $CFLAGS $CPPFLAGS $LDFLAGS conftest.$ac_ext $LIBS >&5'

>  ac_compiler_gnu=$ac_cv_c_compiler_gnu

>

>

>

>         Jakub
Jakub Jelinek Jan. 6, 2017, 7 p.m. UTC | #5
On Fri, Jan 06, 2017 at 05:58:05PM +0100, Christophe Lyon wrote:
> > Trying now:

> >

> > 2017-01-06  Jakub Jelinek  <jakub@redhat.com>

> >

> >         * Makefile.in (CFLAGS, CPPFLAGS, LDFLAGS): Remove -fno-lto.

> >         (NOLTO_FLAGS): New variable.

> >         (ALL_CFLAGS): Use it.

> >         * configure.ac (nolto_flags): New ACX_PROG_CC_WARNING_OPTS,

> >         check for whether -fno-lto works.

> >         * configure: Regenerated.

> >

> OK thanks for the prompt fix, I'll let you know if it doesn't work.


The patch passed bootstrap (non- bootstrap-lto) on x86_64-linux and
i686-linux and I see -fno-lto being used everywhere I expected (with
bootstrap compiler that does support -fno-lto).
Ok for trunk, if it works even for Christophe?

	Jakub
Richard Biener Jan. 7, 2017, 11:43 a.m. UTC | #6
On January 6, 2017 8:00:21 PM GMT+01:00, Jakub Jelinek <jakub@redhat.com> wrote:
>On Fri, Jan 06, 2017 at 05:58:05PM +0100, Christophe Lyon wrote:

>> > Trying now:

>> >

>> > 2017-01-06  Jakub Jelinek  <jakub@redhat.com>

>> >

>> >         * Makefile.in (CFLAGS, CPPFLAGS, LDFLAGS): Remove -fno-lto.

>> >         (NOLTO_FLAGS): New variable.

>> >         (ALL_CFLAGS): Use it.

>> >         * configure.ac (nolto_flags): New ACX_PROG_CC_WARNING_OPTS,

>> >         check for whether -fno-lto works.

>> >         * configure: Regenerated.

>> >

>> OK thanks for the prompt fix, I'll let you know if it doesn't work.

>

>The patch passed bootstrap (non- bootstrap-lto) on x86_64-linux and

>i686-linux and I see -fno-lto being used everywhere I expected (with

>bootstrap compiler that does support -fno-lto).

>Ok for trunk, if it works even for Christophe?


OK.

Richard.

>	Jakub
Christophe Lyon Jan. 9, 2017, 10:18 a.m. UTC | #7
Hi,

On 7 January 2017 at 12:43, Richard Biener <rguenther@suse.de> wrote:
> On January 6, 2017 8:00:21 PM GMT+01:00, Jakub Jelinek <jakub@redhat.com> wrote:

>>On Fri, Jan 06, 2017 at 05:58:05PM +0100, Christophe Lyon wrote:

>>> > Trying now:

>>> >

>>> > 2017-01-06  Jakub Jelinek  <jakub@redhat.com>

>>> >

>>> >         * Makefile.in (CFLAGS, CPPFLAGS, LDFLAGS): Remove -fno-lto.

>>> >         (NOLTO_FLAGS): New variable.

>>> >         (ALL_CFLAGS): Use it.

>>> >         * configure.ac (nolto_flags): New ACX_PROG_CC_WARNING_OPTS,

>>> >         check for whether -fno-lto works.

>>> >         * configure: Regenerated.

>>> >

>>> OK thanks for the prompt fix, I'll let you know if it doesn't work.

>>

>>The patch passed bootstrap (non- bootstrap-lto) on x86_64-linux and

>>i686-linux and I see -fno-lto being used everywhere I expected (with

>>bootstrap compiler that does support -fno-lto).

>>Ok for trunk, if it works even for Christophe?

>

> OK.

>

Thanks for fixing this over the week-end: my builds do complete again.

Christophe

> Richard.

>

>>       Jakub

>
diff mbox

Patch

From 67a3ccd99963ac19cbaebf17453cb51819c7bf1d Mon Sep 17 00:00:00 2001
From: marxin <mliska@suse.cz>
Date: Thu, 5 Jan 2017 17:18:27 +0100
Subject: [PATCH] Fix lto-bootstrap (PR bootstrap/79003).

gcc/ChangeLog:

2017-01-05  Martin Liska  <mliska@suse.cz>

	PR bootstrap/79003
	* lra-constraints.c: Rename invariant to lra_invariant.
	* predict.c (set_even_probabilities): Initialize e to NULL.

libdecnumber/ChangeLog:

2017-01-05  Martin Liska  <mliska@suse.cz>

	PR bootstrap/79003
	* Makefile.in: Add -fno-lto to {C,CPP,LD}FLAGS.
---
 gcc/lra-constraints.c    | 9 +++++----
 gcc/predict.c            | 2 +-
 libdecnumber/Makefile.in | 6 +++---
 3 files changed, 9 insertions(+), 8 deletions(-)

diff --git a/gcc/lra-constraints.c b/gcc/lra-constraints.c
index 61991280373..5ada67a36ba 100644
--- a/gcc/lra-constraints.c
+++ b/gcc/lra-constraints.c
@@ -4749,7 +4749,7 @@  lra_constraints_finish (void)
 
 
 /* Structure describes invariants for ineheritance.  */
-struct invariant
+struct lra_invariant
 {
   /* The order number of the invariant.  */
   int num;
@@ -4759,7 +4759,7 @@  struct invariant
   rtx_insn *insn;
 };
 
-typedef struct invariant invariant_t;
+typedef lra_invariant invariant_t;
 typedef invariant_t *invariant_ptr_t;
 typedef const invariant_t *const_invariant_ptr_t;
 
@@ -4767,7 +4767,7 @@  typedef const invariant_t *const_invariant_ptr_t;
 static vec<invariant_ptr_t> invariants;
 
 /* Allocation pool for the invariants.  */
-static object_allocator<struct invariant> *invariants_pool;
+static object_allocator<lra_invariant> *invariants_pool;
 
 /* Hash table for the invariants.  */
 static htab_t invariant_table;
@@ -4817,7 +4817,8 @@  static void
 initiate_invariants (void)
 {
   invariants.create (100);
-  invariants_pool = new object_allocator<struct invariant> ("Inheritance invariants");
+  invariants_pool
+    = new object_allocator<lra_invariant> ("Inheritance invariants");
   invariant_table = htab_create (100, invariant_hash, invariant_eq_p, NULL);
 }
 
diff --git a/gcc/predict.c b/gcc/predict.c
index e85573bc51d..f851e14b4ed 100644
--- a/gcc/predict.c
+++ b/gcc/predict.c
@@ -795,7 +795,7 @@  set_even_probabilities (basic_block bb,
 			hash_set<edge> *unlikely_edges = NULL)
 {
   unsigned nedges = 0;
-  edge e;
+  edge e = NULL;
   edge_iterator ei;
 
   FOR_EACH_EDGE (e, ei, bb->succs)
diff --git a/libdecnumber/Makefile.in b/libdecnumber/Makefile.in
index 02c327a59c4..2cfc5f48720 100644
--- a/libdecnumber/Makefile.in
+++ b/libdecnumber/Makefile.in
@@ -31,13 +31,13 @@  ACLOCAL = @ACLOCAL@
 AUTOCONF = @AUTOCONF@
 AUTOHEADER = @AUTOHEADER@
 CC = @CC@
-CFLAGS = @CFLAGS@
+CFLAGS = @CFLAGS@ -fno-lto
 WARN_CFLAGS = @WARN_CFLAGS@ @WARN_PEDANTIC@ @WERROR@
 CPP = @CPP@
-CPPFLAGS = @CPPFLAGS@
+CPPFLAGS = @CPPFLAGS@ -fno-lto
 INSTALL_DATA = @INSTALL_DATA@
 INSTALL_PROGRAM = @INSTALL_PROGRAM@
-LDFLAGS = @LDFLAGS@
+LDFLAGS = @LDFLAGS@ -fno-lto
 LIBICONV = @LIBICONV@
 PACKAGE = @PACKAGE@
 PICFLAG = @PICFLAG@
-- 
2.11.0