+2004-04-04 Yoshinori K. Okuji <okuji@enbug.org>
+
+ * configure.ac (STAGE2_CFLAGS): Check if -fno-stack-protector is
+ supported by GCC. If yes, added the option. This is necessary
+ for OpenBSD, because the stack protector defines additional
+ symbols. Reported by uc.sheda <uc.sheda@laposte.net>.
+
2004-03-28 Pavel Roskin <proski@gnu.org>
* stage2/boot.c: Imply --no-mem-option for Linux kernels with
else
STAGE2_CFLAGS="-O2 -fno-strength-reduce -fno-unroll-loops"
fi
+ # OpenBSD has a GCC extension for protecting applications from
+ # stack smashing attacks, but GRUB doesn't want this feature.
+ echo "$as_me:$LINENO: checking whether gcc has -fno-stack-protector" >&5
+echo $ECHO_N "checking whether gcc has -fno-stack-protector... $ECHO_C" >&6
+if test "${no_stack_protector_flag+set}" = set; then
+ echo $ECHO_N "(cached) $ECHO_C" >&6
+else
+
+ saved_CFLAGS=$CFLAGS
+ CFLAGS="-fno-stack-protector"
+ cat >conftest.$ac_ext <<_ACEOF
+#line $LINENO "configure"
+/* confdefs.h. */
+_ACEOF
+cat confdefs.h >>conftest.$ac_ext
+cat >>conftest.$ac_ext <<_ACEOF
+/* end confdefs.h. */
+
+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
+ no_stack_protector_flag=yes
+else
+ echo "$as_me: failed program was:" >&5
+sed 's/^/| /' conftest.$ac_ext >&5
+
+no_stack_protector_flag=no
+fi
+rm -f conftest.$ac_objext conftest.$ac_ext
+ CFLAGS=$saved_CFLAGS
+
+fi
+echo "$as_me:$LINENO: result: $no_stack_protector_flag" >&5
+echo "${ECHO_T}$no_stack_protector_flag" >&6
+ if test "x$no_stack_protector_flag" = xyes; then
+ STAGE2_CFLAGS="$STAGE2_CFLAGS -fno-stack-protector"
+ fi
fi
fi
else
STAGE2_CFLAGS="-O2 -fno-strength-reduce -fno-unroll-loops"
fi
+ # OpenBSD has a GCC extension for protecting applications from
+ # stack smashing attacks, but GRUB doesn't want this feature.
+ AC_CACHE_CHECK([whether gcc has -fno-stack-protector],
+ no_stack_protector_flag, [
+ saved_CFLAGS=$CFLAGS
+ CFLAGS="-fno-stack-protector"
+ AC_TRY_COMPILE(,
+ ,
+ no_stack_protector_flag=yes,
+ no_stack_protector_flag=no)
+ CFLAGS=$saved_CFLAGS
+ ])
+ if test "x$no_stack_protector_flag" = xyes; then
+ STAGE2_CFLAGS="$STAGE2_CFLAGS -fno-stack-protector"
+ fi
fi
fi
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.23.
-.TH GRUB-INSTALL "8" "March 2004" "grub-install (GNU GRUB 0.94)" FSF
+.TH GRUB-INSTALL "8" "April 2004" "grub-install (GNU GRUB 0.94)" FSF
.SH NAME
grub-install \- install GRUB on your drive
.SH SYNOPSIS
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.23.
-.TH GRUB-MD5-CRYPT "8" "March 2004" "grub-md5-crypt (GNU GRUB )" FSF
+.TH GRUB-MD5-CRYPT "8" "April 2004" "grub-md5-crypt (GNU GRUB )" FSF
.SH NAME
grub-md5-crypt \- Encrypt a password in MD5 format
.SH SYNOPSIS
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.23.
-.TH GRUB-TERMINFO "8" "March 2004" "grub-terminfo (GNU GRUB 0.94)" FSF
+.TH GRUB-TERMINFO "8" "April 2004" "grub-terminfo (GNU GRUB 0.94)" FSF
.SH NAME
grub-terminfo \- Generate a terminfo command from a terminfo name
.SH SYNOPSIS
.\" DO NOT MODIFY THIS FILE! It was generated by help2man 1.23.
-.TH GRUB "8" "March 2004" "grub (GNU GRUB 0.94)" FSF
+.TH GRUB "8" "April 2004" "grub (GNU GRUB 0.94)" FSF
.SH NAME
grub \- the grub shell
.SH SYNOPSIS
sysconfdir = @sysconfdir@
target_alias = @target_alias@
sbin_PROGRAMS = grub
+@SERIAL_SPEED_SIMULATION_FALSE@SERIAL_FLAGS = -DSUPPORT_SERIAL=1
@SERIAL_SPEED_SIMULATION_TRUE@SERIAL_FLAGS = -DSUPPORT_SERIAL=1 -DSIMULATE_SLOWNESS_OF_SERIAL=1
-@SERIAL_SPEED_SIMULATION_FALSE@SERIAL_FLAGS = -DSUPPORT_SERIAL=1
AM_CPPFLAGS = -DGRUB_UTIL=1 -DFSYS_EXT2FS=1 -DFSYS_FAT=1 \
-DFSYS_FFS=1 -DFSYS_MINIX=1 -DSUPPORT_HERCULES=1 \
# For <shared.h> and <stage1.h>.
INCLUDES = -I$(top_srcdir)/stage2 -I$(top_srcdir)/stage1
+@NETBOOT_SUPPORT_FALSE@LIBDRIVERS =
# Don't build the netboot support by default.
@NETBOOT_SUPPORT_TRUE@LIBDRIVERS = libdrivers.a
-@NETBOOT_SUPPORT_FALSE@LIBDRIVERS =
noinst_LIBRARIES = $(LIBDRIVERS)