Bug#760428: grub2: FTBFS on x32: error: gcc-4.9 failed to produce assembly code

Colin Watson cjwatson at debian.org
Fri Sep 5 12:04:26 UTC 2014


On Wed, Sep 03, 2014 at 06:50:08PM -0700, Daniel Schepler wrote:
> I'm not sure why -m64 is present in the first test but gets dropped in the
> second, but that's probably the reason the test for -mcmodel=large succeeds
> but then causes problems down the line.

This is handled a bit baroquely, but does this patch work for you?  To
test it, you should just be able to unpack a fresh source package, apply
this patch, and run "debian/rules debian/stamps/build-grub-emu".

diff --git a/configure.ac b/configure.ac
index 735313d..665ffa6 100644
--- a/configure.ac
+++ b/configure.ac
@@ -344,10 +344,12 @@ AC_SYS_LARGEFILE
 # Identify characteristics of the host architecture.
 unset ac_cv_c_bigendian
 
-if test x"$target_cpu-$platform" = xsparc64-emu ; then
-  CFLAGS="$CFLAGS -m64"
-  HOST_CFLAGS="$HOST_CFLAGS -m64"
-fi
+case "$target_cpu-$platform" in
+    sparc64-emu | x86_64-emu)
+	CFLAGS="$CFLAGS -m64"
+	HOST_CFLAGS="$HOST_CFLAGS -m64"
+	;;
+esac
 
 AC_C_BIGENDIAN
 AC_CHECK_SIZEOF(void *)

Thanks,

-- 
Colin Watson                                       [cjwatson at debian.org]



More information about the Pkg-grub-devel mailing list