diff options
author | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-11-15 18:55:45 -0800 |
---|---|---|
committer | Jason A. Donenfeld <Jason@zx2c4.com> | 2018-11-15 19:00:02 -0800 |
commit | 20f6500da17859c5dcccf37811a2e96c65017122 (patch) | |
tree | 74ec99423b1dc5c4d0fb2624903ba2d48bafd7c3 /src | |
parent | poly1305: cleanup leftover debugging changes (diff) | |
download | wireguard-monolithic-historical-20f6500da17859c5dcccf37811a2e96c65017122.tar.xz wireguard-monolithic-historical-20f6500da17859c5dcccf37811a2e96c65017122.zip |
crypto: resolve target prefix on buggy kernels
We also move to .SECONDARY, since older kernels don't use targets like
that.
Diffstat (limited to 'src')
-rw-r--r-- | src/crypto/Kbuild.include | 7 |
1 files changed, 6 insertions, 1 deletions
diff --git a/src/crypto/Kbuild.include b/src/crypto/Kbuild.include index 5fb9445..4fde2e6 100644 --- a/src/crypto/Kbuild.include +++ b/src/crypto/Kbuild.include @@ -41,7 +41,12 @@ quiet_cmd_perlasm = PERLASM $@ cmd_perlasm = $(PERL) $< > $@ %.S: %.pl $(call cmd,perlasm) -targets += $(patsubst %.o,crypto/zinc/%.S,$(zinc-y)) +ifeq ($(wildcard $(src)/compat/compat.h),) +target_path_prefix := $(srctree)/$(src) +else +target_path_prefix := $(src) +endif +.SECONDARY: $(addprefix $(target_path_prefix)/,$(patsubst %.o,crypto/zinc/%.S,$(zinc-y))) wireguard-y += $(addprefix crypto/zinc/,$(zinc-y)) ccflags-y += -I$(src)/crypto/include |