From patchwork Fri Mar 7 01:32:53 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Noam Camus X-Patchwork-Id: 327701 Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from hemlock.osuosl.org (hemlock.osuosl.org [140.211.166.133]) by ozlabs.org (Postfix) with ESMTP id 7F47D2C032B for ; Fri, 7 Mar 2014 12:33:29 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by hemlock.osuosl.org (Postfix) with ESMTP id EF18994730; Fri, 7 Mar 2014 01:33:27 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from hemlock.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id 3uKsc0W2ssor; Fri, 7 Mar 2014 01:33:26 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by hemlock.osuosl.org (Postfix) with ESMTP id 5270C94516; Fri, 7 Mar 2014 01:33:26 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from whitealder.osuosl.org (whitealder.osuosl.org [140.211.166.138]) by ash.osuosl.org (Postfix) with ESMTP id 29A8D1C22F3 for ; Fri, 7 Mar 2014 01:33:25 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by whitealder.osuosl.org (Postfix) with ESMTP id 2393F90F85 for ; Fri, 7 Mar 2014 01:33:25 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from whitealder.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id JBSzGR4nIEPN for ; Fri, 7 Mar 2014 01:33:24 +0000 (UTC) X-Greylist: from auto-whitelisted by SQLgrey-1.7.6 Received: from ezchip.com (ezexch.ezchip.com [212.179.42.101]) by whitealder.osuosl.org (Postfix) with ESMTPS id A35EA90F52 for ; Fri, 7 Mar 2014 01:33:23 +0000 (UTC) Received: from Internal Mail-Server by ezexch (envelope-from noamc@ezchip.com) with AES128-SHA encrypted SMTP; 7 Mar 2014 03:19:32 +0200 Received: from EZEX10.ezchip.com ([fe80::c9dc:a42d:e7f:44f5]) by ezex10.ezchip.com ([fe80::c9dc:a42d:e7f:44f5%11]) with mapi id 14.03.0174.001; Fri, 7 Mar 2014 03:32:54 +0200 From: Noam Camus To: "buildroot@busybox.net" Thread-Topic: [PATCH 1/1] [V5] toolchain: control vendor part in GNU_TARGET_NAME Thread-Index: AQHPOaTUZ2/LHIHAAkS/j7eFHrIws5rU1ovu Date: Fri, 7 Mar 2014 01:32:53 +0000 Message-ID: <884EA965490E3C4D8E66AEF41E980250096818@ezex10.ezchip.com> References: <1394155829-13670-1-git-send-email-noamc@ezchip.com> In-Reply-To: <1394155829-13670-1-git-send-email-noamc@ezchip.com> Accept-Language: en-US, he-IL Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-originating-ip: [10.1.3.132] x-tm-as-product-ver: SMEX-11.0.0.1191-7.500.1017-20550.003 x-tm-as-result: No--37.374300-8.000000-31 x-tm-as-user-approved-sender: No x-tm-as-user-blocked-sender: No MIME-Version: 1.0 Subject: [Buildroot] [PATCH 1/1] [V5] toolchain: control vendor part in GNU_TARGET_NAME X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.14 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: buildroot-bounces@busybox.net Sender: buildroot-bounces@busybox.net This option allows to customize the "vendor" part of the toolchain tuple, where the toolchain tuple has the form ---. Use this option in situations where gcc might make different decisions based on the vendor part of the tuple. Signed-off-by: Noam Camus --- package/Makefile.in | 17 ++++++++++++++++- toolchain/toolchain-buildroot/Config.in | 16 ++++++++++++++++ 2 files changed, 32 insertions(+), 1 deletions(-) -- 1.7.1 diff --git a/package/Makefile.in b/package/Makefile.in index 454f614..bd9f18c 100644 --- a/package/Makefile.in +++ b/package/Makefile.in @@ -20,8 +20,23 @@ endif MAKE1:=$(HOSTMAKE) -j1 MAKE:=$(HOSTMAKE) $(if $(PARALLEL_JOBS),-j$(PARALLEL_JOBS)) +ifeq ($(BR2_TOOLCHAIN_BUILDROOT),y) +TARGET_VENDOR = $(call qstrip,$(BR2_TOOLCHAIN_BUILDROOT_VENDOR)) +else +TARGET_VENDOR = buildroot +endif + +# Sanity checks +ifeq ($(TARGET_VENDOR),) +$(error BR2_TOOLCHAIN_BUILDROOT_VENDOR is not allowed to be empty) +endif +ifeq ($(TARGET_VENDOR),unknown) +$(error BR2_TOOLCHAIN_BUILDROOT_VENDOR cannot be 'unknown'. \ + It might be confused with the native toolchain) +endif + # Compute GNU_TARGET_NAME -GNU_TARGET_NAME=$(ARCH)-buildroot-$(TARGET_OS)-$(LIBC)$(ABI) +GNU_TARGET_NAME=$(ARCH)-$(TARGET_VENDOR)-$(TARGET_OS)-$(LIBC)$(ABI) # Blackfin FLAT needs uclinux ifeq ($(BR2_bfin)$(BR2_BINFMT_FLAT),yy) diff --git a/toolchain/toolchain-buildroot/Config.in b/toolchain/toolchain-buildroot/Config.in index 07db50b..3487327 100644 --- a/toolchain/toolchain-buildroot/Config.in +++ b/toolchain/toolchain-buildroot/Config.in @@ -70,6 +70,22 @@ config BR2_TOOLCHAIN_BUILDROOT_LIBC default "glibc" if BR2_TOOLCHAIN_BUILDROOT_EGLIBC default "glibc" if BR2_TOOLCHAIN_BUILDROOT_GLIBC +config BR2_TOOLCHAIN_BUILDROOT_VENDOR + string "custom toolchain vendor name" + default "buildroot" + help + This option allows to customize the "vendor" part of the + toolchain tuple, where the toolchain tuple has the form + ---. The default value, "buildroot", + is fine for most cases, except in very specific situations + where gcc might make different decisions based on the vendor + part of the tuple. The value "unknown" is not allowed, as the + cross-compiling toolchain might then be confused with the + native toolchain when the target and host architecture are + identical. + + If you're not sure, just leave the default "buildroot" value. + source "package/uclibc/Config.in" source "package/glibc/Config.in" source "package/binutils/Config.in.host"