[lxc-devel] [lxc/master] configure: enable flto
brauner on Github
lxc-bot at linuxcontainers.org
Fri Sep 4 15:55:09 UTC 2020
A non-text attachment was scrubbed...
Name: not available
Type: text/x-mailbox
Size: 415 bytes
Desc: not available
URL: <http://lists.linuxcontainers.org/pipermail/lxc-devel/attachments/20200904/795108f2/attachment.bin>
-------------- next part --------------
From 54ee77b5045101dfca2ae11993a6c08c3e362ff2 Mon Sep 17 00:00:00 2001
From: Christian Brauner <christian.brauner at ubuntu.com>
Date: Fri, 4 Sep 2020 17:53:53 +0200
Subject: [PATCH] configure: enable flto
https://llvm.org/docs/LinkTimeOptimization.html
Signed-off-by: Christian Brauner <christian.brauner at ubuntu.com>
---
configure.ac | 2 ++
1 file changed, 2 insertions(+)
diff --git a/configure.ac b/configure.ac
index f58487f5d0..a85790fd6c 100644
--- a/configure.ac
+++ b/configure.ac
@@ -765,9 +765,11 @@ AX_CHECK_COMPILE_FLAG([-Warray-bounds], [CFLAGS="$CFLAGS -Warray-bounds"],,[-Wer
AX_CHECK_COMPILE_FLAG([-Wrestrict], [CFLAGS="$CFLAGS -Wrestrict"],,[-Werror])
AX_CHECK_COMPILE_FLAG([-Wreturn-local-addr], [CFLAGS="$CFLAGS -Wreturn-local-addr"],,[-Werror])
AX_CHECK_COMPILE_FLAG([-Wstringop-overflow], [CFLAGS="$CFLAGS -Wstringop-overflow"],,[-Werror])
+AX_CHECK_COMPILE_FLAG([-flto], [CFLAGS="$CFLAGS -flto"],,[-Werror])
AX_CHECK_LINK_FLAG([-z relro], [LDFLAGS="$LDFLAGS -z relro"],,[])
AX_CHECK_LINK_FLAG([-z now], [LDFLAGS="$LDFLAGS -z now"],,[])
+AX_CHECK_LINK_FLAG([-flto], [LDFLAGS="$LDFLAGS -flto"],,[])
CFLAGS="$CFLAGS -Wvla -std=gnu11 -fms-extensions"
if test "x$enable_werror" = "xyes"; then
More information about the lxc-devel
mailing list