From patchwork Sat Sep 30 23:35:20 2017 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Carlos Santos X-Patchwork-Id: 820225 X-Patchwork-Delegate: thomas.petazzoni@free-electrons.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (mailfrom) smtp.mailfrom=busybox.net (client-ip=140.211.166.137; helo=fraxinus.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 3y4Ptk2yMSz9t2f for ; Sun, 1 Oct 2017 10:35:42 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 5FE3886C78; Sat, 30 Sep 2017 23:35:38 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 4yZjRJfIAFf6; Sat, 30 Sep 2017 23:35:36 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by fraxinus.osuosl.org (Postfix) with ESMTP id 8B405869FF; Sat, 30 Sep 2017 23:35:36 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id 3A9BB1BF8A8 for ; Sat, 30 Sep 2017 23:35:35 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 32D642D193 for ; Sat, 30 Sep 2017 23:35:35 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 7ePKsSX0eYk7 for ; Sat, 30 Sep 2017 23:35:34 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail.datacom.ind.br (mx.datacom.ind.br [177.66.5.10]) by silver.osuosl.org (Postfix) with ESMTPS id 49AEE2CED4 for ; Sat, 30 Sep 2017 23:35:34 +0000 (UTC) Received: from mail.datacom.ind.br (localhost [127.0.0.1]) by mail.datacom.ind.br (Postfix) with ESMTPS id 2DCE515A66A9; Sat, 30 Sep 2017 20:35:01 -0300 (BRT) Received: from localhost (localhost [127.0.0.1]) by mail.datacom.ind.br (Postfix) with ESMTP id 1DF8215A66A1; Sat, 30 Sep 2017 20:35:01 -0300 (BRT) Received: from mail.datacom.ind.br ([127.0.0.1]) by localhost (mail.datacom.ind.br [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id wiyRuMgVk8Ku; Sat, 30 Sep 2017 20:35:01 -0300 (BRT) Received: from p7-1130br.casantos.org (177.204.8.146.dynamic.adsl.gvt.net.br [177.204.8.146]) by mail.datacom.ind.br (Postfix) with ESMTPSA id B925615A6686; Sat, 30 Sep 2017 20:35:00 -0300 (BRT) From: Carlos Santos To: buildroot@buildroot.org Date: Sat, 30 Sep 2017 20:35:20 -0300 Message-Id: <20170930233520.20143-1-casantos@datacom.ind.br> X-Mailer: git-send-email 2.13.5 In-Reply-To: <20170930231309.17677-1-casantos@datacom.ind.br> References: <20170930231309.17677-1-casantos@datacom.ind.br> Cc: =?utf-8?q?Beno=C3=AEt_Allard?= Subject: [Buildroot] [PATCH v2] syslinux: Use the host compiler to build extlinux X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Like the utilities, it is meant to run on the host machine, hence must be built using the host toolchain. Signed-off-by: Carlos Santos --- Changes v1->v2 - Patch for syslinux version 6.03 (the previous one was for the master branch (syslinux-6.04-pre1). --- Tested with the following defconfig: BR2_x86_64=y BR2_x86_atom=y BR2_DL_DIR="$(HOME)/src" BR2_TOOLCHAIN_EXTERNAL=y BR2_TOOLCHAIN_EXTERNAL_DOWNLOAD=y BR2_TOOLCHAIN_EXTERNAL_URL="http://autobuild.buildroot.org/toolchains/tarballs/br-x86-64-core2-full-2017.05-1078-g95b1dae.tar.bz2" BR2_TOOLCHAIN_EXTERNAL_GCC_6=y BR2_TOOLCHAIN_EXTERNAL_HEADERS_4_4=y BR2_TOOLCHAIN_EXTERNAL_LOCALE=y BR2_TOOLCHAIN_EXTERNAL_CXX=y BR2_TARGET_GENERIC_ROOT_PASSWD="root" BR2_TARGET_GENERIC_GETTY_PORT="ttyS1" BR2_ENABLE_LOCALE_WHITELIST="" BR2_ROOTFS_OVERLAY="board/technologic/ts5x00/fs-overlay" BR2_LINUX_KERNEL=y BR2_LINUX_KERNEL_USE_CUSTOM_CONFIG=y BR2_LINUX_KERNEL_CUSTOM_CONFIG_FILE="board/pc/linux.config" BR2_LINUX_KERNEL_INSTALL_TARGET=y BR2_TARGET_ROOTFS_EXT2=y BR2_TARGET_ROOTFS_EXT2_4=y BR2_TARGET_SYSLINUX=y BR2_TARGET_SYSLINUX_MBR=y BR2_TARGET_SYSLINUX_EFI=y Notice that I did not actualy use a ts5x00 board, just used its defconfig as a base to create my configuration. --- ...-extlinux-Use-the-host-toolchain-to-build.patch | 53 ++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 boot/syslinux/0011-extlinux-Use-the-host-toolchain-to-build.patch diff --git a/boot/syslinux/0011-extlinux-Use-the-host-toolchain-to-build.patch b/boot/syslinux/0011-extlinux-Use-the-host-toolchain-to-build.patch new file mode 100644 index 0000000000..62675cf6cc --- /dev/null +++ b/boot/syslinux/0011-extlinux-Use-the-host-toolchain-to-build.patch @@ -0,0 +1,53 @@ +From 4df2e7c0ae84bfbdba0ed285c0664aa089b38b7e Mon Sep 17 00:00:00 2001 +From: Carlos Santos +Date: Sat, 30 Sep 2017 19:49:55 -0300 +Subject: [PATCH] extlinux: Use the host toolchain to build. + +It is meant to run on the host machine, hence must be built using the +host toolchain. + +Signed-off-by: Carlos Santos +--- + extlinux/Makefile | 12 ++++++------ + 1 file changed, 6 insertions(+), 6 deletions(-) + +diff --git a/extlinux/Makefile b/extlinux/Makefile +index 02d1db51..5c4baa5a 100644 +--- a/extlinux/Makefile ++++ b/extlinux/Makefile +@@ -18,9 +18,9 @@ include $(MAKEDIR)/syslinux.mk + + OPTFLAGS = -g -Os + INCLUDES = -I$(SRC) -I$(objdir) -I$(SRC)/../libinstaller +-CFLAGS = $(GCCWARN) -Wno-sign-compare -D_FILE_OFFSET_BITS=64 \ ++CFLAGS = $(CFLAGS_FOR_BUILD) $(GCCWARN) -Wno-sign-compare -D_FILE_OFFSET_BITS=64 \ + $(OPTFLAGS) $(INCLUDES) +-LDFLAGS = ++LDFLAGS = $(LDFLAGS_FOR_BUILD) + + SRCS = main.c \ + mountinfo.c \ +@@ -52,16 +52,16 @@ spotless: clean + installer: extlinux + + extlinux: $(OBJS) +- $(CC) $(LDFLAGS) -o $@ $^ ++ $(CC_FOR_BUILD) $(LDFLAGS) -o $@ $^ + + strip: + $(STRIP) extlinux + + %.o: %.c +- $(CC) $(UMAKEDEPS) $(CFLAGS) -c -o $@ $< ++ $(CC_FOR_BUILD) $(UMAKEDEPS) $(CFLAGS) -c -o $@ $< + %.i: %.c +- $(CC) $(UMAKEDEPS) $(CFLAGS) -E -o $@ $< ++ $(CC_FOR_BUILD) $(UMAKEDEPS) $(CFLAGS) -E -o $@ $< + %.s: %.c +- $(CC) $(UMAKEDEPS) $(CFLAGS) -S -o $@ $< ++ $(CC_FOR_BUILD) $(UMAKEDEPS) $(CFLAGS) -S -o $@ $< + + -include .*.d +-- +2.13.5 +