From b57de923d8c725ef8d55e7ad458f1f456f98adbf Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Sun, 2 Jun 2019 19:45:08 +0200 Subject: curve25519: not all linkers support bmi2 and adx --- src/compat/Kbuild.include | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'src/compat/Kbuild.include') 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 -- cgit v1.2.3-59-g8ed1b