From af761e973ea8ac5775a1332c232a651649421c74 Mon Sep 17 00:00:00 2001 From: Richard Fuchs Date: Wed, 11 Oct 2023 12:57:39 -0400 Subject: [PATCH] MT#55283 explicitly enable gcc optimisation We rely on dpkg-buildflags to set -O2, but that may not be available on the target system. Explicitly set -O3, and also enable LTO. Change-Id: I593ec7ead08cb0a47922ba4db684b0292647f2bc --- lib/lib.Makefile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/lib/lib.Makefile b/lib/lib.Makefile index f323ec245..cea4b1bc3 100644 --- a/lib/lib.Makefile +++ b/lib/lib.Makefile @@ -62,6 +62,8 @@ ifneq ($(DBG),yes) LDFLAGS+= $(shell dpkg-buildflags --get LDFLAGS) LDLIBS+= $(shell dpkg-buildflags --get LDLIBS) endif + CFLAGS+=-O3 -flto=auto -ffat-lto-objects + LDFLAGS+=-flto=auto endif endif