fix some bugs when COFF is used and some configure bugs.

This commit is contained in:
okuji 1999-09-18 16:23:07 +00:00
parent c58d9a073e
commit dc267a70d2
10 changed files with 220 additions and 131 deletions

View file

@ -1,3 +1,37 @@
1999-09-19 OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>
* acinclude.m4 (grub_ASM_PREFIX_REQUIREMENT): Do not call
AC_DEFINE_UNQUOTEs within AC_CACHE_VAL. Define ADDR32 and DATA32
after it.
(grub_CHECK_START_SYMBOL): Do not call AC_DEFINE within
AC_CACHE_VAL. Define HAVE_START_SYMBOL after it.
(grub_CHECK_USCORE_START_SYMBOL): Do not call AC_DEFINE within
AC_CACHE_VAL. Define HAVE_USCORE_START_SYMBOL after it.
(grub_CHECK_END_SYMBOL): Do not call AC_DEFINE within
AC_CACHE_VAL. Define HAVE_END_SYMBOL after it.
(grub_CHECK_USCORE_END_SYMBOL): Do not call AC_DEFINE within
AC_CACHE_VAL. Define HAVE_USCORE_END_SYMBOL after it.
1999-09-17 Pavel Roskin <pavel_roskin@geocities.com>
* acconfig.h (ADDR32): Removed. This entry is automatically
created by autoheader.
(DATA32): Likewise.
* acinclude.m4 (grub_ASM_ADD32): Use ADDR32 instead of addr32.
Require grub_ASM_PREFIX_REQUIREMENT.
(grub_ASM_PREFIX_REQUIREMENT): Define ADDR32 and DATA32.
* configure.in: Call grub_ASM_PREFIX_REQUIREMENT before
grub_ASM_ADDR32. Do not define ADDR32 and DATA32.
* stage1/stage1.S (after_BPB): Use ABS(firstlist) instead of
firstlist.
(MSG): Use ABS(x) instead of x.
(probe_loop): Use the macro MSG for fd_probe_error_string.
* stage1/stage1_lba.S (after_BPB): Use ABS(firstlist) instead of
firstlist.
(MSG): Use ABS(x) instead of x.
* stage2/asm.S (putchar): Renamed to ...
(grub_putchar): ... this.
1999-09-18 OKUJI Yoshinori <okuji@kuicr.kyoto-u.ac.jp>
* stage2/gunzip.c (reset_linalloc): Use the macro RAW_ADDR

View file

@ -1,12 +1,6 @@
/* This file is still needed because the defines below are
AC_DEFINEd in more than one place. */
/* Defined it to "addr32" or "addr32;" to make GAS happy. */
#undef ADDR32
/* Defined it to "data32" or "data32;" to make GAS happy. */
#undef DATA32
/* Defined if you have a curses library (ncurses preferred). */
#undef HAVE_LIBCURSES

View file

