diff options
author | H. Peter Anvin <hpa@linux.intel.com> | 2018-06-14 19:19:09 -0700 |
---|---|---|
committer | H. Peter Anvin <hpa@linux.intel.com> | 2018-06-14 19:19:09 -0700 |
commit | 48fd154d1c2e643a5b71eefc3fb763a4c3407b30 (patch) | |
tree | e17c99065d7494b2191c42dea974fc212fcea41f /configure.ac | |
parent | 58ab877402f60c69cae5b482b65dec65501e82fa (diff) | |
download | nasm-48fd154d1c2e643a5b71eefc3fb763a4c3407b30.tar.gz |
configure.ac: drop -O3; it is excessive and produces huge code
There is no reason to use -O3; it causes code to be insanely
duplicated. Simplify the configure.ac file too.
Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
Diffstat (limited to 'configure.ac')
-rw-r--r-- | configure.ac | 21 |
1 files changed, 10 insertions, 11 deletions
diff --git a/configure.ac b/configure.ac index ff2d91df..eec8f4fe 100644 --- a/configure.ac +++ b/configure.ac @@ -24,24 +24,23 @@ AC_PROG_LN_S AC_PROG_MAKE_SET AC_PROG_INSTALL -dnl If the user did not specify a CFLAGS default, change default -O2 -dnl to either -O3 (normal) or -O0 (for debugging) +pa_no_optimize=false + +dnl If the user did not specify a CFLAGS default, change default +dnl to -O0 for debugging PA_ARG_DISABLED([optimization], [compile without optimization (-O0) to help debugging], - [pa_optimize=-O0], [pa_optimize=-O3]) + [pa_no_optimize=true]) dnl Compile and link with dwarf debug PA_ARG_ENABLED([gdb], [disable optimization and compile with extra debug information for GDB debugger], - [pa_optimize='-O0' - PA_ADD_CFLAGS([-ggdb3]) - ]) - -AS_IF([test x"$pa_init_cflags" = x], - [CFLAGS=`echo "$CFLAGS" | sed -e "s/-O2/$pa_optimize/"`]) + [PA_ADD_CFLAGS([-ggdb3]) + pa_no_optimize=true]) -AS_IF([test x"$pa_optimize" = "x-O0"], - [PA_ADD_CFLAGS([-fno-omit-frame-pointer])]) +AS_IF([$pa_no_optimize], + [PA_ADD_CFLAGS([-O0]) + PA_ADD_CFLAGS([-fno-omit-frame-pointer])]) dnl Abort on panic PA_ARG_ENABLED([panic-abort], |