configure.ac: make possible to compile with -ffunction/data-sections
The -ffunction-sections and -fdata-sections, if supported, can enable the linker to do some amount of dead code elimination. Basically a very basic form of LTO. Signed-off-by: H. Peter Anvin <hpa@linux.intel.com>
This commit is contained in:
parent
9b935a0ea8
commit
0c36965335
1 changed files with 13 additions and 4 deletions
17
configure.ac
17
configure.ac
|
@ -151,11 +151,12 @@ PA_FUNC_ATTRIBUTE(pure)
|
|||
PA_FUNC_ATTRIBUTE_ERROR
|
||||
|
||||
dnl
|
||||
dnl support ccache
|
||||
dnl support function sections
|
||||
dnl
|
||||
AC_ARG_ENABLE([ccache],
|
||||
[AC_HELP_STRING([--enable-ccache], [compile with ccache])],
|
||||
[CC="ccache $CC"],
|
||||
AC_ARG_ENABLE([sections],
|
||||
[AC_HELP_STRING([--enable-sections], [compile with function/data section support])],
|
||||
[PA_ADD_CFLAGS([-ffunction-sections]),
|
||||
PA_ADD_CFLAGS([-fdata-sections])],
|
||||
[])
|
||||
|
||||
dnl
|
||||
|
@ -203,5 +204,13 @@ PA_ADD_CFLAGS([-Werror=missing-declarations])
|
|||
PA_ADD_CFLAGS([-Werror=comment])
|
||||
PA_ADD_CFLAGS([-Werror=vla])])
|
||||
|
||||
dnl
|
||||
dnl support ccache
|
||||
dnl
|
||||
AC_ARG_ENABLE([ccache],
|
||||
[AC_HELP_STRING([--enable-ccache], [compile with ccache])],
|
||||
[CC="ccache $CC"],
|
||||
[])
|
||||
|
||||
AC_OUTPUT_COMMANDS([mkdir -p config nasmlib nsis output stdlib x86 asm disasm])
|
||||
AC_OUTPUT(Makefile rdoff/Makefile doc/Makefile)
|
||||
|
|
Loading…
Reference in a new issue