ref: 178d7ee31c1d7448f607765a630f515746d7b404
parent: b50f496107605f180550f4a389003fe51128af6b
author: cancel <cancel@cancel.fm>
date: Wed Jan 8 22:09:11 EST 2020
Clean up some options warnings in tool for tcc
--- a/tool
+++ b/tool
@@ -276,7 +276,10 @@
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
@@ -283,7 +286,10 @@
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\"";;