@ -15,7 +15,8 @@ func (int *list)
}
EOF
if AC_TRY_COMMAND([${CC-cc} -S conftest.c]) && test -s conftest.s; then :
if AC_TRY_COMMAND([${CC-cc} -S conftest.c]) && test -s conftest.s; then
true
else
AC_MSG_ERROR([${CC-cc} failed to produce assembly code])
fi
@ -86,12 +87,12 @@ dnl major pain, by requiring manual assembly to get 16-bit instructions into
dnl stage1/stage1.S.
AC_DEFUN(grub_ASM_ADDR32,
[AC_REQUIRE([AC_PROG_CC])
AC_REQUIRE([grub_ASM_PREFIX_REQUIREMENT])
AC_MSG_CHECKING([for .code16 addr32 assembler support])
AC_CACHE_VAL(grub_cv_asm_addr32,
[cat > conftest.s <<\EOF
.code16
l1: addr32
movb %al, l1
l1: ADDR32 movb %al, l1
EOF
if AC_TRY_COMMAND([${CC-cc} -c conftest.s]) && test -s conftest.o; then
@ -121,7 +122,22 @@ if AC_TRY_COMMAND([${CC-cc} -c conftest.s]) && test -s conftest.o; then
else
grub_cv_asm_prefix_requirement=no
fi
rm -f conftest*])
if test "x$grub_cv_asm_prefix_requirement" = xyes; then
grub_tmp_addr32="addr32"
grub_tmp_data32="data32"
else
grub_tmp_addr32="addr32;"
grub_tmp_data32="data32;"
fi
AC_DEFINE_UNQUOTED([ADDR32], $grub_tmp_addr32,
[Define it to \"addr32\" or \"addr32;\" to make GAS happy])
AC_DEFINE_UNQUOTED([DATA32], $grub_tmp_data32,
[Define it to \"data32\" or \"data32;\" to make GAS happy])
AC_MSG_RESULT([$grub_cv_asm_prefix_requirement])])
dnl
@ -143,13 +159,16 @@ EOF
if AC_TRY_COMMAND([${CC-cc} conftest.c -o conftest]) && test -s conftest; then
grub_cv_check_start_symbol=yes
AC_DEFINE([HAVE_START_SYMBOL])
else
grub_cv_check_start_symbol=no
fi
rm -f conftest*])
if test "x$grub_cv_check_start_symbol" = xyes; then
AC_DEFINE([HAVE_START_SYMBOL])
fi
AC_MSG_RESULT([$grub_cv_check_start_symbol])
])
@ -172,13 +191,16 @@ EOF
if AC_TRY_COMMAND([${CC-cc} conftest.c -o conftest]) && test -s conftest; then
grub_cv_check_uscore_start_symbol=yes
AC_DEFINE([HAVE_USCORE_START_SYMBOL])
else
grub_cv_check_uscore_start_symbol=no
fi
rm -f conftest*])
if test "x$grub_cv_check_uscore_start_symbol" = xyes; then
AC_DEFINE([HAVE_USCORE_START_SYMBOL])
fi
AC_MSG_RESULT([$grub_cv_check_uscore_start_symbol])
])
@ -201,13 +223,16 @@ EOF
if AC_TRY_COMMAND([${CC-cc} conftest.c -o conftest]) && test -s conftest; then
grub_cv_check_end_symbol=yes
AC_DEFINE([HAVE_END_SYMBOL])
else
grub_cv_check_end_symbol=no
fi
rm -f conftest*])
if test "x$grub_cv_check_end_symbol" = xyes; then
AC_DEFINE([HAVE_END_SYMBOL])
fi
AC_MSG_RESULT([$grub_cv_check_end_symbol])
])
@ -230,11 +255,14 @@ EOF
if AC_TRY_COMMAND([${CC-cc} conftest.c -o conftest]) && test -s conftest; then
grub_cv_check_uscore_end_symbol=yes
AC_DEFINE([HAVE_USCORE_END_SYMBOL])
else
grub_cv_check_uscore_end_symbol=no
fi
if test "x$grub_cv_check_uscore_end_symbol" = xyes; then
AC_DEFINE([HAVE_USCORE_END_SYMBOL])
fi
rm -f conftest*])
AC_MSG_RESULT([$grub_cv_check_uscore_end_symbol])

42
aclocal.m4 vendored
View file

