From 178d7ee31c1d7448f607765a630f515746d7b404 Mon Sep 17 00:00:00 2001 From: cancel Date: Thu, 9 Jan 2020 03:09:11 +0900 Subject: [PATCH] Clean up some options warnings in tool for tcc --- tool | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/tool b/tool index aba6c36..dd8f1af 100755 --- a/tool +++ b/tool @@ -276,14 +276,20 @@ build_target() { release) add cc_flags -DNDEBUG -O2 -g0 if [[ $protections_enabled != 1 ]]; then - add cc_flags -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 -fno-stack-protector + add cc_flags -U_FORTIFY_SOURCE -D_FORTIFY_SOURCE=0 + case $cc_id in + gcc|clang) add cc_flags -fno-stack-protector;; + esac fi if [[ $os = mac ]]; then # todo some stripping option true else # -flto is good on both clang and gcc on Linux - add cc_flags -flto -s + case $cc_id in + gcc|clang) add cc_flags -flto + esac + add cc_flags -s fi ;; *) fatal "Unknown build config \"$config_mode\"";;