Skip to contentSkip to conversation

grub: force -m32 so we build grub 32 bits on 64 bits architecture

PATCH New Thomas Petazzoni 4 participants 4 messages Dec 4, 2013

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 grub: force -m32 so we build grub 32 bits on 64 bits architecture

As reported by Matthew Weber, Grub doesn't build on 64 bits build machines, because the host compiler produces 64 bits binaries by default, while Grub should be built 32 bits. Therefore, this commit passes -m32 to the Grub CFLAGS, so that 32 bits binaries are always produced.

---
 boot/grub/grub.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
boot/grub/grub.mk +1 -1
index 6ba02cd..eb066af 100644
@@ -70,7 +70,7 @@ GRUB_POST_PATCH_HOOKS += GRUB_DEBIAN_PATCHES
 
 GRUB_CONF_ENV = \
 	$(HOST_CONFIGURE_OPTS) \
-	CFLAGS="$(HOST_CFLAGS) $(GRUB_CFLAGS)"
+	CFLAGS="$(HOST_CFLAGS) $(GRUB_CFLAGS) -m32"
 
 GRUB_CONF_OPT = \
 	--disable-auto-linux-mem-opt \
Signature · 1 line
1.8.1.2
#1 lore raw

PATCH 1/1 grub: force -m32 so we build grub 32 bits on 64 bits architecture

Hi Thomas,

Quoted 8 lines · Thomas Petazzoni

As reported by Matthew Weber, Grub doesn't build on 64 bits build machines, because the host compiler produces 64 bits binaries by default, while Grub should be built 32 bits. Therefore, this commit passes -m32 to the Grub CFLAGS, so that 32 bits binaries are always produced.

For some reason Matthew does not appear on the Cc list. Added now. Shouldn't git send-email do this automatically?

baruch

Quoted 20 lines
---
 boot/grub/grub.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
boot/grub/grub.mk +1 -1
index 6ba02cd..eb066af 100644
@@ -70,7 +70,7 @@ GRUB_POST_PATCH_HOOKS += GRUB_DEBIAN_PATCHES
 
 GRUB_CONF_ENV = \
 	$(HOST_CONFIGURE_OPTS) \
-	CFLAGS="$(HOST_CFLAGS) $(GRUB_CFLAGS)"
+	CFLAGS="$(HOST_CFLAGS) $(GRUB_CFLAGS) -m32"
 
 GRUB_CONF_OPT = \
 	--disable-auto-linux-mem-opt \
Signature · 1 line
1.8.1.2
Signature · 3 lines
     http://baruch.siach.name/blog/                  ~. .~   Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
   - baruch at tkos.co.il - tel: +972.2.679.5364, http://www.tkos.co.il -
#2 lore raw

PATCH 1/1 grub: force -m32 so we build grub 32 bits on 64 bits architecture

In reply to Thomas Petazzoni

Thomas Petazzoni <[email protected]> wrote on 12/04/2013 01:33:50 PM:

Quoted 13 lines

From: Thomas Petazzoni <[email protected]>
To: buildroot at uclibc.org
Cc: Matthew Weber <[email protected]>
Date: 12/04/2013 01:33 PM
Subject: [PATCH] grub: force -m32 so we build grub 32 bits on 64 bits architecture

As reported by Matthew Weber, Grub doesn't build on 64 bits build machines, because the host compiler produces 64 bits binaries by default, while Grub should be built 32 bits. Therefore, this commit passes -m32 to the Grub CFLAGS, so that 32 bits binaries are always produced.

Quoted 3 lines

Thanks Thomas!

Quoted 20 lines
---
 boot/grub/grub.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
boot/grub/grub.mk +1 -1
index 6ba02cd..eb066af 100644
@@ -70,7 +70,7 @@ GRUB_POST_PATCH_HOOKS += GRUB_DEBIAN_PATCHES
 
 GRUB_CONF_ENV = \
    $(HOST_CONFIGURE_OPTS) \
-   CFLAGS="$(HOST_CFLAGS) $(GRUB_CFLAGS)"
+   CFLAGS="$(HOST_CFLAGS) $(GRUB_CFLAGS) -m32"
 
 GRUB_CONF_OPT = \
    --disable-auto-linux-mem-opt \
Signature · 1 line
1.8.1.2
#3 lore raw

PATCH 1/1 grub: force -m32 so we build grub 32 bits on 64 bits architecture

In reply to Thomas Petazzoni
Quoted 11 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line

"Thomas" == Thomas Petazzoni <[email protected]> writes:

As reported by Matthew Weber, Grub doesn't build on 64 bits build machines, because the host compiler produces 64 bits binaries by default, while Grub should be built 32 bits. Therefore, this commit passes -m32 to the Grub CFLAGS, so that 32 bits binaries are always produced.

Committed, thanks.

Signature · 1 line
Bye, Peter Korsgaard