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:
parent
ec21629b81
commit
8ccec84496
1 changed files with 2 additions and 2 deletions
|
@ -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=" \
|
||||
|
|
Loading…
Reference in a new issue