From e2789dd2f885e41946f115f3ccc663415ba191e2 Mon Sep 17 00:00:00 2001 From: cancel Date: Fri, 30 Nov 2018 20:52:19 +0900 Subject: [PATCH] Fix GCC redef for fortify disable --- tool | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/tool b/tool index 49ee70e..f0cf03f 100755 --- a/tool +++ b/tool @@ -176,23 +176,20 @@ build_target() { build_subdir=debug add cc_flags -DDEBUG -ggdb -fsanitize=address -fsanitize=undefined if [[ $os = mac ]]; then - # mac clang does not have -Og + # Our mac clang does not have -Og add cc_flags -O1 - # tui in the future - # add libraries -lncurses else add cc_flags -Og # needed if address is already specified? doesn't work on mac clang, at # least # add cc_flags -fsanitize=leak - # add libraries -lncursesw fi ;; release) build_subdir=release add cc_flags -DNDEBUG -O2 -g0 if [[ $protections_enabled != 1 ]]; then - add cc_flags -D_FORTIFY_SOURCE=0 -fno-stack-protector + add cc_flags -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 -fno-stack-protector fi if [[ $os = mac ]]; then # todo some stripping option