linux-stable/drivers/crypto/vmx
Michael Ellerman 26e95d4f9e crypto: vmx - Avoid weird build failures
[ Upstream commit 4ee812f614 ]

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 <mpe@ellerman.id.au>
Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
Signed-off-by: Sasha Levin <sashal@kernel.org>
2019-12-31 16:36:13 +01:00
..
.gitignore
aes.c crypto: vmx - Remove overly verbose printk from AES init routines 2018-05-12 00:13:15 +08:00
aes_cbc.c crypto: vmx - Fix sleep-in-atomic bugs 2018-08-25 19:50:43 +08:00
aes_ctr.c crypto: vmx - Remove overly verbose printk from AES init routines 2018-05-12 00:13:15 +08:00
aes_xts.c crypto: vmx - Fix sleep-in-atomic bugs 2018-08-25 19:50:43 +08:00
aesp8-ppc.h License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
aesp8-ppc.pl crypto: vmx - CTR: always increment IV as quadword 2019-05-31 06:46:01 -07:00
ghash.c crypto: vmx - ghash: do nosimd fallback manually 2019-06-04 08:02:34 +02:00
ghashp8-ppc.pl treewide: convert ISO_8859-1 text comments to utf-8 2018-08-23 18:48:43 -07:00
Kconfig crypto: vmx - Ensure ghash-generic is enabled 2016-10-02 22:33:44 +08:00
Makefile crypto: vmx - Avoid weird build failures 2019-12-31 16:36:13 +01:00
ppc-xlate.pl License cleanup: add SPDX GPL-2.0 license identifier to files with no license 2017-11-02 11:10:55 +01:00
vmx.c