Received: by 2002:a17:90a:9103:0:0:0:0 with SMTP id k3csp11813090pjo; Thu, 2 Jan 2020 14:43:37 -0800 (PST) X-Google-Smtp-Source: APXvYqyQ0cCovLM99DEbY+b4tEM5JyhCcAH/Ty1ooEVIFHKZiOkhr5A7wkEL39vbVBDli4PeVovQ X-Received: by 2002:a9d:7d09:: with SMTP id v9mr77402291otn.338.1578005017415; Thu, 02 Jan 2020 14:43:37 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1578005017; cv=none; d=google.com; s=arc-20160816; b=ypUUjlJjVODzgRz+yqJN54m5iK05IpgLXUePhlKMFZ9VggTlZ0XfDh+w/z8AR//k4G o9t90I333E2IBNdDJ7sYcRgQajbax5eTgr6VFLCoYZVCCT21Zw0iGsYpQgUp+ZQGuYfU EsnlEKmy7O/4Z/8bvpUnB7PVmvJaHw7nU/kKdLzQxbJoqQjdBnpfh/EHxLXVmWk3k7YC IG7avm6lPQoOIaWD7+sAJYOIBq84rn717EN5EI0Kq6SvTXHdnLYmZzXXW0HJTZFz9Nl5 uHJ/rYzJ/YMuIJh65JjC7JbpFFsVrxZnHNYUlckZISq89OfpHSb+v4wtOnzkg3oyydyN L//A== 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=p3uDZSXzb2wyn1MzaQwSexD9pbxCGHZaJCAjHnSqykY=; b=IEvH5SdviHxjIJ4Xt1e6X1YXWfZwYBoC4kWXOidAqcpURl7gvjkS0jaBZpWFaixGWd Cyyv9JREegINobckS21VDt3O6aF/6Ilk5fUkw5qQWdnBsLExnQt6w7Nfchkkk/pxGI/q odL69jgDyOJKes+Yv1JLAeNKt0OjQC0jH9fRV3XIDM/sOqMAt4c4Fi6Uu8znCJDdUvLr aoCB2VpzgauXj7+QaXEuNICxLixVucs5IXyVjhu7M5a5VOsVxVAXfr8Vf4ww3AKsmLFG vGw9dfrDdZOMkiw7b0fLEllaJYZiUnJ8/fG8XpCG3i1Jcu81MZaA+WS5QMWynNnbF1wg ekjQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b="wxP/mkpP"; 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 f15si22786251oib.61.2020.01.02.14.43.25; Thu, 02 Jan 2020 14:43:37 -0800 (PST) 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="wxP/mkpP"; 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 S1730794AbgABWgR (ORCPT + 99 others); Thu, 2 Jan 2020 17:36:17 -0500 Received: from mail.kernel.org ([198.145.29.99]:46952 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1730914AbgABWgM (ORCPT ); Thu, 2 Jan 2020 17:36:12 -0500 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 0E8B220866; Thu, 2 Jan 2020 22:36:10 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1578004571; bh=Z1qj7Do3EdfdXCrU8R22JG5kZqnt2C1f4Tn7aO0pYh8=; h=From:To:Cc:Subject:Date:In-Reply-To:References:From; b=wxP/mkpP6jq5jMoy1MkScKmN7qrexL2MzNPkC0NDGFpcbrvulNsfaSEplHbCdy7gz sfwQt2ujsvSevdB5kBFGOi4Jnf63sEFaw4m83C6f5QcWmz47hEz/waob85bv36UeID GznOenCa+7sRhSl2YZtafDcnDpg5xD8hU75vKLrM= From: Greg Kroah-Hartman To: linux-kernel@vger.kernel.org Cc: Greg Kroah-Hartman , stable@vger.kernel.org, Michael Ellerman , Herbert Xu , Sasha Levin Subject: [PATCH 4.4 063/137] crypto: vmx - Avoid weird build failures Date: Thu, 2 Jan 2020 23:07:16 +0100 Message-Id: <20200102220554.978002208@linuxfoundation.org> X-Mailer: git-send-email 2.24.1 In-Reply-To: <20200102220546.618583146@linuxfoundation.org> References: <20200102220546.618583146@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: Michael Ellerman [ Upstream commit 4ee812f6143d78d8ba1399671d78c8d78bf2817c ] In the vmx crypto Makefile we assign to a variable called TARGET and pass that to the aesp8-ppc.pl and ghashp8-ppc.pl scripts. The variable is meant to describe what flavour of powerpc we're building for, eg. either 32 or 64-bit, and big or little endian. Unfortunately TARGET is a fairly common name for a make variable, and if it happens that TARGET is specified as a command line parameter to make, the value specified on the command line will override our value. In particular this can happen if the kernel Makefile is driven by an external Makefile that uses TARGET for something. This leads to weird build failures, eg: nonsense at /build/linux/drivers/crypto/vmx/ghashp8-ppc.pl line 45. /linux/drivers/crypto/vmx/Makefile:20: recipe for target 'drivers/crypto/vmx/ghashp8-ppc.S' failed Which shows that we passed an empty value for $(TARGET) to the perl script, confirmed with make V=1: perl /linux/drivers/crypto/vmx/ghashp8-ppc.pl > drivers/crypto/vmx/ghashp8-ppc.S We can avoid this confusion by using override, to tell make that we don't want anything to override our variable, even a value specified on the command line. We can also use a less common name, given the script calls it "flavour", let's use that. Signed-off-by: Michael Ellerman Signed-off-by: Herbert Xu Signed-off-by: Sasha Levin --- drivers/crypto/vmx/Makefile | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/crypto/vmx/Makefile b/drivers/crypto/vmx/Makefile index d28ab96a2475..7663494809a0 100644 --- a/drivers/crypto/vmx/Makefile +++ b/drivers/crypto/vmx/Makefile @@ -2,13 +2,13 @@ obj-$(CONFIG_CRYPTO_DEV_VMX_ENCRYPT) += vmx-crypto.o vmx-crypto-objs := vmx.o aesp8-ppc.o ghashp8-ppc.o aes.o aes_cbc.o aes_ctr.o ghash.o ifeq ($(CONFIG_CPU_LITTLE_ENDIAN),y) -TARGET := linux-ppc64le +override flavour := linux-ppc64le else -TARGET := linux-ppc64 +override flavour := linux-ppc64 endif quiet_cmd_perl = PERL $@ - cmd_perl = $(PERL) $(<) $(TARGET) > $(@) + cmd_perl = $(PERL) $(<) $(flavour) > $(@) $(src)/aesp8-ppc.S: $(src)/aesp8-ppc.pl $(call cmd,perl) -- 2.20.1