I've extracted driver from cd that came with my wireless card and modified it to build on kernel versions up to 4.15. Thanks to similar drivers already patched for new kernels it was an easy task. I've added RPI_ARM platform to Makefile. Even with my modifications when I build it on Raspbian I get following output with error:
make ARCH=arm CROSS_COMPILE= -C /lib/modules/4.14.34+/build M=/home/pi/rtl8821CU modules make: Entering directory '/usr/src/linux-headers-4.14.34+' CC [M] /home/pi/rtl8821CU/core/rtw_cmd.o gcc: error: -mfloat-abi=soft and -mfloat-abi=hard may not be used together scripts/Makefile.build:328: recipe for target '/home/pi/rtl8821CU/core/rtw_cmd.o' failed make: *** [/home/pi/rtl8821CU/core/rtw_cmd.o] Error 1 Makefile:1528: recipe for target '_module_/home/pi/rtl8821CU' failed make: *** [_module_/home/pi/rtl8821CU] Error 2 make: Leaving directory '/usr/src/linux-headers-4.14.34+' Makefile:1906: recipe for target 'modules' failed make: *** [modules] Error 2
I am using hardfloat image of Raspbian. There is no -mfloat-abi=soft in Makefile or in entire source. This driver builds on ubuntu with 4.15 kernel and even on Raspberry Pi if I disable -mfloat-abi=hard. How can I disable -mfloat-abi=soft?