Received: by 2002:a25:ab43:0:0:0:0:0 with SMTP id u61csp3863623ybi; Mon, 3 Jun 2019 01:21:19 -0700 (PDT) X-Google-Smtp-Source: APXvYqydyp+4/OgnuKM6yVU2rW6h7TsnOTcFXynHUePkbiTAdr5/7dJO45WYTOEJxl0gqd9uGbZi X-Received: by 2002:a62:87ca:: with SMTP id i193mr2846162pfe.42.1559550079595; Mon, 03 Jun 2019 01:21:19 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1559550079; cv=none; d=google.com; s=arc-20160816; b=xSOsS+uiv72HRIAGXQopvl+hEZhNQkcqMlFHMeWjlw6kYFUQ6uyWBO5Cy3I1N5gNLO tVWAoxkyVFDq5RaqfsarSukkloq8CQUPQoAQfzL1djcC6IGFcoUSonrJqx11xhX2FwrZ Ql935Bw+GEgcGVwxgprw9Fvh2BKzHymB301hCkBnvqOphpmWSw81javUGq6W/kgE2OSH /06ScSRJsRRMqn2UH7GsjAJGuhIkVdkPijIV/9kE2TeE37th+n15pGvftKRUhTC+9MZy vPhFeIxc+uwcZ1srOkK/b4qYoJyLJHGA+/zji6rShjCM/onvwadl/YHdSNq4oBy6opm8 lq0A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:cc:to:subject:message-id:date:from :in-reply-to:references:mime-version:dkim-signature:dkim-filter; bh=HPTf6oudyVJie6W4n2JC8Ehi4mmYu1RfWzsjHZSF1Nw=; b=KVVg7nWHhSzITDZsRR2A90kc5ZJge8gxNh4YweNQQl+8aSYwiK/0jsKjqzef3AJLo5 B28h/hAiMlf0s9Tlf8zG1XU6mIXvKHijnTWGPzabmoHPUv50QINDow2xb0bgO2apeX7f 5jVf6bXMA/z0Q/y6pZ74JyvXYBtDNG9mMGCoashkKgvtzW1pIwk+qU6BHgPR6s+7k37r uhqZWEw94J4clyCDA9fu13PeWwzLp/sIrTJfj6kkHuURGmhuZlCPOGW+ECPXDWGKrIZX UP/XloyqKOlLbuFahBdO1v4L329+K0CnaeGQpP4L6SqeCtp1bFcuZYEy20Gv05B20Rm9 MyAg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=pnNjf5KD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id t5si17419397pgj.258.2019.06.03.01.21.03; Mon, 03 Jun 2019 01:21:19 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@nifty.com header.s=dec2015msa header.b=pnNjf5KD; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727679AbfFCITA (ORCPT + 99 others); Mon, 3 Jun 2019 04:19:00 -0400 Received: from conssluserg-02.nifty.com ([210.131.2.81]:19448 "EHLO conssluserg-02.nifty.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727613AbfFCITA (ORCPT ); Mon, 3 Jun 2019 04:19:00 -0400 Received: from mail-vs1-f54.google.com (mail-vs1-f54.google.com [209.85.217.54]) (authenticated) by conssluserg-02.nifty.com with ESMTP id x538IkUm010888 for ; Mon, 3 Jun 2019 17:18:47 +0900 DKIM-Filter: OpenDKIM Filter v2.10.3 conssluserg-02.nifty.com x538IkUm010888 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nifty.com; s=dec2015msa; t=1559549927; bh=HPTf6oudyVJie6W4n2JC8Ehi4mmYu1RfWzsjHZSF1Nw=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=pnNjf5KDT12l3ZioAUZ2TX56pm+GhyLm4r8TZ3ePCtvILwrK8w+ySNRu8F6sPQJhx 5C9+YCVvfWUx3Z+P5eOIkQ9K+jStkglBiZk3YC1O68GOMxYIW21WXcR4Q0w9lvUW/6 khsrFQpTMPb4rQsuRz+7gD2HENRD6bBPAhI1/ehQp7VvbrBsJK4uL8eqEVa07aNjRC 6Ad9ia/h5eJNlnYOnVzHT4Nv+z4vXCOB78T4OqMVAhtdW14ebAlxIeFQf+8U1T4MgM C4sL184nxD97LwZgiFUKokfRRz4hQMkvrr1cxu/8gh4Temfy4lDZU2Az9YrsDJNENc 2D0BXRdYG7qgg== X-Nifty-SrcIP: [209.85.217.54] Received: by mail-vs1-f54.google.com with SMTP id m8so1604441vsj.0 for ; Mon, 03 Jun 2019 01:18:47 -0700 (PDT) X-Gm-Message-State: APjAAAWq48oXOQwCI7miAC2X15VZYD8i95OHjAHIESWlSJWa/Ah4jlrF uhgoqFxCtuiCCuQGbkN9OcF7ZIQ137enkqjQSnA= X-Received: by 2002:a67:b109:: with SMTP id w9mr1144657vsl.155.1559549926179; Mon, 03 Jun 2019 01:18:46 -0700 (PDT) MIME-Version: 1.0 References: <20190603063119.36544-1-abrodkin@synopsys.com> In-Reply-To: <20190603063119.36544-1-abrodkin@synopsys.com> From: Masahiro Yamada Date: Mon, 3 Jun 2019 17:18:10 +0900 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [PATCH] ARC: build: Try to guess CROSS_COMPILE with cc-cross-prefix To: Alexey Brodkin Cc: arcml , Linux Kernel Mailing List , Vineet Gupta Content-Type: text/plain; charset="UTF-8" Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Alexey, On Mon, Jun 3, 2019 at 3:42 PM Alexey Brodkin wrote: > > For a long time we used to hard-code CROSS_COMPILE prefix > for ARC until it started to cause problems, so we decided to > solely rely on CROSS_COMPILE externally set by a user: > commit 40660f1fcee8 ("ARC: build: Don't set CROSS_COMPILE in arch's Makefile"). > > While it works perfectly fine for build-systems where the prefix > gets defined anyways for us human beings it's quite an annoying > requirement especially given most of time the same one prefix > "arc-linux-" is all what we need. > > It looks like finally we're getting the best of both worlds: > 1. W/o cross-toolchain we still may install headers, build .dtb etc > 2. W/ cross-toolchain get the kerne built with only ARCH=arc > > Inspired by [1] & [2]. > > [1] http://lists.infradead.org/pipermail/linux-snps-arc/2019-May/005788.html > [2] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/commit/?id=fc2b47b55f17 > > A side note: even though "cc-cross-prefix" does its job it pollutes > console with output of "which" for all the prefixes it didn't manage to find > a matching cross-compiler for like that: > | # ARCH=arc make defconfig > | which: no arceb-linux-gcc in (~/.local/bin:~/bin:/usr/bin:/usr/sbin) > | *** Default configuration is based on 'nsim_hs_defconfig' Oh really? masahiro@pug:~$ which arc-linux-gcc /home/masahiro/tools/arc/bin/arc-linux-gcc masahiro@pug:~$ which dummy-linux-gcc masahiro@pug:~$ echo $? 1 When 'which' cannot find the given command, it does not print anything to stderr. Does it work differently on your machine? -- Best Regards Masahiro Yamada