Skip to content

Commit 4ee812f

Browse files
mpeherbertx
authored andcommitted
crypto: vmx - Avoid weird build failures
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 <[email protected]> Signed-off-by: Herbert Xu <[email protected]>
1 parent 413808b commit 4ee812f

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

drivers/crypto/vmx/Makefile

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,13 +3,13 @@ obj-$(CONFIG_CRYPTO_DEV_VMX_ENCRYPT) += vmx-crypto.o
33
vmx-crypto-objs := vmx.o aesp8-ppc.o ghashp8-ppc.o aes.o aes_cbc.o aes_ctr.o aes_xts.o ghash.o
44

55
ifeq ($(CONFIG_CPU_LITTLE_ENDIAN),y)
6-
TARGET := linux-ppc64le
6+
override flavour := linux-ppc64le
77
else
8-
TARGET := linux-ppc64
8+
override flavour := linux-ppc64
99
endif
1010

1111
quiet_cmd_perl = PERL $@
12-
cmd_perl = $(PERL) $(<) $(TARGET) > $(@)
12+
cmd_perl = $(PERL) $(<) $(flavour) > $(@)
1313

1414
targets += aesp8-ppc.S ghashp8-ppc.S
1515

0 commit comments

Comments
 (0)