2002-10-06 Yoshinori K. Okuji <okuji@enbug.org>

* configure.in (falign_loop_flag): New variable. Set to if GCC
	supports `-falign-*'. If true, use `-falign-jumps',
	`-falign-loops' and `-falign-functions' instead of
	`-malign-jumps', `-malign-loops' and `-malign-functions',
	because `-malign-*' are obsolete in GCC 3.x. Reported by Jeremy
	Katz.
This commit is contained in:
okuji 2002-10-05 23:20:15 +00:00
parent cba84c4d9c
commit f891c6f7e4
7 changed files with 89 additions and 10 deletions

View file

@ -1,3 +1,12 @@
2002-10-06 Yoshinori K. Okuji <okuji@enbug.org>
* configure.in (falign_loop_flag): New variable. Set to if GCC
supports `-falign-*'. If true, use `-falign-jumps',
`-falign-loops' and `-falign-functions' instead of
`-malign-jumps', `-malign-loops' and `-malign-functions',
because `-malign-*' are obsolete in GCC 3.x. Reported by Jeremy
Katz.
2002-09-13 Yoshinori K. Okuji <okuji@enbug.org>
* stage2/serial.c (fill_input_buf): Take a new argument NOWAIT.

63
configure vendored
View file

@ -2992,7 +2992,7 @@ if test "${undef_flag+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
saved_CPPFLAGS=$CPPFLAGS
saved_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="-Wundef"
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
@ -3031,14 +3031,71 @@ cat conftest.$ac_ext >&5
undef_flag=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
CPPFLAGS=$saved_CPPFLAGS
CPPFLAGS="$saved_CPPFLAGS"
fi
echo "$as_me:$LINENO: result: $undef_flag" >&5
echo "${ECHO_T}$undef_flag" >&6
# The options `-falign-*' are supported by gcc 3.0 or later.
# Probably it is sufficient to only check for -falign-loops.
echo "$as_me:$LINENO: checking whether -falign-loops works" >&5
echo $ECHO_N "checking whether -falign-loops works... $ECHO_C" >&6
if test "${falign_loop_flag+set}" = set; then
echo $ECHO_N "(cached) $ECHO_C" >&6
else
saved_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="-falign-loops=1"
cat >conftest.$ac_ext <<_ACEOF
#line $LINENO "configure"
#include "confdefs.h"
#ifdef F77_DUMMY_MAIN
# ifdef __cplusplus
extern "C"
# endif
int F77_DUMMY_MAIN() { return 1; }
#endif
int
main ()
{
;
return 0;
}
_ACEOF
rm -f conftest.$ac_objext
if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5
(eval $ac_compile) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); } &&
{ ac_try='test -s conftest.$ac_objext'
{ (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5
(eval $ac_try) 2>&5
ac_status=$?
echo "$as_me:$LINENO: \$? = $ac_status" >&5
(exit $ac_status); }; }; then
falign_loop_flag=yes
else
echo "$as_me: failed program was:" >&5
cat conftest.$ac_ext >&5
falign_loop_flag=no
fi
rm -f conftest.$ac_objext conftest.$ac_ext
CPPFLAGS="$saved_CPPFLAGS"
fi
echo "$as_me:$LINENO: result: $falign_loop_flag" >&5
echo "${ECHO_T}$falign_loop_flag" >&6
# Force no alignment to save space.
CPPFLAGS="$CPPFLAGS -malign-jumps=1 -malign-loops=1 -malign-functions=1"
if test "x$falign_loop_flag" = xyes; then
CPPFLAGS="$CPPFLAGS -falign-jumps=1 -falign-loops=1 -falign-functions=1"
else
CPPFLAGS="$CPPFLAGS -malign-jumps=1 -malign-loops=1 -malign-functions=1"
fi
if test "x$undef_flag" = xyes; then
CPPFLAGS="$CPPFLAGS -Wundef"

View file

@ -102,14 +102,27 @@ CPPFLAGS="$CPPFLAGS -Wall -Wmissing-prototypes -Wunused -Wshadow"
CPPFLAGS="$CPPFLAGS -Wpointer-arith"
AC_CACHE_CHECK([whether -Wundef works], undef_flag, [
saved_CPPFLAGS=$CPPFLAGS
saved_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="-Wundef"
AC_TRY_COMPILE(, , undef_flag=yes, undef_flag=no)
CPPFLAGS=$saved_CPPFLAGS
CPPFLAGS="$saved_CPPFLAGS"
])
# The options `-falign-*' are supported by gcc 3.0 or later.
# Probably it is sufficient to only check for -falign-loops.
AC_CACHE_CHECK([whether -falign-loops works], [falign_loop_flag], [
saved_CPPFLAGS="$CPPFLAGS"
CPPFLAGS="-falign-loops=1"
AC_TRY_COMPILE(, , [falign_loop_flag=yes], [falign_loop_flag=no])
CPPFLAGS="$saved_CPPFLAGS"
])
# Force no alignment to save space.
CPPFLAGS="$CPPFLAGS -malign-jumps=1 -malign-loops=1 -malign-functions=1"
if test "x$falign_loop_flag" = xyes; then
CPPFLAGS="$CPPFLAGS -falign-jumps=1 -falign-loops=1 -falign-functions=1"
else
CPPFLAGS="$CPPFLAGS -malign-jumps=1 -malign-loops=1 -malign-functions=1"
fi
if test "x$undef_flag" = xyes; then
CPPFLAGS="$CPPFLAGS -Wundef"

View file

@ -1,5 +1,5 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.23.
.TH GRUB-INSTALL "8" "September 2002" "grub-install (GNU GRUB 0.93)" FSF
.TH GRUB-INSTALL "8" "October 2002" "grub-install (GNU GRUB 0.93)" FSF
.SH NAME
grub-install \- install GRUB on your drive
.SH SYNOPSIS

View file

@ -1,5 +1,5 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.23.
.TH GRUB-MD5-CRYPT "8" "September 2002" "grub-md5-crypt (GNU GRUB )" FSF
.TH GRUB-MD5-CRYPT "8" "October 2002" "grub-md5-crypt (GNU GRUB )" FSF
.SH NAME
grub-md5-crypt \- Encrypt a password in MD5 format
.SH SYNOPSIS

View file

@ -1,5 +1,5 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.23.
.TH GRUB "8" "September 2002" "grub (GNU GRUB 0.93)" FSF
.TH GRUB "8" "October 2002" "grub (GNU GRUB 0.93)" FSF
.SH NAME
grub \- the grub shell
.SH SYNOPSIS

View file

@ -1,5 +1,5 @@
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.23.
.TH MBCHK "1" "September 2002" "mbchk (GNU GRUB 0.93)" FSF
.TH MBCHK "1" "October 2002" "mbchk (GNU GRUB 0.93)" FSF
.SH NAME
mbchk \- check the format of a Multiboot kernel
.SH SYNOPSIS