From 6683f83b51bf87cad0980712955c959c4c128e24 Mon Sep 17 00:00:00 2001 From: Roberto Ierusalimschy Date: Mon, 18 Jun 2018 15:25:19 -0300 Subject: [PATCH] several details --- makefile | 21 ++++++++++----------- 1 file changed, 10 insertions(+), 11 deletions(-) diff --git a/makefile b/makefile index 9367ffd7..1263f7fd 100644 --- a/makefile +++ b/makefile @@ -6,7 +6,6 @@ # Warnings valid for both C and C++ CWARNSCPP= \ - # -pedantic \ /* warns if we use jump tables */ -Wextra \ -Wshadow \ -Wsign-compare \ @@ -15,9 +14,11 @@ CWARNSCPP= \ -Wredundant-decls \ -Wdisabled-optimization \ -Wdouble-promotion \ - -Wstrict-aliasing=3 # not accepted by clang \ - -Wno-aggressive-loop-optimizations # not accepted by clang \ - -Wlogical-op # not accepted by clang \ + -Wstrict-aliasing=3 \ + -Wno-aggressive-loop-optimizations \ + -Wlogical-op \ + -Werror \ + # -pedantic # warns if we use jump tables \ # the next warnings generate too much noise, so they are disabled # -Wconversion -Wno-sign-conversion \ # -Wsign-conversion \ @@ -41,14 +42,12 @@ CWARNS= $(CWARNSCPP) $(CWARNSC) # -g -DLUA_USER_H='"ltests.h"' # -pg -malign-double # -DLUA_USE_CTYPE -DLUA_USE_APICHECK -# (in clang, '-ftrapv' for runtime checks of integer overflows) +# ('-ftrapv' for runtime checks of integer overflows) # -fsanitize=undefined -ftrapv -fno-inline TESTS= -DLUA_USER_H='"ltests.h"' -O0 -# -mtune=native -fomit-frame-pointer -# -fno-stack-protector -# -DLUA_NILINTABLE -LOCAL = $(TESTS) $(CWARNS) -g -DEXTERNMEMCHECK + +# LOCAL = $(TESTS) $(CWARNS) -g @@ -59,8 +58,8 @@ MYLIBS= -ldl -lreadline CC= gcc -CFLAGS= -Wall -O2 $(MYCFLAGS) -Wfatal-errors -AR= ar rcu +CFLAGS= -Wall -O2 $(MYCFLAGS) -Wfatal-errors -fno-stack-protector -fno-common +AR= ar rc RANLIB= ranlib RM= rm -f