You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
It seems that this does not build for Linux kernels compiled with clang.
It fails with clang: error: unsupported option '-mhard-float' for target 'x86_64-linux-gnu'
— seems that the Makefile script hard-sets an option that clang does not understand.
↗ Here is a patch that fixes those two issues (and I recommend setting the $CFLAGS completely from what was used during kernel build or the build environment, also not overriding optimisation settings):
diff -rU1 rtl88xxau.orig/Makefile rtl88xxau/Makefile--- rtl88xxau.orig/Makefile 2024-11-14 13:30:02.136693553 +0100+++ rtl88xxau/Makefile 2024-11-14 13:56:07.723375267 +0100@@ -14,3 +14,6 @@
#EXTRA_CFLAGS += -Wno-error=incompatible-pointer-types
+# 'clang' does not understand '-Wno-stringop-overread', see https://github.com/aircrack-ng/rtl8812au/issues/1205. So only add this if 'gcc' is the compiler.+ifeq ($(CC), gcc)
EXTRA_CFLAGS += -Wno-stringop-overread
+endif
#EXTRA_CFLAGS += -Wno-pointer-bool-conversion
@@ -1623,6 +1626,12 @@
ifeq ($(ARCH), i386)
+# 'clang' does not understand '-mhard-float', see https://github.com/aircrack-ng/rtl8812au/issues/1205. So only add this if 'gcc' is the compiler.+ifeq ($(CC), gcc)
EXTRA_CFLAGS += -mhard-float
+endif
EXTRA_CFLAGS += -DMARK_KERNEL_PFU
else ifeq ($(ARCH), x86_64)
+# 'clang' does not understand '-mhard-float', see https://github.com/aircrack-ng/rtl8812au/issues/1205. So only add this if 'gcc' is the compiler.+ifeq ($(CC), gcc)
EXTRA_CFLAGS += -mhard-float
+endif
EXTRA_CFLAGS += -DMARK_KERNEL_PFU
I don't know if this patch is "legit", in the sense that CC=gcc is set when compiling for a GCC compiled kernel.
For the otherwise same kernel, but compiled with GCC, it works:
Patch below.
It seems that this does not build for Linux kernels compiled with clang.
It fails with
clang: error: unsupported option '-mhard-float' for target 'x86_64-linux-gnu'
— seems that the
Makefile
script hard-sets an option thatclang
does not understand.dkms build -m rtl88xxau/r1298.b44d288 -k 6.11.3-vanilla-customconfig-clang
:/var/lib/dkms/rtl88xxau/r1298.b44d288/build/make.log
contains:In
Makefile
I findIf this is "fixed",
clang
complains about-Wno-stringop-overread
:In
Makefile
, I find regarding this:Possible patch:
↗ Here is a patch that fixes those two issues (and I recommend setting the
$CFLAGS
completely from what was used during kernel build or the build environment, also not overriding optimisation settings):I don't know if this patch is "legit", in the sense that
CC=gcc
is set when compiling for a GCC compiled kernel.For the otherwise same kernel, but compiled with GCC, it works:
dkms build -m rtl88xxau/r1298.b44d288 -k 6.11.3-vanilla-customconfig-gcc
:Regards!
The text was updated successfully, but these errors were encountered: