configure: Add -fno-ident when available
MinGW for i386-pc without this option generates a .rdata$zzz symbol that is page-aligned and hence lzma_decompress no longer fits in its allocated space. Additionally, MinGW with -fno-ident also saves a bit of space in modules. In case of other compilers we already strip the relevant sections, so, this option has no effect. More info can be found at https://github.com/msys2/MINGW-packages/issues/21 Signed-off-by: Vladimir Serbinenko <phcoder@gmail.com> Reviewed-by: Daniel Kiper <daniel.kiper@oracle.com>
This commit is contained in:
parent
15cfd02b74
commit
8f6843ce60
1 changed files with 11 additions and 0 deletions
11
configure.ac
11
configure.ac
|
@ -999,6 +999,17 @@ if test "x$grub_cv_cc_fno_unwind_tables" = xyes; then
|
||||||
TARGET_CFLAGS="$TARGET_CFLAGS -fno-unwind-tables"
|
TARGET_CFLAGS="$TARGET_CFLAGS -fno-unwind-tables"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Do not generate .ident sections.
|
||||||
|
AC_CACHE_CHECK([whether -fno-ident works], [grub_cv_cc_fno_ident], [
|
||||||
|
CFLAGS="$TARGET_CFLAGS -fno-ident"
|
||||||
|
AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
|
||||||
|
[grub_cv_cc_fno_ident=yes],
|
||||||
|
[grub_cv_cc_fno_ident=no])
|
||||||
|
])
|
||||||
|
|
||||||
|
if test "x$grub_cv_cc_fno_ident" = xyes; then
|
||||||
|
TARGET_CFLAGS="$TARGET_CFLAGS -fno-ident"
|
||||||
|
fi
|
||||||
|
|
||||||
CFLAGS="$TARGET_CFLAGS"
|
CFLAGS="$TARGET_CFLAGS"
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue