A bug only seen with LTO enabled was reported by Ron Minnich. Since the issue appears to be a linker issue, we disable LTO by default until it's more stable.
We can still run LTO builds by setting LTO=1. Reported-by: Ron Minnich <rminn...@gmail.com> Signed-off-by: Sasha Levin <sasha.le...@oracle.com> --- tools/kvm/Makefile | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/tools/kvm/Makefile b/tools/kvm/Makefile index c105de1..de11060 100644 --- a/tools/kvm/Makefile +++ b/tools/kvm/Makefile @@ -221,9 +221,11 @@ ifeq ($(call try-cc,$(SOURCE_AIO),$(FLAGS_AIO) -static),y) LIBS_STATOPT += -laio endif -FLAGS_LTO := -flto -ifeq ($(call try-cc,$(SOURCE_HELLO),$(FLAGS_LTO)),y) - CFLAGS += $(FLAGS_LTO) +ifeq ($(LTO),1) + FLAGS_LTO := -flto + ifeq ($(call try-cc,$(SOURCE_HELLO),$(FLAGS_LTO)),y) + CFLAGS += $(FLAGS_LTO) + endif endif ifneq ($(call try-build,$(SOURCE_STATIC),-static,),y) -- 1.8.0 -- To unsubscribe from this list: send the line "unsubscribe kvm" in the body of a message to majord...@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html