mknbi (1.4.4-7) 03-gcc-multilib-harder.patch

Summary

 Makefile |    7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

    
download this patch

Patch contents

Author: Colin Watson <cjwatson@ubuntu.com>
Description:
 Pass appropriate options to ld and as to make multilib build work
 (Closes: #593609).

diff -Naurp mknbi.orig/Makefile mknbi/Makefile
--- mknbi.orig/Makefile	2010-09-01 08:17:50.000000000 +0000
+++ mknbi/Makefile	2010-09-01 08:17:55.000000000 +0000
@@ -20,7 +20,8 @@ OLDGAS:=	$(shell $(AS) --version | grep
 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 @@ first32elf@%.dos:	start32@%.o first32dos
 	$(LD) -N -Ttext $* -e _start $(LDBINARYFLAG) -o $@ start32@$*.o first32dos.o printf.o string.o
 
 start32@%.o:	start32.S
-	gcc -E -DRELOC=$* $(OLDGAS) start32.S | $(AS) -o start32@$*.o
+	gcc -E -DRELOC=$* $(OLDGAS) start32.S | $(AS) $(ASFLAGS) -o start32@$*.o
 
 first32.o:	first32.c etherboot.h start32.h
 	gcc $(CFLAGS) -o first32.o -c first32.c
@@ -161,7 +162,7 @@ lua/bin/lua:
 	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