From 13c1262e0e135888207d15d6ad91a3ec47b0a30e Mon Sep 17 00:00:00 2001 From: zrj Date: Mon, 19 Dec 2016 17:37:27 +0200 Subject: [PATCH] flex: Disable LTO in the libfl.a for clang. clang has issues with such LTO'ed static library. This library is small and gains of LTO are minimal. Unbreaks ports like lang/gscheme. --- usr.bin/flex/lib/Makefile | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/usr.bin/flex/lib/Makefile b/usr.bin/flex/lib/Makefile index 7edac4626e..9fa7dfdd9d 100644 --- a/usr.bin/flex/lib/Makefile +++ b/usr.bin/flex/lib/Makefile @@ -5,6 +5,11 @@ LIB= l SRCS= libmain.c libyywrap.c NOPIC= yes +# for now do not let the use of -flto, clang has issues +.if ${CFLAGS:M-flto} +CFLAGS+= -fno-lto +.endif + # Do not install these compat libraries during {build,quick}world. .if !${INSTALL:M*/tools/install.sh} LINKS= ${LIBDIR}/libl.a ${LIBDIR}/libfl.a -- 2.11.4.GIT