summaryrefslogtreecommitdiffhomepage
path: root/src/compat/Kbuild.include
diff options
context:
space:
mode:
authorJason A. Donenfeld <Jason@zx2c4.com>2019-08-03 13:45:14 +0200
committerJason A. Donenfeld <Jason@zx2c4.com>2019-08-03 13:45:14 +0200
commit5bae8e4460e150d218b046302d7c231580bf5ec7 (patch)
treee4130a20a9e944cf41148a0fa98b1101ea9c2b42 /src/compat/Kbuild.include
parentff37e4cec3a8b6c7e7fe3db87e91dadb3eecbf11 (diff)
compat: do not run bc on clean target
Certain targets don't define CONFIG_*, which means this bc command was previously failing. Signed-off-by: Jason A. Donenfeld <Jason@zx2c4.com>
Diffstat (limited to 'src/compat/Kbuild.include')
-rw-r--r--src/compat/Kbuild.include2
1 files changed, 2 insertions, 0 deletions
diff --git a/src/compat/Kbuild.include b/src/compat/Kbuild.include
index 1b555f8..7404992 100644
--- a/src/compat/Kbuild.include
+++ b/src/compat/Kbuild.include
@@ -47,9 +47,11 @@ ccflags-y += -include $(kbuild-dir)/compat/memneq/include.h
wireguard-y += compat/memneq/memneq.o
endif
+ifdef CONFIG_HZ
ifeq ($(wildcard $(srctree)/include/generated/timeconst.h),)
ccflags-y += $(shell echo 'define gcd(a,b){auto t;while(b){t=b;b=a%b;a=t;};return a;};hz=$(CONFIG_HZ);cd=gcd(hz,1000000);print "-DHZ_TO_USEC_NUM=",1000000/cd," -DHZ_TO_USEC_DEN=",hz/cd;halt;' | bc -q)
endif
+endif
ifeq ($(wildcard $(srctree)/arch/arm/include/asm/neon.h)$(CONFIG_ARM),y)
ccflags-y += -I$(kbuild-dir)/compat/neon-arm/include