File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change @@ -937,6 +937,28 @@ build_single_target() {
937937 _CFLAGS_GLOBAL+=' -fstack-protector-all'
938938 _CXXFLAGS_GLOBAL+=' -fstack-protector-all'
939939
940+ _CFLAGS_GLOBAL+=' -fno-delete-null-pointer-checks'
941+ _CXXFLAGS_GLOBAL+=' -fno-delete-null-pointer-checks'
942+ if [ " ${_CC} " = ' llvm' ]; then
943+ _CFLAGS_GLOBAL+=' -ftrivial-auto-var-init=zero'
944+ _CXXFLAGS_GLOBAL+=' -ftrivial-auto-var-init=zero'
945+ if [ " ${_CCVER} " -ge ' 18' ]; then
946+ _CFLAGS_GLOBAL+=' -fno-strict-aliasing'
947+ _CXXFLAGS_GLOBAL+=' -fno-strict-aliasing'
948+ fi
949+ elif [ " ${_CC} " = ' gcc' ]; then
950+ _CFLAGS_GLOBAL+=' -fno-strict-aliasing -fno-strict-overflow'
951+ _CXXFLAGS_GLOBAL+=' -fno-strict-aliasing -fno-strict-overflow'
952+ if [ " ${_CCVER} " -ge ' 12' ]; then
953+ _CFLAGS_GLOBAL+=' -ftrivial-auto-var-init=zero'
954+ _CXXFLAGS_GLOBAL+=' -ftrivial-auto-var-init=zero'
955+ fi
956+ if [ " ${_CCVER} " -ge ' 15' ]; then
957+ _CFLAGS_GLOBAL+=' -fzero-init-padding-bits=all'
958+ _CXXFLAGS_GLOBAL+=' -fzero-init-padding-bits=all'
959+ fi
960+ fi
961+
940962 if false && [ " ${_CC} " = ' gcc' ] && [ " ${_CCVER} " -ge ' 14' ]; then
941963 # https://gcc.gnu.org/onlinedocs/gcc/Instrumentation-Options.html#index-fhardened
942964 _CFLAGS_GLOBAL+=' -fhardened'
You can’t perform that action at this time.
0 commit comments