Comment 9 for bug 1993274

Revision history for this message
Dimitri John Ledkov (xnox) wrote :

# cat /var/lib/dkms/licheerv-rtl8723ds/1.0/build/make.log
DKMS make.log for licheerv-rtl8723ds-1.0 for kernel 5.19.0-1003-allwinner (riscv64)
Wed Nov 16 12:56:25 UTC 2022
/bin/sh: 1: bc: not found
make ARCH=riscv CROSS_COMPILE= -C /lib/modules/5.19.0-1003-allwinner/build M=/var/lib/dkms/licheerv-rtl8723ds/1.0/build modules
make[1]: Entering directory '/usr/src/linux-headers-5.19.0-1003-allwinner'
warning: the compiler differs from the one used to build the kernel
  The kernel was built by: riscv64-linux-gnu-gcc-12 (Ubuntu 12.2.0-3ubuntu1) 12.2.0
  You are using: gcc (Ubuntu 12.2.0-3ubuntu1) 12.2.0
...

which causes ftbfs

GCC_VER_49 := $(shell echo `$(CC) -dumpversion | cut -f1-2 -d.` \>= 4.9 | bc )
ifeq ($(GCC_VER_49),1)
EXTRA_CFLAGS += -Wno-date-time # Fix compile error && warning on gcc 4.9 and later
endif

However, gcc 49 is very old, and we can assume that it simply is available. and thus unconditionally add -Wno-date-time

Or we can drop the __DATE__ and __TIME__ stanzas from the source file, which upstream kernel prohibits anyway in kernel code.