Received: by 2002:a25:4158:0:0:0:0:0 with SMTP id o85csp6885324yba; Tue, 14 May 2019 15:49:28 -0700 (PDT) X-Google-Smtp-Source: APXvYqyGu+RL2oFANM8AR8NcdQQTjWLTyE51WADdJKNIlCvCC8VLE1jsvcjlqbMM3yxsjZtd9jKu X-Received: by 2002:aa7:8186:: with SMTP id g6mr43852836pfi.126.1557874167871; Tue, 14 May 2019 15:49:27 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1557874167; cv=none; d=google.com; s=arc-20160816; b=oP44aAc7Ekqee6k9HXmAEayRkQ5dQSiDp6lxo5gG8S7IxKWI7XNfAuR5wboSCOiG8y 5uOtDTUzZOFJwzu+YpREGDvHbp/719T6qFewDwDVdi5yzRY1YD/5tEqGhjzM4xIksX/W OWX1SoNpC9R26MGHfZgP4BuD8f5h4LXSBlZCABKVBHfWl70EZvY3xat/IHDzf1Uy9Tit wR+FgUYBL/ugTma5TvC4HNs0vQs0q4orPnnLBX5TJMjJ2w75AUMgZlBg260WHHmxrLts 8sonVMqOlBJZyO8+kCTdQBXk42MX/yhcX0CXd0dmrkvbZXOOJLLiIY7yr+Mztz8yuBNz MocQ== 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; bh=SB/GaKUPZ9drIILKtfO141NqoI9UYS/XADh4R9X0GN8=; b=vVaaCGuYUfpj+VaxBmxD8Y3hvRbqVarXydpjU6HW7P3c3yMQzoyVOO0rdKxcJ8okwF AN6uMBFlxZx/xHaUpVxj3XBxmslUV7rpeRnBahiPLZkX7RNuf+xATEQFqy1BbKYZxmqF hx8qpnWdenvrYuBJC3pg2jdwzkpshjz2i61wn0Yrgh6pA/AAimkXIWHoDAY2S/IwvJRD Taq/OOJX1NlE2vI6iGXO3ewFMpjkrl21eOyjlAjCMp3KI5WnxXQd1Ua8AWacOtr6S8PA 4tpwIr7Q3fVHYXGNx72BSLehV3+ZoIXVTi9tWqagSm/dzHAZSxweaI0vHb4UkL55xj96 rBZg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@google.com header.s=20161025 header.b=rbhoLPTD; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id cd5si97568plb.207.2019.05.14.15.49.11; Tue, 14 May 2019 15:49:27 -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=@google.com header.s=20161025 header.b=rbhoLPTD; 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; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=google.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726290AbfENWqy (ORCPT + 99 others); Tue, 14 May 2019 18:46:54 -0400 Received: from mail-pg1-f195.google.com ([209.85.215.195]:38269 "EHLO mail-pg1-f195.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726180AbfENWqx (ORCPT ); Tue, 14 May 2019 18:46:53 -0400 Received: by mail-pg1-f195.google.com with SMTP id j26so287675pgl.5 for ; Tue, 14 May 2019 15:46:53 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=SB/GaKUPZ9drIILKtfO141NqoI9UYS/XADh4R9X0GN8=; b=rbhoLPTDosnfXVYvhUia77mlOfX6WMwhmLfj6XzcWyIJTjPmzHi/avLOHKstrb0dtF ckwrB2CelU+kS5urLSixvlsHBZfsygzddMrSvq+bpW3Z9rJXly92YepoIrt0acZGGGPc hL4qxLvVlXzu08OsDwz3b1WDgm+ZvWxcy06DE+I+xSyzrXdwY675mP8sCr4UZFap1Oo9 /xK9pN1p6ZLGc1jUjnINb4CyXkHLoi9vC5viVuYqndygFUUscdfF0a75aJVm0Q2qXxvR pl8wFdcfK66G/BlMq8KMFNZ/U/6RT0JZyhgyKfVtlLS50B46MZdvyYONHZQujdgPBOsN RJmg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=SB/GaKUPZ9drIILKtfO141NqoI9UYS/XADh4R9X0GN8=; b=D+g0ex1lCXwXEBZMQZtEH6x/O3SZRDgtKU6qPzqFpfJEWHrzKK8VzjSBAoM4Cs2FF/ IHT6ZctmSFLdGZVRv+ynKuFR+diL9tlt5BKhqb53PxsVkmPbO4QMCV5z0umfDYGXseNb JOYu2D76Kpvp4vGxhwUqUz++GErWIGbdP4lJopBdOb3C99s0UQybtwAoAKE1/IXW/n4n u6ZJdD5jHJcctjhJzUSJ8BmO1Pz95r2W4+AbNhdLv2/W1dXyq6UnJObdxLSThXuiBodL Cj/vhugyWXE93HI6RVAdBqKLf1njInVBV4Lh+z8DyTO9X29CPhGUgHPBVB2iDTS+k80g ag1A== X-Gm-Message-State: APjAAAVZYqqlYRikPFbLMGEZFEmmkHbNoWjdXWm4EpV8273KqRgInSmf aqrFD2tGWvWZbCeH2Pk5Ecr0Vtr3N1RRJMRst609Eg== X-Received: by 2002:a63:441c:: with SMTP id r28mr40571374pga.255.1557874012465; Tue, 14 May 2019 15:46:52 -0700 (PDT) MIME-Version: 1.0 References: <20190514224047.28505-1-natechancellor@gmail.com> In-Reply-To: <20190514224047.28505-1-natechancellor@gmail.com> From: Nick Desaulniers Date: Tue, 14 May 2019 15:46:40 -0700 Message-ID: Subject: Re: [PATCH] objtool: Allow AR to be overridden with HOSTAR To: Nathan Chancellor Cc: Josh Poimboeuf , Peter Zijlstra , clang-built-linux , LKML , Masahiro Yamada , Linux Kbuild mailing list 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 .On Tue, May 14, 2019 at 3:41 PM Nathan Chancellor wrote: > > Currently, this Makefile hardcodes GNU ar, meaning that if it is not > available, there is no way to supply a different one and the build will > fail. > > $ make AR=llvm-ar CC=clang LD=ld.lld HOSTAR=llvm-ar HOSTCC=clang \ > HOSTLD=ld.lld HOSTLDFLAGS=-fuse-ld=lld defconfig modules_prepare > ... > AR /out/tools/objtool/libsubcmd.a > /bin/sh: 1: ar: not found > ... > > Follow the logic of HOST{CC,LD} and allow the user to specify a > different ar tool via HOSTAR (which is used elsewhere in other > tools/ Makefiles). > > Link: https://github.com/ClangBuiltLinux/linux/issues/481 > Signed-off-by: Nathan Chancellor > --- > tools/objtool/Makefile | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > diff --git a/tools/objtool/Makefile b/tools/objtool/Makefile > index 53f8be0f4a1f..88158239622b 100644 > --- a/tools/objtool/Makefile > +++ b/tools/objtool/Makefile > @@ -7,11 +7,12 @@ ARCH := x86 > endif > > # always use the host compiler > +HOSTAR ?= ar > HOSTCC ?= gcc > HOSTLD ?= ld > +AR = $(HOSTAR) > CC = $(HOSTCC) > LD = $(HOSTLD) > -AR = ar + Kbuild Seems to match what's going on in tools/perf/Makefile.perf and tools/build/Makefile. Thanks for the patch! Reviewed-by: Nick Desaulniers -- Thanks, ~Nick Desaulniers