fix nginx compilation flags (#8023)

* use '-O2' instead of '-Og'
  '-O2' produce production optimized binary while '-Og' is used mostly
  for debugging
* use '-mtune=generic' instead of '-mtune=native'
  '-mtune=native' produce optimal code for builder host system, but it
  can be sub-optimal for execution host system
This commit is contained in:
dmitry-j-mikhin 2021-12-12 16:25:58 +03:00 committed by GitHub
parent ec21629b81
commit 8ccec84496
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -637,7 +637,7 @@ WITH_FLAGS="--with-debug \
# "Combining -flto with -g is currently experimental and expected to produce unexpected results."
# https://gcc.gnu.org/onlinedocs/gcc/Optimize-Options.html
CC_OPT="-g -Og -fPIE -fstack-protector-strong \
CC_OPT="-g -O2 -fPIE -fstack-protector-strong \
-Wformat \
-Werror=format-security \
-Wno-deprecated-declarations \
@ -656,7 +656,7 @@ if [[ ${ARCH} != "aarch64" ]]; then
fi
if [[ ${ARCH} == "x86_64" ]]; then
CC_OPT+=' -m64 -mtune=native'
CC_OPT+=' -m64 -mtune=generic'
fi
WITH_MODULES=" \