aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/src/compat
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-06-02 19:45:08 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2019-06-02 19:45:08 +0200
commitb57de923d8c725ef8d55e7ad458f1f456f98adbf (patch)
tree1d2698bb26becec4f6a1838093ff1049070575e5 /src/compat
parentversion: bump snapshot (diff)
downloadwireguard-monolithic-historical-b57de923d8c725ef8d55e7ad458f1f456f98adbf.tar.xz
wireguard-monolithic-historical-b57de923d8c725ef8d55e7ad458f1f456f98adbf.zip
curve25519: not all linkers support bmi2 and adx
Diffstat (limited to 'src/compat')
-rw-r--r--src/compat/Kbuild.include10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/compat/Kbuild.include b/src/compat/Kbuild.include
index 34398dc..95041a9 100644
--- a/src/compat/Kbuild.include
+++ b/src/compat/Kbuild.include
@@ -75,4 +75,14 @@ ifeq ($(CONFIG_X86_64),y)
ccflags-y += $(avx512_instr)
asflags-y += $(avx512_instr)
endif
+ ifeq ($(bmi2_instr),)
+ bmi2_instr :=$(call as-instr,mulx %rax$(comma)%rax$(comma)%rax,-DCONFIG_AS_BMI2=1)
+ ccflags-y += $(bmi2_instr)
+ asflags-y += $(bmi2_instr)
+ endif
+ ifeq ($(adx_instr),)
+ adx_instr :=$(call as-instr,adcx %rax$(comma)%rax,-DCONFIG_AS_ADX=1)
+ ccflags-y += $(adx_instr)
+ asflags-y += $(adx_instr)
+ endif
endif