brektrou / rtl8821CU

Realtek RTL8811CU/RTL8821CU USB Wi-Fi adapter driver for Linux
GNU General Public License v2.0
1.59k stars 461 forks source link

gcc: error: -mfloat-abi=soft and -mfloat-abi=hard may not be used together #85

Open EndlessEden opened 3 years ago

EndlessEden commented 3 years ago

OS: Archlinux(arm) Hardware: Armv7(RaspberryPi 2)

make ARCH=armv7l CROSS_COMPILE= -C /lib/modules/5.4.65-1-ARCH/build M=/var/lib/dkms/rtl8821cu/5.4.18345a8b43/build modules make[1]: Entering directory '/usr/lib/modules/5.4.65-1-ARCH/build' CC [M] /var/lib/dkms/rtl8821cu/5.4.18345a8b43/build/core/rtw_cmd.o gcc: error: -mfloat-abi=soft and -mfloat-abi=hard may not be used together

i dont see this call anywhere, and switching system CFLAGS to explicitly include -mfloat-abi=soft, instead of -mfloat-abi=hard has no effect.

cgarnold commented 3 years ago

Helo You need to follow this instruction to avoid this problem: https://github.com/brektrou/rtl8821CU#arm-architecture-tweak-for-this-driver-this-solves-compilation-problem-of-this-driver By default is -mfloat-abi=soft but this driver requires -mfloat-abi=hard and you can't use both at same time.

kcozens commented 3 years ago

The information inthe previous comment helped. It solved the compile error I was getting when building the driver on a NanoPi board. I also commented out the line "EXTRA_CFLAGS += -Wno-implicit-fallthrough" in the Makefile as the gcc v5.4.0 compiler doesn't recognize that option.