From cdd2f4f74121794d3681638bf38bc4871921d2b8 Mon Sep 17 00:00:00 2001 From: "Jason A. Donenfeld" Date: Sat, 3 Aug 2019 13:45:14 +0200 Subject: compat: do not run bc on clean target Certain targets don't define CONFIG_*, which means this bc command was previously failing. --- src/compat/Kbuild.include | 2 ++ 1 file changed, 2 insertions(+) (limited to 'src/compat') 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 -- cgit v1.2.3-59-g8ed1b