grub2/10003-Don-t-tell-the-compil...

89 lines
3.2 KiB
Diff

From ddc6702d0b258e12f67f0df7c3c915a04ede1067 Mon Sep 17 00:00:00 2001
From: Peter Jones <pjones@redhat.com>
Date: Sun, 28 Jun 2015 17:57:24 -0400
Subject: [PATCH 10003/10006] Don't tell the compiler to do annoying things
with -f.
---
configure.ac | 48 ++----------------------------------------------
1 file changed, 2 insertions(+), 46 deletions(-)
diff --git a/configure.ac b/configure.ac
index 3e897bd..65f7f43 100644
--- a/configure.ac
+++ b/configure.ac
@@ -548,8 +548,8 @@ LDFLAGS="$TARGET_LDFLAGS"
LIBS=""
# debug flags.
-TARGET_CFLAGS="$TARGET_CFLAGS $WARN_FLAGS -g -Wredundant-decls -Wmissing-prototypes -Wmissing-declarations"
-TARGET_CCASFLAGS="$TARGET_CCASFLAGS -g"
+TARGET_CFLAGS="$TARGET_CFLAGS $WARN_FLAGS -g3 -Wredundant-decls -Wmissing-prototypes -Wmissing-declarations"
+TARGET_CCASFLAGS="$TARGET_CCASFLAGS -g3"
if test "x$target_cpu" != xi386 && test "x$target_cpu" != xx86_64; then
TARGET_CFLAGS="$TARGET_CFLAGS -Wcast-align"
@@ -908,21 +908,6 @@ if test x"$target_cpu" = xsparc64 ; then
TARGET_LDFLAGS="$TARGET_LDFLAGS $grub_cv_target_cc_mno_relax"
fi
-# By default, GCC 4.4 generates .eh_frame sections containing unwind
-# information in some cases where it previously did not. GRUB doesn't need
-# these and they just use up vital space. Restore the old compiler
-# behaviour.
-AC_CACHE_CHECK([whether -fno-dwarf2-cfi-asm works], [grub_cv_cc_fno_dwarf2_cfi_asm], [
- CFLAGS="$TARGET_CFLAGS -fno-dwarf2-cfi-asm"
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
- [grub_cv_cc_fno_dwarf2_cfi_asm=yes],
- [grub_cv_cc_fno_dwarf2_cfi_asm=no])
-])
-
-if test "x$grub_cv_cc_fno_dwarf2_cfi_asm" = xyes; then
- TARGET_CFLAGS="$TARGET_CFLAGS -fno-dwarf2-cfi-asm"
-fi
-
if test x"$target_os" = xcygwin; then
AC_CACHE_CHECK([whether option -fno-reorder-functions works], grub_cv_cc_no_reorder_functions, [
CFLAGS="$TARGET_CFLAGS -fno-reorder-functions"
@@ -947,37 +932,8 @@ if test "x$grub_cv_cc_mno_stack_arg_probe" = xyes; then
TARGET_CFLAGS="$TARGET_CFLAGS -mno-stack-arg-probe"
fi
-
-# By default, GCC 4.6 generates .eh_frame sections containing unwind
-# information in some cases where it previously did not. GRUB doesn't need
-# these and they just use up vital space. Restore the old compiler
-# behaviour.
-AC_CACHE_CHECK([whether -fno-asynchronous-unwind-tables works], [grub_cv_cc_fno_asynchronous_unwind_tables], [
- CFLAGS="$TARGET_CFLAGS -fno-asynchronous-unwind-tables"
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
- [grub_cv_cc_fno_asynchronous_unwind_tables=yes],
- [grub_cv_cc_fno_asynchronous_unwind_tables=no])
-])
-
-if test "x$grub_cv_cc_fno_asynchronous_unwind_tables" = xyes; then
- TARGET_CFLAGS="$TARGET_CFLAGS -fno-asynchronous-unwind-tables"
-fi
-
-AC_CACHE_CHECK([whether -fno-unwind-tables works], [grub_cv_cc_fno_unwind_tables], [
- CFLAGS="$TARGET_CFLAGS -fno-unwind-tables"
- AC_COMPILE_IFELSE([AC_LANG_PROGRAM([[]], [[]])],
- [grub_cv_cc_fno_unwind_tables=yes],
- [grub_cv_cc_fno_unwind_tables=no])
-])
-
-if test "x$grub_cv_cc_fno_unwind_tables" = xyes; then
- TARGET_CFLAGS="$TARGET_CFLAGS -fno-unwind-tables"
-fi
-
-
CFLAGS="$TARGET_CFLAGS"
-
if test x"$platform" = xemu ; then
TARGET_OBJ2ELF=
grub_cv_target_cc_link_format=
--
2.5.0