From c509b6f05c0778c6ce90b7e34b7c1d23fc3311f7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ga=C3=ABtan=20Harter?= Date: Thu, 19 Jul 2018 14:06:08 +0200 Subject: [PATCH] lua: remove unsupported flags for llvm Prevents error: clang: error: unknown argument: '-fstack-usage' clang: error: unknown argument: '-fconserve-stack' The flags are here to print debug information and try to optimize stack but are not required. --- pkg/lua/Makefile.lua | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/pkg/lua/Makefile.lua b/pkg/lua/Makefile.lua index b22984b2a1..f239722df0 100644 --- a/pkg/lua/Makefile.lua +++ b/pkg/lua/Makefile.lua @@ -1,8 +1,11 @@ SRC := $(filter-out loadlib.c lua.c luac.c,$(wildcard *.c)) -CFLAGS += -fstack-usage -fconserve-stack \ - -DLUA_MAXCAPTURES=16 \ - -DL_MAXLENNUM=50 +ifneq (llvm, $(TOOLCHAIN)) + CFLAGS += -fstack-usage -fconserve-stack +endif + +CFLAGS += -DLUA_MAXCAPTURES=16 -DL_MAXLENNUM=50 + # Enable these options to debug stack usage # -Wstack-usage=128 -Wno-error=stack-usage=128