grub2/0312-Remove-obsolete-ADDR32-and-DATA32-checks.patch
Peter Jones 8c6b1ac71e Reconcile with upstream once again.
Also include some minor fixes for gcc 5.1.1

Signed-off-by: Peter Jones <pjones@redhat.com>
2015-07-22 09:46:32 -04:00

151 lines
4.6 KiB
Diff

From 6505b241fd86456626dda85651f22467df8294fa Mon Sep 17 00:00:00 2001
From: Vladimir Serbinenko <phcoder@gmail.com>
Date: Sat, 21 Feb 2015 17:44:41 +0100
Subject: [PATCH 312/506] Remove obsolete ADDR32 and DATA32 checks.
---
acinclude.m4 | 74 -------------------------------------------------
config.h.in | 4 ---
configure.ac | 4 ---
grub-core/modinfo.sh.in | 2 --
4 files changed, 84 deletions(-)
diff --git a/acinclude.m4 b/acinclude.m4
index b2bb88d..609c4f2 100644
--- a/acinclude.m4
+++ b/acinclude.m4
@@ -210,80 +210,6 @@ fi
])
-dnl Mass confusion!
-dnl Older versions of GAS interpret `.code16' to mean ``generate 32-bit
-dnl instructions, but implicitly insert addr32 and data32 bytes so
-dnl that the code works in real mode''.
-dnl
-dnl Newer versions of GAS interpret `.code16' to mean ``generate 16-bit
-dnl instructions,'' which seems right. This requires the programmer
-dnl to explicitly insert addr32 and data32 instructions when they want
-dnl them.
-dnl
-dnl We only support the newer versions, because the old versions cause
-dnl major pain, by requiring manual assembly to get 16-bit instructions into
-dnl asm files.
-AC_DEFUN([grub_I386_ASM_ADDR32],
-[AC_REQUIRE([AC_PROG_CC])
-AC_REQUIRE([grub_I386_ASM_PREFIX_REQUIREMENT])
-AC_MSG_CHECKING([for .code16 addr32 assembler support])
-AC_CACHE_VAL(grub_cv_i386_asm_addr32,
-[cat > conftest.s.in <<\EOF
- .code16
-l1: @ADDR32@ movb %al, l1
-EOF
-
-if test "x$grub_cv_i386_asm_prefix_requirement" = xyes; then
- sed -e s/@ADDR32@/addr32/ < conftest.s.in > conftest.s
-else
- sed -e s/@ADDR32@/addr32\;/ < conftest.s.in > conftest.s
-fi
-
-if AC_TRY_COMMAND([${CC-cc} ${TARGET_CCASFLAGS} ${CFLAGS} -c conftest.s]) && test -s conftest.o; then
- grub_cv_i386_asm_addr32=yes
-else
- grub_cv_i386_asm_addr32=no
-fi
-
-rm -f conftest*])
-
-AC_MSG_RESULT([$grub_cv_i386_asm_addr32])])
-
-dnl Later versions of GAS requires that addr32 and data32 prefixes
-dnl appear in the same lines as the instructions they modify, while
-dnl earlier versions requires that they appear in separate lines.
-AC_DEFUN([grub_I386_ASM_PREFIX_REQUIREMENT],
-[AC_REQUIRE([AC_PROG_CC])
-AC_MSG_CHECKING(dnl
-[whether addr32 must be in the same line as the instruction])
-AC_CACHE_VAL(grub_cv_i386_asm_prefix_requirement,
-[cat > conftest.s <<\EOF
- .code16
-l1: addr32 movb %al, l1
-EOF
-
-if AC_TRY_COMMAND([${CC-cc} ${TARGET_CCASFLAGS} ${CFLAGS} -c conftest.s]) && test -s conftest.o; then
- grub_cv_i386_asm_prefix_requirement=yes
-else
- grub_cv_i386_asm_prefix_requirement=no
-fi
-
-rm -f conftest*])
-
-if test "x$grub_cv_i386_asm_prefix_requirement" = xyes; then
- grub_tmp_addr32="addr32"
- grub_tmp_data32="data32"
-else
- grub_tmp_addr32="addr32;"
- grub_tmp_data32="data32;"
-fi
-
-ADDR32=$grub_tmp_addr32
-DATA32=$grub_tmp_data32
-
-AC_MSG_RESULT([$grub_cv_i386_asm_prefix_requirement])])
-
-
dnl Check what symbol is defined as a bss start symbol.
dnl Written by Michael Hohmoth and Yoshinori K. Okuji.
AC_DEFUN([grub_CHECK_BSS_START_SYMBOL],
diff --git a/config.h.in b/config.h.in
index 4b63014..d93b687 100644
--- a/config.h.in
+++ b/config.h.in
@@ -31,10 +31,6 @@
#define HAVE_FONT_SOURCE @HAVE_FONT_SOURCE@
/* Define if C symbols get an underscore after compilation. */
#define HAVE_ASM_USCORE @HAVE_ASM_USCORE@
-/* Define it to \"addr32\" or \"addr32;\" to make GAS happy. */
-#define ADDR32 @ADDR32@
-/* Define it to \"data32\" or \"data32;\" to make GAS happy. */
-#define DATA32 @DATA32@
/* Define it to one of __bss_start, edata and _edata. */
#define BSS_START_SYMBOL @BSS_START_SYMBOL@
/* Define it to either end or _end. */
diff --git a/configure.ac b/configure.ac
index 40b7329..8ddb5d3 100644
--- a/configure.ac
+++ b/configure.ac
@@ -1096,8 +1096,6 @@ if test "x$target_cpu" = xi386; then
grub_CHECK_END_SYMBOL
fi
CFLAGS="$TARGET_CFLAGS"
- grub_I386_ASM_PREFIX_REQUIREMENT
- grub_I386_ASM_ADDR32
fi
grub_PROG_NM_WORKS
@@ -1621,8 +1619,6 @@ AS_IF([test x$target_cpu = xi386 -a x$platform = xqemu],
[AC_SUBST([GRUB_BOOT_MACHINE_LINK_ADDR], 0xffe00)])
AC_SUBST(HAVE_ASM_USCORE)
-AC_SUBST(ADDR32)
-AC_SUBST(DATA32)
AC_SUBST(BSS_START_SYMBOL)
AC_SUBST(END_SYMBOL)
AC_SUBST(PACKAGE)
diff --git a/grub-core/modinfo.sh.in b/grub-core/modinfo.sh.in
index 69d8334..09d22f9 100644
--- a/grub-core/modinfo.sh.in
+++ b/grub-core/modinfo.sh.in
@@ -9,8 +9,6 @@ grub_have_font_source=@HAVE_FONT_SOURCE@
# Autodetected config
grub_have_asm_uscore=@HAVE_ASM_USCORE@
-grub_i8086_addr32="@ADDR32@"
-grub_i8086_data32="@DATA32@"
grub_bss_start_symbol="@BSS_START_SYMBOL@"
grub_end_symbol="@END_SYMBOL@"
--
2.4.3