@ -27,7 +27,8 @@ func (int *list)
}
EOF
if AC_TRY_COMMAND([${CC-cc} -S conftest.c]) && test -s conftest.s; then :
if AC_TRY_COMMAND([${CC-cc} -S conftest.c]) && test -s conftest.s; then
true
else
AC_MSG_ERROR([${CC-cc} failed to produce assembly code])
fi
@ -98,12 +99,12 @@ dnl major pain, by requiring manual assembly to get 16-bit instructions into
dnl stage1/stage1.S.
AC_DEFUN(grub_ASM_ADDR32,
[AC_REQUIRE([AC_PROG_CC])
AC_REQUIRE([grub_ASM_PREFIX_REQUIREMENT])
AC_MSG_CHECKING([for .code16 addr32 assembler support])
AC_CACHE_VAL(grub_cv_asm_addr32,
[cat > conftest.s <<\EOF
.code16
l1: addr32
movb %al, l1
l1: ADDR32 movb %al, l1
EOF
if AC_TRY_COMMAND([${CC-cc} -c conftest.s]) && test -s conftest.o; then
@ -133,7 +134,22 @@ if AC_TRY_COMMAND([${CC-cc} -c conftest.s]) && test -s conftest.o; then
else
grub_cv_asm_prefix_requirement=no
fi
rm -f conftest*])
if test "x$grub_cv_asm_prefix_requirement" = xyes; then
grub_tmp_addr32="addr32"
grub_tmp_data32="data32"
else
grub_tmp_addr32="addr32;"
grub_tmp_data32="data32;"
fi
AC_DEFINE_UNQUOTED([ADDR32], $grub_tmp_addr32,
[Define it to \"addr32\" or \"addr32;\" to make GAS happy])
AC_DEFINE_UNQUOTED([DATA32], $grub_tmp_data32,
[Define it to \"data32\" or \"data32;\" to make GAS happy])
AC_MSG_RESULT([$grub_cv_asm_prefix_requirement])])
dnl
@ -155,13 +171,16 @@ EOF
if AC_TRY_COMMAND([${CC-cc} conftest.c -o conftest]) && test -s conftest; then
grub_cv_check_start_symbol=yes
AC_DEFINE([HAVE_START_SYMBOL])
else
grub_cv_check_start_symbol=no
fi
rm -f conftest*])
if test "x$grub_cv_check_start_symbol" = xyes; then
AC_DEFINE([HAVE_START_SYMBOL])
fi
AC_MSG_RESULT([$grub_cv_check_start_symbol])
])
@ -184,13 +203,16 @@ EOF
if AC_TRY_COMMAND([${CC-cc} conftest.c -o conftest]) && test -s conftest; then
grub_cv_check_uscore_start_symbol=yes
AC_DEFINE([HAVE_USCORE_START_SYMBOL])
else
grub_cv_check_uscore_start_symbol=no
fi
rm -f conftest*])
if test "x$grub_cv_check_uscore_start_symbol" = xyes; then
AC_DEFINE([HAVE_USCORE_START_SYMBOL])
fi
AC_MSG_RESULT([$grub_cv_check_uscore_start_symbol])
])
@ -213,13 +235,16 @@ EOF
if AC_TRY_COMMAND([${CC-cc} conftest.c -o conftest]) && test -s conftest; then
grub_cv_check_end_symbol=yes
AC_DEFINE([HAVE_END_SYMBOL])
else
grub_cv_check_end_symbol=no
fi
rm -f conftest*])
if test "x$grub_cv_check_end_symbol" = xyes; then
AC_DEFINE([HAVE_END_SYMBOL])
fi
AC_MSG_RESULT([$grub_cv_check_end_symbol])
])
@ -242,11 +267,14 @@ EOF
if AC_TRY_COMMAND([${CC-cc} conftest.c -o conftest]) && test -s conftest; then
grub_cv_check_uscore_end_symbol=yes
AC_DEFINE([HAVE_USCORE_END_SYMBOL])
else
grub_cv_check_uscore_end_symbol=no
fi
if test "x$grub_cv_check_uscore_end_symbol" = xyes; then
AC_DEFINE([HAVE_USCORE_END_SYMBOL])
fi
rm -f conftest*])
AC_MSG_RESULT([$grub_cv_check_uscore_end_symbol])

View file

@ -1,11 +1,5 @@
/* config.h.in. Generated automatically from configure.in by autoheader. */
/* Defined it to "addr32" or "addr32;" to make GAS happy. */
#undef ADDR32
/* Defined it to "data32" or "data32;" to make GAS happy. */
#undef DATA32
/* Defined if you have a curses library (ncurses preferred). */
#undef HAVE_LIBCURSES
@ -45,3 +39,9 @@
/* Define if C symbols get an underscore after compilation */
#undef HAVE_ASM_USCORE
/* Define it to "addr32" or "addr32;" to make GAS happy */
#undef ADDR32
/* Define it to "data32" or "data32;" to make GAS happy */
#undef DATA32

189
configure vendored
View file

