mirror of
https://github.com/netwide-assembler/nasm.git
synced 2025-02-23 17:29:23 +08:00
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>
This commit is contained in:
parent
58ab877402
commit
48fd154d1c
21
configure.ac
21
configure.ac
@ -24,24 +24,23 @@ AC_PROG_LN_S
|
|||||||
AC_PROG_MAKE_SET
|
AC_PROG_MAKE_SET
|
||||||
AC_PROG_INSTALL
|
AC_PROG_INSTALL
|
||||||
|
|
||||||
dnl If the user did not specify a CFLAGS default, change default -O2
|
pa_no_optimize=false
|
||||||
dnl to either -O3 (normal) or -O0 (for debugging)
|
|
||||||
|
dnl If the user did not specify a CFLAGS default, change default
|
||||||
|
dnl to -O0 for debugging
|
||||||
PA_ARG_DISABLED([optimization],
|
PA_ARG_DISABLED([optimization],
|
||||||
[compile without optimization (-O0) to help debugging],
|
[compile without optimization (-O0) to help debugging],
|
||||||
[pa_optimize=-O0], [pa_optimize=-O3])
|
[pa_no_optimize=true])
|
||||||
|
|
||||||
dnl Compile and link with dwarf debug
|
dnl Compile and link with dwarf debug
|
||||||
PA_ARG_ENABLED([gdb],
|
PA_ARG_ENABLED([gdb],
|
||||||
[disable optimization and compile with extra debug information for GDB debugger],
|
[disable optimization and compile with extra debug information for GDB debugger],
|
||||||
[pa_optimize='-O0'
|
[PA_ADD_CFLAGS([-ggdb3])
|
||||||
PA_ADD_CFLAGS([-ggdb3])
|
pa_no_optimize=true])
|
||||||
])
|
|
||||||
|
|
||||||
AS_IF([test x"$pa_init_cflags" = x],
|
AS_IF([$pa_no_optimize],
|
||||||
[CFLAGS=`echo "$CFLAGS" | sed -e "s/-O2/$pa_optimize/"`])
|
[PA_ADD_CFLAGS([-O0])
|
||||||
|
PA_ADD_CFLAGS([-fno-omit-frame-pointer])])
|
||||||
AS_IF([test x"$pa_optimize" = "x-O0"],
|
|
||||||
[PA_ADD_CFLAGS([-fno-omit-frame-pointer])])
|
|
||||||
|
|
||||||
dnl Abort on panic
|
dnl Abort on panic
|
||||||
PA_ARG_ENABLED([panic-abort],
|
PA_ARG_ENABLED([panic-abort],
|
||||||
|
Loading…
Reference in New Issue
Block a user