aboutsummaryrefslogtreecommitdiffstatshomepage
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2018-11-15 18:55:45 -0800
committerJason A. Donenfeld <Jason@zx2c4.com>2018-11-15 19:00:02 -0800
commit20f6500da17859c5dcccf37811a2e96c65017122 (patch)
tree74ec99423b1dc5c4d0fb2624903ba2d48bafd7c3
parentpoly1305: cleanup leftover debugging changes (diff)
downloadWireGuard-20f6500da17859c5dcccf37811a2e96c65017122.tar.xz
WireGuard-20f6500da17859c5dcccf37811a2e96c65017122.zip
crypto: resolve target prefix on buggy kernels
We also move to .SECONDARY, since older kernels don't use targets like that.
-rw-r--r--src/crypto/Kbuild.include7
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