Received: by 2002:a05:6a10:22f:0:0:0:0 with SMTP id 15csp1083068pxk; Fri, 25 Sep 2020 05:56:56 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyOq33USSoEp4j+99s/4muE850C41Cbu982S/xfKHQNilbBlI9e82ZtLBBJUgBW3/f2iDOr X-Received: by 2002:a17:906:4c51:: with SMTP id d17mr2562959ejw.28.1601038616446; Fri, 25 Sep 2020 05:56:56 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1601038616; cv=none; d=google.com; s=arc-20160816; b=H3pLvBYWb81NEFFA7SSH5CUiyjKL3pl7MqIEo1TaC9mQZzn4LT3JeAoZQf6JCVPoxV OwKHiA4b6a8dwC913cfBfmIZbiA2tRe20WfFpW+v3I4lT/cv/IwdPI7C/F6yC/HfbOhL JD12fsRtEsQDWdnvcC3Gei/uZ93AE2TKNgGeZm5rn3UzsGuTmYwc5VM9H1xZR0E7d68m BrZIe6cxl8OGBWcY0bIMh01MRmwwqE6BeiYDJu1khl4/B1+XXHoac5Z7ohV3O3+VlgY7 PL9DMkzC42FG+Vlp1Xa76vgR4d9p01Lzw4Z0+U7OdgkRBq2okfrleIFwL5JEO5EE+S1U bB2Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:message-id:date:subject:cc:to :from:dkim-signature; bh=WplVVPpbIlMbzEOJBf0PYYOYZgz6H2gP3Dxi6vMIiSU=; b=Tu20I43EbiEem09pxzJgLZnpqXjA+HxFexKNdT46OOv3muyiPI0yhrGGcqDi/kbNJZ vDsrlWgXHSpYkG3o20tP6Bn966Z9TB0kNM7WBV2bvRY3JY8pGhlreVlsnQsh4cC8Qxmk YqSa4kR5mF/to6R/1sTVzuMv6cOA1AQPHqKk8yUwerya3d3HAVhHxHAzE88C59QJyqE5 OqYtBNDlcG4cu9UdHW0Jd9DdRF+75jRGDCrh+fOJeJnkPMGoceO/lyBFIP1Y8y40Me/V m1y7x4qi5CaSv+K0v3iQcpe9WJOQn4/J+YguqpTM6N+0498R23KThLZXg1PX5XpRp8fu nziA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=xNzkJFPS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id b19si1777697edw.155.2020.09.25.05.56.33; Fri, 25 Sep 2020 05:56:56 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=xNzkJFPS; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=linuxfoundation.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729200AbgIYMyh (ORCPT + 99 others); Fri, 25 Sep 2020 08:54:37 -0400 Received: from mail.kernel.org ([198.145.29.99]:33194 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1729193AbgIYMyd (ORCPT ); Fri, 25 Sep 2020 08:54:33 -0400 Received: from localhost (83-86-74-64.cable.dynamic.v4.ziggo.nl [83.86.74.64]) (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 F34B221741; Fri, 25 Sep 2020 12:54:31 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1601038472; bh=U3GYSQG903DEutQhFu1KXFAMg8Yr6ryWP+xTFhHoWSQ=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=xNzkJFPSAEKJGR/Wm61rNzwqj89aBHv9As30OoiXKgSDbW7I1ebgox2NZLxT2a7Z2 uBr/073a+KkN60m7UQD6IbfzGYewWxXhSr8L9CuP2jNzB+KWHDLsLhDGWbE22b6qDj Bms9oDEEBiNFOfLl3R0TqMa1MR/AIIUgGawjdhbs= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Dmitry Golovin , Nick Desaulniers , Masahiro Yamada Subject: [PATCH 4.19 30/37] x86/boot: kbuild: allow readelf executable to be specified Date: Fri, 25 Sep 2020 14:48:58 +0200 Message-Id: <20200925124725.495192875@linuxfoundation.org> X-Mailer: git-send-email 2.28.0 In-Reply-To: <20200925124720.972208530@linuxfoundation.org> References: <20200925124720.972208530@linuxfoundation.org> User-Agent: quilt/0.66 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: Dmitry Golovin commit eefb8c124fd969e9a174ff2bedff86aa305a7438 upstream. Introduce a new READELF variable to top-level Makefile, so the name of readelf binary can be specified. Before this change the name of the binary was hardcoded to "$(CROSS_COMPILE)readelf" which might not be present for every toolchain. This allows to build with LLVM Object Reader by using make parameter READELF=llvm-readelf. Link: https://github.com/ClangBuiltLinux/linux/issues/771 Signed-off-by: Dmitry Golovin Reviewed-by: Nick Desaulniers Signed-off-by: Masahiro Yamada Signed-off-by: Nick Desaulniers [nd: conflict in exported vars list from not backporting commit e83b9f55448a ("kbuild: add ability to generate BTF type info for vmlinux")] Signed-off-by: Greg Kroah-Hartman --- Makefile | 3 ++- arch/x86/boot/compressed/Makefile | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) --- a/Makefile +++ b/Makefile @@ -378,6 +378,7 @@ STRIP = $(CROSS_COMPILE)strip OBJCOPY = $(CROSS_COMPILE)objcopy OBJDUMP = $(CROSS_COMPILE)objdump OBJSIZE = $(CROSS_COMPILE)size +READELF = $(CROSS_COMPILE)readelf LEX = flex YACC = bison AWK = awk @@ -434,7 +435,7 @@ GCC_PLUGINS_CFLAGS := CLANG_FLAGS := export ARCH SRCARCH CONFIG_SHELL HOSTCC KBUILD_HOSTCFLAGS CROSS_COMPILE AS LD CC -export CPP AR NM STRIP OBJCOPY OBJDUMP OBJSIZE KBUILD_HOSTLDFLAGS KBUILD_HOSTLDLIBS +export CPP AR NM STRIP OBJCOPY OBJDUMP OBJSIZE READELF KBUILD_HOSTLDFLAGS KBUILD_HOSTLDLIBS export MAKE LEX YACC AWK GENKSYMS INSTALLKERNEL PERL PYTHON PYTHON2 PYTHON3 UTS_MACHINE export HOSTCXX KBUILD_HOSTCXXFLAGS LDFLAGS_MODULE CHECK CHECKFLAGS --- a/arch/x86/boot/compressed/Makefile +++ b/arch/x86/boot/compressed/Makefile @@ -102,7 +102,7 @@ vmlinux-objs-$(CONFIG_EFI_MIXED) += $(ob quiet_cmd_check_data_rel = DATAREL $@ define cmd_check_data_rel for obj in $(filter %.o,$^); do \ - ${CROSS_COMPILE}readelf -S $$obj | grep -qF .rel.local && { \ + $(READELF) -S $$obj | grep -qF .rel.local && { \ echo "error: $$obj has data relocations!" >&2; \ exit 1; \ } || true; \