Received: by 2002:a25:86ce:0:0:0:0:0 with SMTP id y14csp2188730ybm; Thu, 23 May 2019 12:49:57 -0700 (PDT) X-Google-Smtp-Source: APXvYqwblWgikoXmATa2GigbOhbVz6lqDoI/HRiAI58Ews3RXrY92jP6P0Qalk7FGyq49BcW9Nob X-Received: by 2002:a17:902:8bc1:: with SMTP id r1mr34283681plo.163.1558640997367; Thu, 23 May 2019 12:49:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1558640997; cv=none; d=google.com; s=arc-20160816; b=bCw7RkXEfDFchSCKFUAEs3+T493buNolRhRacFZzOYHxPk4+QCfV7Q71PrPl1eZHJ+ WbqIr977FyUUEOCbY2cYFTng8axYcaMOQ5J7Fp07GK09ZlURNO6CAkP09w7azV9w4cI6 217UkOzCqgqW1bvs7EScXPiptlQ05EwoNbi0qcKcEPCS+dj+uH90keLLNI1LdrijzaoM sa93OeU0koulmg863HR2Q0+VyWfXWis7oa1fpr+WqL0aLvzRrDQnNdQc824NwOU1XxDx aDBozR5CBJ0de5H7QX72vZEUFBNVMhL/XKVqLi+WSGGZubRtJkIcE/zGPCMW1FUSI7t4 2xcg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=k+amnkliDBv40esGbwTnIMZbl9nTENgC3UGj7Q8rieE=; b=kA3tsVxB//0yulToCW/18SUuC5xMiCY3feRfYv7ClEyTezfq7OEa/l3oD+g682O38n k1pqwvTDC3xsAUZIKZkAsN/lo8rt7xbtjPNnaS3a8dbSeC9Y7EDrwS5P8MMxTrQuMamB UtFgfp/IRLh5OO+2sD3phrXE/GuuybNmSIJ3wIJ+n9D8wNdE3Y83qLHaHeWADG+qWg4/ PWzHYLae3S2YOPKSDo14dJuBddno//cnb5j89zpSJSqTAn9DYRenJNRFUc301hg7tu2w WAt1+V8VnQg9HiTDLmY3SyJpd+M3aa9fCIjjlBJdI7MV6AJU/v2uQWLsbT6u5XrJXAsO xHYQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="Luc5/lgA"; 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 t34si675935pgm.396.2019.05.23.12.49.42; Thu, 23 May 2019 12:49:57 -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=@kernel.org header.s=default header.b="Luc5/lgA"; 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 S1731819AbfEWTMv (ORCPT + 99 others); Thu, 23 May 2019 15:12:51 -0400 Received: from mail.kernel.org ([198.145.29.99]:46588 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S2387523AbfEWTMr (ORCPT ); Thu, 23 May 2019 15:12:47 -0400 Received: from localhost (83-86-89-107.cable.dynamic.v4.ziggo.nl [83.86.89.107]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 8070021851; Thu, 23 May 2019 19:12:46 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1558638767; bh=GoC1OIA003h0+CxziUkA4dOZlYYlol8sXKPimKJOX4g=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=Luc5/lgAv4wu9yIEf+xiP0ubXBqQ9uyshT7QlOGblR5teunpe7E9aLqTnyfEXqQSJ nlFeyZCo2OU8JD4yCCT4cji29Phx5ulHUinMDoW5Y5o3Te0nXqkE86p/NlbihrdWl3 PyT8slkYtgkX0MLVLnRaRBIQjew6KnKtAPwgWAaI= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Nathan Chancellor , Josh Poimboeuf , Nick Desaulniers , Mukesh Ojha , Linus Torvalds , Peter Zijlstra , Thomas Gleixner , Ingo Molnar Subject: [PATCH 4.14 40/77] objtool: Allow AR to be overridden with HOSTAR Date: Thu, 23 May 2019 21:05:58 +0200 Message-Id: <20190523181725.707540328@linuxfoundation.org> X-Mailer: git-send-email 2.21.0 In-Reply-To: <20190523181719.982121681@linuxfoundation.org> References: <20190523181719.982121681@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Nathan Chancellor commit 8ea58f1e8b11cca3087b294779bf5959bf89cc10 upstream. 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). Signed-off-by: Nathan Chancellor Signed-off-by: Josh Poimboeuf Reviewed-by: Nick Desaulniers Reviewed-by: Mukesh Ojha Cc: Cc: Linus Torvalds Cc: Peter Zijlstra Cc: Thomas Gleixner Link: http://lkml.kernel.org/r/80822a9353926c38fd7a152991c6292491a9d0e8.1558028966.git.jpoimboe@redhat.com Link: https://github.com/ClangBuiltLinux/linux/issues/481 Signed-off-by: Ingo Molnar Signed-off-by: Greg Kroah-Hartman --- tools/objtool/Makefile | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) --- 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 ifeq ($(srctree),) srctree := $(patsubst %/,%,$(dir $(CURDIR)))