Submitted By: Joe Ciccone Date: 11-20-2005 Initial Package Version: 0.97 Upstream Status: None, They dont think a problem exists. So I dont see a reason to submit this upstream. Origin: Joe Ciccone's patience Description: This patch removes -m32 from the CFLAGS defined in configure.ac and moves it into the makefiles where it is needed thus allowing the utilities to link properly to the default libs, 64bit or 32bit, and still allow the bootloader to build 32bit. diff -Naur grub-0.97.orig/configure.ac grub-0.97/configure.ac --- grub-0.97.orig/configure.ac 2005-05-08 02:36:03.000000000 +0000 +++ grub-0.97/configure.ac 2005-11-20 22:08:01.000000000 +0000 @@ -46,9 +46,9 @@ default_CFLAGS=yes fi -if test "x$host_cpu" = xx86_64; then - CFLAGS="-m32 $CFLAGS" -fi +#if test "x$host_cpu" = xx86_64; then +# CFLAGS="-m32 $CFLAGS" +#fi # # Programs @@ -159,10 +159,10 @@ # Defined in acinclude.m4. grub_ASM_USCORE -grub_PROG_OBJCOPY_ABSOLUTE -if test "x$grub_cv_prog_objcopy_absolute" != xyes; then - AC_MSG_ERROR([GRUB requires a working absolute objcopy; upgrade your binutils]) -fi +#grub_PROG_OBJCOPY_ABSOLUTE +#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 diff -Naur grub-0.97.orig/gnu/stubs.h grub-0.97/gnu/stubs.h --- grub-0.97.orig/gnu/stubs.h 1970-01-01 00:00:00.000000000 +0000 +++ grub-0.97/gnu/stubs.h 2005-11-20 22:50:50.000000000 +0000 @@ -0,0 +1,23 @@ +/* This file is automatically generated. + It defines a symbol `__stub_FUNCTION' for each function + in the C library which is a stub, meaning it will fail + every time called, usually setting errno to ENOSYS. */ + +#ifdef _LIBC + #error Applications may not define the macro _LIBC +#endif + +#define __stub___kernel_cosl +#define __stub___kernel_sinl +#define __stub___kernel_tanl +#define __stub_chflags +#define __stub_fattach +#define __stub_fchflags +#define __stub_fdetach +#define __stub_gtty +#define __stub_lchmod +#define __stub_lutimes +#define __stub_revoke +#define __stub_setlogin +#define __stub_sstk +#define __stub_stty diff -Naur grub-0.97.orig/grub/Makefile.am grub-0.97/grub/Makefile.am --- grub-0.97.orig/grub/Makefile.am 2005-02-02 20:38:19.000000000 +0000 +++ grub-0.97/grub/Makefile.am 2005-11-21 00:07:07.000000000 +0000 @@ -6,7 +6,7 @@ SERIAL_FLAGS = -DSUPPORT_SERIAL=1 endif -AM_CPPFLAGS = -DGRUB_UTIL=1 -DFSYS_EXT2FS=1 -DFSYS_FAT=1 -DFSYS_FFS=1 \ +AM_CPPFLAGS = -m32 -DGRUB_UTIL=1 -DFSYS_EXT2FS=1 -DFSYS_FAT=1 -DFSYS_FFS=1 \ -DFSYS_ISO9660=1 -DFSYS_JFS=1 -DFSYS_MINIX=1 -DFSYS_REISERFS=1 \ -DFSYS_UFS2=1 -DFSYS_VSTAFS=1 -DFSYS_XFS=1 \ -DUSE_MD5_PASSWORDS=1 -DSUPPORT_HERCULES=1 \ diff -Naur grub-0.97.orig/netboot/Makefile.am grub-0.97/netboot/Makefile.am --- grub-0.97.orig/netboot/Makefile.am 2003-07-09 11:45:37.000000000 +0000 +++ grub-0.97/netboot/Makefile.am 2005-11-20 23:17:27.000000000 +0000 @@ -1,3 +1,6 @@ +AM_CFLAGS = -m32 +AM_CPPFLAGS = -m32 + # For and . INCLUDES = -I$(top_srcdir)/stage2 -I$(top_srcdir)/stage1 diff -Naur grub-0.97.orig/stage1/Makefile.am grub-0.97/stage1/Makefile.am --- grub-0.97.orig/stage1/Makefile.am 2004-07-16 11:44:56.000000000 +0000 +++ grub-0.97/stage1/Makefile.am 2005-11-20 23:15:42.000000000 +0000 @@ -4,7 +4,7 @@ CLEANFILES = $(nodist_pkglib_DATA) # We can't use builtins or standard includes. -AM_CCASFLAGS = $(STAGE1_CFLAGS) -fno-builtin -nostdinc +AM_CCASFLAGS = -m32 $(STAGE1_CFLAGS) -fno-builtin -nostdinc LDFLAGS = -nostdlib -Wl,-N,-Ttext,7C00 noinst_PROGRAMS = stage1.exec diff -Naur grub-0.97.orig/stage2/Makefile.am grub-0.97/stage2/Makefile.am --- grub-0.97.orig/stage2/Makefile.am 2005-02-02 20:37:35.000000000 +0000 +++ grub-0.97/stage2/Makefile.am 2005-11-20 23:17:47.000000000 +0000 @@ -10,6 +10,9 @@ terminfo.h tparm.h nbi.h ufs2.h vstafs.h xfs.h EXTRA_DIST = setjmp.S apm.S $(noinst_SCRIPTS) +AM_CFLAGS = -m32 +AM_CPPFLAGS = -m32 + # For . INCLUDES = -I$(top_srcdir)/stage1