mirror of
https://git.savannah.gnu.org/git/grub.git
synced 2026-10-20 22:48:22 +00:00
fix some bugs when COFF is used and some configure bugs.
This commit is contained in:
1 parent
c58d9a073e
commit
dc267a70d2
10 files changed
+220
-131
No files matched your search
@@ -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*
|
||||
|
||||
Reference in new issue
Block a user