6e432d5ecb
Until now, the host toolchain was used to build syslinux, as it was not possible to build a 32-bit syslinux with a x86-64 toolchain. However, syslinux requires gnu-efi, and gnu-efi is built using the target toolchain. Mixing different toolchains doesn't work well, so this commit changes the syslinux package to use the target toolchain for syslinux as well. This is made possible by patches 0003-Fix-ldlinux.elf-Not-enough-room-for-program-headers-.patch and 0004-memdisk-Force-ld-output-format-to-32-bits.patch. Since syslinux also contains some utilities that have to run on the host, those have to continue being built with the host toolchain, which requires patch 0005-utils-Use-the-host-toolchain-to-build.patch. Patch 0006-lzo-Use-the-host-toolchain-for-prepcore.patch is about building prepcore, another utility with the host toolchain as it is required at build-time. This was tested using a Buildroot's built x86_64 toolchain, and checked that the output binaries are 32-bits. It was tested as well if they actually boot on hardware. Signed-off-by: Benoît Allard <benoit.allard@greenbone.net> Signed-off-by: Thomas Petazzoni <thomas.petazzoni@free-electrons.com>
45 lines
1.2 KiB
Diff
45 lines
1.2 KiB
Diff
From 83e1f00990c25554723609bb549e18b987034317 Mon Sep 17 00:00:00 2001
|
|
From: =?UTF-8?q?Beno=C3=AEt=20Allard?= <benoit.allard@greenbone.net>
|
|
Date: Thu, 6 Apr 2017 09:43:46 +0200
|
|
Subject: [PATCH] lzo: Use the host toolchain for prepcore
|
|
MIME-Version: 1.0
|
|
Content-Type: text/plain; charset=UTF-8
|
|
Content-Transfer-Encoding: 8bit
|
|
|
|
Signed-off-by: Benoît Allard <benoit.allard@greenbone.net>
|
|
---
|
|
lzo/Makefile | 7 +++++--
|
|
1 file changed, 5 insertions(+), 2 deletions(-)
|
|
|
|
diff --git a/lzo/Makefile b/lzo/Makefile
|
|
index 29f1fa6..c016e5a 100644
|
|
--- a/lzo/Makefile
|
|
+++ b/lzo/Makefile
|
|
@@ -11,10 +11,13 @@
|
|
## -----------------------------------------------------------------------
|
|
|
|
VPATH = $(SRC)
|
|
-include $(MAKEDIR)/build.mk
|
|
+include $(MAKEDIR)/syslinux.mk
|
|
|
|
INCLUDES += -I$(SRC)/include
|
|
|
|
+%.o: %.c
|
|
+ $(CC_FOR_BUILD) $(UMAKEDEPS) $(CFLAGS_FOR_BUILD) $(INCLUDES) -c -o $@ $<
|
|
+
|
|
LIBOBJS = $(patsubst %.c,%.o,$(subst $(SRC)/,,$(wildcard $(SRC)/src/*.c)))
|
|
LIB = lzo.a
|
|
BINS = prepcore
|
|
@@ -30,7 +33,7 @@ $(LIB) : $(LIBOBJS)
|
|
$(RANLIB) $@
|
|
|
|
prepcore : prepcore.o $(LIB)
|
|
- $(CC) $(LDFLAGS) -o $@ $^ $(LIBS)
|
|
+ $(CC_FOR_BUILD) $(LDFLAGS_FOR_BUILD) -o $@ $^ $(LIBS)
|
|
|
|
tidy dist clean spotless:
|
|
rm -f $(BINS)
|
|
--
|
|
2.1.4
|
|
|