@ -1497,7 +1497,8 @@ func (int *list)
}
EOF
if { ac_try='${CC-cc} -S conftest.c'; { (eval echo configure:1501: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest.s; then :
if { ac_try='${CC-cc} -S conftest.c'; { (eval echo configure:1501: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest.s; then
true
else
{ echo "configure: error: ${CC-cc} failed to produce assembly code" 1>&2; exit 1; }
fi
@ -1519,7 +1520,7 @@ fi
echo "$ac_t""$grub_cv_asm_uscore" 1>&6
echo $ac_n "checking whether ${OBJCOPY} works for absolute addresses""... $ac_c" 1>&6
echo "configure:1523: checking whether ${OBJCOPY} works for absolute addresses" >&5
echo "configure:1524: checking whether ${OBJCOPY} works for absolute addresses" >&5
if eval "test \"\${grub_cv_prog_objcopy_absolute+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1531,21 +1532,21 @@ blah (void)
}
EOF
if { (eval echo configure:1535: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.o; then :
if { (eval echo configure:1536: \"$ac_compile\") 1>&5; (eval $ac_compile) 2>&5; } && test -s conftest.o; then :
else
{ echo "configure: error: ${CC-cc} cannot compile C source code" 1>&2; exit 1; }
fi
grub_cv_prog_objcopy_absolute=yes
for link_addr in 2000 8000 7C00; do
if { ac_try='${LD-ld} -N -Ttext $link_addr conftest.o -o conftest.exec'; { (eval echo configure:1541: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then :
if { ac_try='${LD-ld} -N -Ttext $link_addr conftest.o -o conftest.exec'; { (eval echo configure:1542: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then :
else
{ echo "configure: error: ${LD-ld} cannot link at address $link_addr" 1>&2; exit 1; }
fi
if { ac_try='${OBJCOPY-objcopy} -O binary conftest.exec conftest'; { (eval echo configure:1545: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then :
if { ac_try='${OBJCOPY-objcopy} -O binary conftest.exec conftest'; { (eval echo configure:1546: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then :
else
{ echo "configure: error: ${OBJCOPY-objcopy} cannot create binary files" 1>&2; exit 1; }
fi
if test ! -f conftest.old || { ac_try='cmp -s conftest.old conftest'; { (eval echo configure:1549: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
if test ! -f conftest.old || { ac_try='cmp -s conftest.old conftest'; { (eval echo configure:1550: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; }; then
mv -f conftest conftest.old
else
grub_cv_prog_objcopy_absolute=no
@ -1561,18 +1562,58 @@ if test "x$grub_cv_prog_objcopy_absolute" != xyes; then
fi
echo $ac_n "checking whether addr32 must be in the same line as the instruction""... $ac_c" 1>&6
echo "configure:1567: checking whether addr32 must be in the same line as the instruction" >&5
if eval "test \"\${grub_cv_asm_prefix_requirement+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.s <<\EOF
.code16
l1: addr32 movb %al, l1
EOF
if { ac_try='${CC-cc} -c conftest.s'; { (eval echo configure:1576: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest.o; then
grub_cv_asm_prefix_requirement=yes
else
grub_cv_asm_prefix_requirement=no
fi
rm -f conftest*
fi
if test "x$grub_cv_asm_prefix_requirement" = xyes; then
grub_tmp_addr32="addr32"
grub_tmp_data32="data32"
else
grub_tmp_addr32="addr32;"
grub_tmp_data32="data32;"
fi
cat >> confdefs.h <<EOF
#define ADDR32 $grub_tmp_addr32
EOF
cat >> confdefs.h <<EOF
#define DATA32 $grub_tmp_data32
EOF
echo "$ac_t""$grub_cv_asm_prefix_requirement" 1>&6
echo $ac_n "checking for .code16 addr32 assembler support""... $ac_c" 1>&6
echo "configure:1566: checking for .code16 addr32 assembler support" >&5
echo "configure:1608: checking for .code16 addr32 assembler support" >&5
if eval "test \"\${grub_cv_asm_addr32+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.s <<\EOF
.code16
l1: addr32
movb %al, l1
l1: ADDR32 movb %al, l1
EOF
if { ac_try='${CC-cc} -c conftest.s'; { (eval echo configure:1576: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest.o; then
if { ac_try='${CC-cc} -c conftest.s'; { (eval echo configure:1617: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest.o; then
grub_cv_asm_addr32=yes
else
grub_cv_asm_addr32=no
@ -1586,48 +1627,8 @@ if test "x$grub_cv_asm_addr32" != xyes; then
fi
echo $ac_n "checking whether addr32 must be in the same line as the instruction""... $ac_c" 1>&6
echo "configure:1591: checking whether addr32 must be in the same line as the instruction" >&5
if eval "test \"\${grub_cv_asm_prefix_requirement+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.s <<\EOF
.code16
l1: addr32 movb %al, l1
EOF
if { ac_try='${CC-cc} -c conftest.s'; { (eval echo configure:1600: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest.o; then
grub_cv_asm_prefix_requirement=yes
else
grub_cv_asm_prefix_requirement=no
fi
rm -f conftest*
fi
echo "$ac_t""$grub_cv_asm_prefix_requirement" 1>&6
if test "x$grub_cv_asm_prefix_requirement" != xyes; then
cat >> confdefs.h <<EOF
#define ADDR32 addr32;
EOF
cat >> confdefs.h <<EOF
#define DATA32 data32;
EOF
else
cat >> confdefs.h <<EOF
#define ADDR32 addr32
EOF
cat >> confdefs.h <<EOF
#define DATA32 data32
EOF
fi
echo $ac_n "checking if start is defined by the compiler""... $ac_c" 1>&6
echo "configure:1631: checking if start is defined by the compiler" >&5
echo "configure:1632: checking if start is defined by the compiler" >&5
if eval "test \"\${grub_cv_check_start_symbol+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1640,12 +1641,8 @@ main (void)
}
EOF
if { ac_try='${CC-cc} conftest.c -o conftest'; { (eval echo configure:1644: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest; then
if { ac_try='${CC-cc} conftest.c -o conftest'; { (eval echo configure:1645: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest; then
grub_cv_check_start_symbol=yes
cat >> confdefs.h <<\EOF
#define HAVE_START_SYMBOL 1
EOF
else
grub_cv_check_start_symbol=no
fi
@ -1654,11 +1651,18 @@ rm -f conftest*
fi
if test "x$grub_cv_check_start_symbol" = xyes; then
cat >> confdefs.h <<\EOF
#define HAVE_START_SYMBOL 1
EOF
fi
echo "$ac_t""$grub_cv_check_start_symbol" 1>&6
echo $ac_n "checking if _start is defined by the compiler""... $ac_c" 1>&6
echo "configure:1662: checking if _start is defined by the compiler" >&5
echo "configure:1666: checking if _start is defined by the compiler" >&5
if eval "test \"\${grub_cv_check_uscore_start_symbol+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1671,12 +1675,8 @@ main (void)
}
EOF
if { ac_try='${CC-cc} conftest.c -o conftest'; { (eval echo configure:1675: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest; then
if { ac_try='${CC-cc} conftest.c -o conftest'; { (eval echo configure:1679: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest; then
grub_cv_check_uscore_start_symbol=yes
cat >> confdefs.h <<\EOF
#define HAVE_USCORE_START_SYMBOL 1
EOF
else
grub_cv_check_uscore_start_symbol=no
fi
@ -1685,6 +1685,13 @@ rm -f conftest*
fi
if test "x$grub_cv_check_uscore_start_symbol" = xyes; then
cat >> confdefs.h <<\EOF
#define HAVE_USCORE_START_SYMBOL 1
EOF
fi
echo "$ac_t""$grub_cv_check_uscore_start_symbol" 1>&6
if test "x$grub_cv_check_start_symbol" != "xyes" \
@ -1694,7 +1701,7 @@ fi
echo $ac_n "checking if end is defined by the compiler""... $ac_c" 1>&6
echo "configure:1698: checking if end is defined by the compiler" >&5
echo "configure:1705: checking if end is defined by the compiler" >&5
if eval "test \"\${grub_cv_check_end_symbol+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1707,12 +1714,8 @@ main (void)
}
EOF
if { ac_try='${CC-cc} conftest.c -o conftest'; { (eval echo configure:1711: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest; then
if { ac_try='${CC-cc} conftest.c -o conftest'; { (eval echo configure:1718: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest; then
grub_cv_check_end_symbol=yes
cat >> confdefs.h <<\EOF
#define HAVE_END_SYMBOL 1
EOF
else
grub_cv_check_end_symbol=no
fi
@ -1721,11 +1724,18 @@ rm -f conftest*
fi
if test "x$grub_cv_check_end_symbol" = xyes; then
cat >> confdefs.h <<\EOF
#define HAVE_END_SYMBOL 1
EOF
fi
echo "$ac_t""$grub_cv_check_end_symbol" 1>&6
echo $ac_n "checking if _end is defined by the compiler""... $ac_c" 1>&6
echo "configure:1729: checking if _end is defined by the compiler" >&5
echo "configure:1739: checking if _end is defined by the compiler" >&5
if eval "test \"\${grub_cv_check_uscore_end_symbol+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
@ -1738,14 +1748,17 @@ main (void)
}
EOF
if { ac_try='${CC-cc} conftest.c -o conftest'; { (eval echo configure:1742: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest; then
if { ac_try='${CC-cc} conftest.c -o conftest'; { (eval echo configure:1752: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }; } && test -s conftest; then
grub_cv_check_uscore_end_symbol=yes
else
grub_cv_check_uscore_end_symbol=no
fi
if test "x$grub_cv_check_uscore_end_symbol" = xyes; then
cat >> confdefs.h <<\EOF
#define HAVE_USCORE_END_SYMBOL 1
EOF
else
grub_cv_check_uscore_end_symbol=no
fi
rm -f conftest*
@ -1761,7 +1774,7 @@ fi
# Check for curses libraries.
echo $ac_n "checking for wgetch in -lncurses""... $ac_c" 1>&6
echo "configure:1765: checking for wgetch in -lncurses" >&5
echo "configure:1778: checking for wgetch in -lncurses" >&5
ac_lib_var=`echo ncurses'_'wgetch | sed 'y%./+-:%__p__%'`
if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -1769,7 +1782,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lncurses $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1773 "configure"
#line 1786 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@ -1780,7 +1793,7 @@ int main() {
wgetch()
; return 0; }
EOF
if { (eval echo configure:1784: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1797: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -1803,7 +1816,7 @@ EOF
else
echo "$ac_t""no" 1>&6
echo $ac_n "checking for wgetch in -lcurses""... $ac_c" 1>&6
echo "configure:1807: checking for wgetch in -lcurses" >&5
echo "configure:1820: checking for wgetch in -lcurses" >&5
ac_lib_var=`echo curses'_'wgetch | sed 'y%./+-:%__p__%'`
if eval "test \"\${ac_cv_lib_$ac_lib_var+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
@ -1811,7 +1824,7 @@ else
ac_save_LIBS="$LIBS"
LIBS="-lcurses $LIBS"
cat > conftest.$ac_ext <<EOF
#line 1815 "configure"
#line 1828 "configure"
#include "confdefs.h"
/* Override any gcc2 internal prototype to avoid an error. */
/* We use char because int might match the return type of a gcc2
@ -1822,7 +1835,7 @@ int main() {
wgetch()
; return 0; }
EOF
if { (eval echo configure:1826: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
if { (eval echo configure:1839: \"$ac_link\") 1>&5; (eval $ac_link) 2>&5; } && test -s conftest${ac_exeext}; then
rm -rf conftest*
eval "ac_cv_lib_$ac_lib_var=yes"
else
@ -1852,7 +1865,7 @@ fi
# Check for headers.
echo $ac_n "checking how to run the C preprocessor""... $ac_c" 1>&6
echo "configure:1856: checking how to run the C preprocessor" >&5
echo "configure:1869: checking how to run the C preprocessor" >&5
# On Suns, sometimes $CPP names a directory.
if test -n "$CPP" && test -d "$CPP"; then
CPP=
@ -1867,13 +1880,13 @@ else
# On the NeXT, cc -E runs the code through the compiler's parser,
# not just through cpp.
cat > conftest.$ac_ext <<EOF
#line 1871 "configure"
#line 1884 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1877: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:1890: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@ -1884,13 +1897,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -E -traditional-cpp"
cat > conftest.$ac_ext <<EOF
#line 1888 "configure"
#line 1901 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1894: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:1907: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@ -1901,13 +1914,13 @@ else
rm -rf conftest*
CPP="${CC-cc} -nologo -E"
cat > conftest.$ac_ext <<EOF
#line 1905 "configure"
#line 1918 "configure"
#include "confdefs.h"
#include <assert.h>
Syntax Error
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1911: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:1924: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
:
@ -1935,17 +1948,17 @@ for ac_hdr in string.h strings.h ncurses/curses.h ncurses.h curses.h
do
ac_safe=`echo "$ac_hdr" | sed 'y%./+-%__p_%'`
echo $ac_n "checking for $ac_hdr""... $ac_c" 1>&6
echo "configure:1939: checking for $ac_hdr" >&5
echo "configure:1952: checking for $ac_hdr" >&5
if eval "test \"\${ac_cv_header_$ac_safe+set}\" = set"; then
echo $ac_n "(cached) $ac_c" 1>&6
else
cat > conftest.$ac_ext <<EOF
#line 1944 "configure"
#line 1957 "configure"
#include "confdefs.h"
#include <$ac_hdr>
EOF
ac_try="$ac_cpp conftest.$ac_ext >/dev/null 2>conftest.out"
{ (eval echo configure:1949: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
{ (eval echo configure:1962: \"$ac_try\") 1>&5; (eval $ac_try) 2>&5; }
ac_err=`grep -v '^ *+' conftest.out | grep -v "^conftest.${ac_ext}\$"`
if test -z "$ac_err"; then
rm -rf conftest*

View file

@ -92,20 +92,13 @@ if test "x$grub_cv_prog_objcopy_absolute" != xyes; then
AC_MSG_ERROR([GRUB requires a working absolute objcopy; upgrade your binutils])
fi
grub_ASM_PREFIX_REQUIREMENT
grub_ASM_ADDR32
if test "x$grub_cv_asm_addr32" != xyes; then
AC_MSG_ERROR([GRUB requires GAS .code16 addr32 support; upgrade your binutils])
fi
grub_ASM_PREFIX_REQUIREMENT
if test "x$grub_cv_asm_prefix_requirement" != xyes; then
AC_DEFINE_UNQUOTED([ADDR32], [addr32; ])
AC_DEFINE_UNQUOTED([DATA32], [data32; ])
else
AC_DEFINE_UNQUOTED([ADDR32], [addr32])
AC_DEFINE_UNQUOTED([DATA32], [data32])
fi
grub_CHECK_START_SYMBOL
grub_CHECK_USCORE_START_SYMBOL
if test "x$grub_cv_check_start_symbol" != "xyes" \

View file

@ -31,7 +31,7 @@
#define ABS(x) (x-_start+0x7c00)
/* Print message string */
#define MSG(x) movw $x, %si; call message
#define MSG(x) movw $ABS(x), %si; call message
.file "stage1.S"
@ -104,7 +104,7 @@ after_BPB:
/*
* Check if we have a forced disk reference here
*/
movb firstlist, %al
movb ABS(firstlist), %al
cmpb $0xff, %al
je 1f
movb %al, %dl
@ -460,8 +460,7 @@ probe_loop:
/*
* Floppy disk probe failure.
*/
movw $fd_probe_error_string, %si
call message
MSG(fd_probe_error_string)
jmp general_error
fd_probe_error_string: .string "Floppy"

View file

@ -31,7 +31,7 @@
#define ABS(x) (x-_start+0x7c00)
/* Print message string */
#define MSG(x) movw $x, %si; call message
#define MSG(x) movw $ABS(x), %si; call message
.file "stage1_lba.S"
@ -99,7 +99,7 @@ after_BPB:
/*
* Check if we have a forced disk reference here
*/
movb firstlist, %al
movb ABS(firstlist), %al
cmpb $0xff, %al
je 1f
movb %al, %dl

View file

@ -735,7 +735,7 @@ probe_values:
*/
ENTRY(putchar)
ENTRY(grub_putchar)
push %ebp
push %eax
push %ebx
@ -748,7 +748,7 @@ ENTRY(putchar)
/* if newline, print CR as well */
pushl $0xd
call EXT_C(putchar)
call EXT_C(grub_putchar)
popl %eax
pc_notnewline: