Package: syslinux
Version: 2.11-0.1
Followup-For: Bug #249506
Hi,
I updated the patch to the current version: 2.11-0.1.
Please merge this in ASAP as this is a show stopper for the sarge
amd64 release.
MfG
Goswin
-- System Information:
Debian Release: 3.1
Architecture: amd64 (x86_64)
Kernel: Linux 2.6.8-frosties-1
Locale: LANG=en_US, LC_CTYPE=en_US (charmap=ISO-8859-1)
Versions of packages syslinux depends on:
ii libc6 2.3.2.ds1-21 GNU C Library: Shared libraries an
-- no debconf information
diff -u syslinux-2.11/debian/control syslinux-2.11/debian/control
--- syslinux-2.11/debian/control
+++ syslinux-2.11/debian/control
@@ -6,7 +6,7 @@
Build-Depends: nasm (>= 0.98.32), mtools, netpbm, docbook-to-man, mingw32
Package: syslinux
-Architecture: i386
+Architecture: i386 amd64
Depends: ${shlibs:Depends}
Recommends: mtools
Description: Bootloader for Linux/i386 using MS-DOS floppies
diff -u syslinux-2.11/debian/rules syslinux-2.11/debian/rules
--- syslinux-2.11/debian/rules
+++ syslinux-2.11/debian/rules
@@ -28,6 +28,14 @@
### STRIP += -s
### endif
+ifeq (amd64,$(shell dpkg-architecture -qDEB_HOST_ARCH))
+CFLAGS_CROSS = -m32
+ASFLAGS_CROSS = --32
+else
+CFLAGS_CROSS = -march=i386
+ASFLAGS_CROSS =
+endif
+
# Ugly hack: some binaries are present in the sources, so I must preserve them:
define backup
test -f ldlinux.asm || exit 1
@@ -56,7 +64,8 @@
$(backup)
$(MAKE) clean
### $(MAKE) CFLAGS="$(CFLAGS)" LDFLAGS="$(LDFLAGS)"
VERSION="$(VERSION)" DATE="(Debian, $(DATE))"
- $(MAKE) VERSION="$(VERSION)" DATE="(Debian, $(DATE))"
+### $(MAKE) VERSION="$(VERSION)" DATE="(Debian, $(DATE))"
+ $(MAKE) CFLAGS_CROSS="$(CFLAGS_CROSS)"
ASFLAGS_CROSS="$(ASFLAGS_CROSS)" VERSION="$(VERSION)" DATE="(Debian, $(DATE))"
touch build
binary: binary-arch binary-indep
diff -u syslinux-2.11/debian/changelog syslinux-2.11/debian/changelog
--- syslinux-2.11/debian/changelog
+++ syslinux-2.11/debian/changelog
@@ -1,3 +1,10 @@
+syslinux (2.11-0.1.0.1.pure64) unstable; urgency=low
+
+ * NUM - AMD64 fix
+ - update patch from BTS
+
+ -- Goswin von Brederlow <[EMAIL PROTECTED]> Tue, 3 May 2005 16:25:43 +0200
+
syslinux (2.11-0.1) unstable; urgency=low
* NMU with new upstream release.
only in patch2:
unchanged:
--- syslinux-2.11.orig/Makefile
+++ syslinux-2.11/Makefile
@@ -19,6 +19,8 @@
CC = gcc
INCLUDE =
CFLAGS = -W -Wall -Os -fomit-frame-pointer -D_FILE_OFFSET_BITS=64
+CFLAGS_CROSS = -march=i386
+ASFLAGS_CROSS =
PIC = -fPIC
LDFLAGS = -O2 -s
AR = ar
only in patch2:
unchanged:
--- syslinux-2.11.orig/memdisk/Makefile
+++ syslinux-2.11/memdisk/Makefile
@@ -20,11 +20,13 @@
ALIGN := $(call gcc_ok,-falign-functions=0 -falign-jumps=0
-falign-loops=0,-malign-functions=0 -malign-jumps=0 -malign-loops=0)
CC = gcc $(M32)
-CFLAGS = -g -W -Wall -Os -fomit-frame-pointer -march=i386 $(ALIGN) \
- -DVERSION='"$(VERSION)"' -DDATE='"$(DATE)"'
+CFLAGS = -g -W -Wall -Os -fomit-frame-pointer $(ALIGN) \
+ -DVERSION='"$(VERSION)"' -DDATE='"$(DATE)"'
+CFLAGS_CROSS = -march=i386
+ASFLAGS_CROSS =
LDFLAGS = -g
INCLUDE = -I../com32/include
-LD = ld -m elf_i386
+LD = gcc
NASM = nasm -O99
NINCLUDE =
OBJCOPY = objcopy
@@ -39,7 +41,8 @@
SSRC = init.S16
NASMSRC = memdisk.asm init32.asm
-all: memdisk e820test
+#all: memdisk e820test
+all: memdisk
# tidy, clean removes everything except the final binary
tidy:
@@ -58,37 +61,44 @@
$(CC) -x assembler -c -o $@ $<
%.o16: %.s16
- $(CC) -x assembler -c -o $@ $<
+ $(AS) $(ASFLAGS_CROSS) -o $@ $<
+
+%.o: %.s
+ $(AS) $(ASFLAGS_CROSS) -o $@ $<
%.o: %.c
- $(CC) $(INCLUDE) $(CFLAGS) -c -o $@ $<
+ $(CC) $(INCLUDE) $(CFLAGS) $(CFLAGS_CROSS) -c -o $@ $<
+
+%.o: %.S
+ $(CC) $(INCLUDE) $(CFLAGS) $(CFLAGS_CROSS) -c -o $@ $<
%.s16: %.s
echo '.code16gcc' | cat - $< > $@
-%.s: %.S
- $(CC) -x c $(INCLUDE) $(CFLAGS) -traditional -E -o $@ $<
+#%.s: %.S
+# $(CC) -x c $(INCLUDE) $(CFLAGS) -traditional -E -o $@ $<
%.s16: %.S16
- $(CC) -x c $(INCLUDE) $(CFLAGS) -traditional -E -o $@ $<
+ $(CC) -x c $(INCLUDE) $(CFLAGS) $(CFLAGS_CROSS) -traditional -E -o $@
$<
%.s: %.c
- $(CC) $(INCLUDE) $(CFLAGS) -S -o $@ $<
+ $(CC) $(INCLUDE) $(CFLAGS) $(CFLAGS_CROSS) -S -o $@ $<
%.i: %.c
$(CC) $(INCLUDE) $(CFLAGS) -E -o $@ $<
# Cancel default rule
%.o: %.c
+%.o: %.S
%.bin: %.asm
$(NASM) -f bin $(NINCLUDE) -o $@ -l $*.lst $<
memdisk16.elf: $(OBJS16)
- $(LD) -Ttext 0 -o $@ $^
+ $(LD) -nostdlib $(LDFLAGS) $(CFLAGS_CROSS) -Wl,-Ttext,0 -o $@ $^
memdisk32.elf: $(OBJS32)
- $(LD) -Ttext 0x100000 -o $@ $^
+ $(LD) -nostdlib $(LDFLAGS) $(CFLAGS_CROSS) -Wl,-Ttext,0x100000 -o $@ $^
%.bin: %.elf
$(OBJCOPY) -O binary $< $@
@@ -97,10 +107,10 @@
$(PERL) postprocess.pl $@ memdisk16.bin memdisk32.bin
e820test: e820func.o msetup.o e820test.o memdisk.o
- $(CC) $(LDFLAGS) -o $@ $^
+ $(LD) -nostdlib $(LDFLAGS) $(CFLAGS_CROSS) -o $@ $^
memdisk.o: memdisk.bin
- $(LD) -r -b binary -o $@ $<
+ $(LD) -nostdlib $(LDFLAGS) $(CFLAGS_CROSS) -Wl,-r -Wl,-b,binary -o $@ $<
.depend:
rm -f .depend
only in patch2:
unchanged:
--- syslinux-2.11.orig/sample/Makefile
+++ syslinux-2.11/sample/Makefile
@@ -21,12 +21,13 @@
M32 := $(call gcc_ok,-m32,)
CC = gcc $(M32)
-LD = ld -m elf_i386
+LD = gcc
AR = ar
NASM = nasm
RANLIB = ranlib
-CFLAGS = -W -Wall -march=i386 -Os -fomit-frame-pointer -I../com32/include
-SFLAGS = -march=i386
+CFLAGS = $(CFLAGS_CROSS) -Os -fomit-frame-pointer -I../com32/include
+CFLAGS_CROSS = -march=i386
+SFLAGS = $(CFLAGS_CROSS)
LDFLAGS = -s
OBJCOPY = objcopy
PPMTOLSS16 = ../ppmtolss16
@@ -49,7 +50,7 @@
.PRECIOUS: %.elf
%.elf: c32entry.o %.o $(LIB)
- $(LD) -Ttext 0x101000 -e _start -o $@ $^
+ $(LD) -nostdlib -m32 -Wl,-Ttext,0x101000 -e _start -o $@ $^
%.c32: %.elf
$(OBJCOPY) -O binary $< $@