File tree Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Expand file tree Collapse file tree 2 files changed +11
-0
lines changed Original file line number Diff line number Diff line change 84
84
# Avoid generating .eh_frame sections.
85
85
KBUILD_CFLAGS += -fno-asynchronous-unwind-tables -fno-unwind-tables
86
86
87
+ # The RISC-V attributes frequently cause compatibility issues and provide no
88
+ # information, so just turn them off.
89
+ KBUILD_CFLAGS += $(call cc-option,-mno-riscv-attribute)
90
+ KBUILD_AFLAGS += $(call cc-option,-mno-riscv-attribute)
91
+ KBUILD_CFLAGS += $(call as-option,-Wa$(comma ) -mno-arch-attr)
92
+ KBUILD_AFLAGS += $(call as-option,-Wa$(comma ) -mno-arch-attr)
93
+
87
94
KBUILD_CFLAGS_MODULE += $(call cc-option,-mno-relax)
88
95
KBUILD_AFLAGS_MODULE += $(call as-option,-Wa$(comma ) -mno-relax)
89
96
Original file line number Diff line number Diff line change @@ -14,6 +14,10 @@ COMPAT_LD := $(LD)
14
14
COMPAT_CC_FLAGS := -march=rv32g -mabi=ilp32
15
15
COMPAT_LD_FLAGS := -melf32lriscv
16
16
17
+ # Disable attributes, as they're useless and break the build.
18
+ COMPAT_CC_FLAGS += $(call cc-option,-mno-riscv-attribute)
19
+ COMPAT_CC_FLAGS += $(call as-option,-Wa$(comma ) -mno-arch-attr)
20
+
17
21
# Files to link into the compat_vdso
18
22
obj-compat_vdso = $(patsubst % , % .o, $(compat_vdso-syms ) ) note.o
19
23
You can’t perform that action at this time.
0 commit comments