Package: mknbi
Version: 1.4.4-6
Severity: normal
Tags: patch
User: ubuntu-de...@lists.ubuntu.com
Usertags: origin-ubuntu ubuntu-patch maverick

Following the fix for #587734, the gcc-multilib build on amd64 is still
broken; as and ld don't use a 32-bit target by default there and need to
be told to do so.  Patch attached.

-- 
Colin Watson                                       [cjwat...@ubuntu.com]
Author: Colin Watson <cjwat...@ubuntu.com>
Description: Pass appropriate options to ld and as to make multilib build work

Index: b/Makefile
===================================================================
--- a/Makefile
+++ b/Makefile
@@ -20,7 +20,8 @@
 CFLAGS=		-I. -Os -ffreestanding -fstrength-reduce -fomit-frame-pointer \
 		-m32 -mcpu=i386 \
 		-Wall -W -Wno-format -Wno-unused -DVERSION=\"$(VERSION)$(EXTRAVERSION)\"
-LDBINARYFLAG=	--oformat binary
+LDBINARYFLAG=	--oformat binary -m elf_i386
+ASFLAGS=	--32
 FIRST32SIZE=	6144
 
 # for first32dos
@@ -101,7 +102,7 @@
 	$(LD) -N -Ttext $* -e _start $(LDBINARYFLAG) -o $@ star...@$*.o first32dos.o printf.o string.o
 
 star...@%.o:	start32.S
-	gcc -E -DRELOC=$* $(OLDGAS) start32.S | $(AS) -o star...@$*.o
+	gcc -E -DRELOC=$* $(OLDGAS) start32.S | $(AS) $(ASFLAGS) -o star...@$*.o
 
 first32.o:	first32.c etherboot.h start32.h
 	gcc $(CFLAGS) -o first32.o -c first32.c
@@ -161,7 +162,7 @@
 	cd lua; make
 
 startmenu.o:	startmenu.S startmenu.h
-	gcc -E -Ui386 -DRELOC=$(MENURELOC) $(OLDGAS) startmenu.S | $(AS) -o startmenu.o
+	gcc -E -Ui386 -DRELOC=$(MENURELOC) $(OLDGAS) startmenu.S | $(AS) $(ASFLAGS) -o startmenu.o
 
 menu.o:		menu.c stddef.h string.h printf.h ansiesc.h \
 		misc.h linux-asm-io.h etherboot.h

Reply via email to