File tree Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Expand file tree Collapse file tree 1 file changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -278,6 +278,11 @@ bindgen_skip_c_flags := -mno-fp-ret-in-387 -mpreferred-stack-boundary=% \
278
278
-fno-inline-functions-called-once \
279
279
--param=% --param asan-%
280
280
281
+ # Ignore RISC-V extensions that Clang does not recognize.
282
+ bindgen_c_flags_patsubst2 = $(patsubst -march=rv% _zihintpause,-march=rv% ,$(c_flags ) )
283
+ bindgen_c_flags_patsubst1 = $(patsubst -march=rv% _zicbom,-march=rv% ,$(bindgen_c_flags_patsubst2 ) )
284
+ bindgen_c_flags_patsubst = $(patsubst -march=rv% _zicsr_zifencei,-march=rv% ,$(bindgen_c_flags_patsubst1 ) )
285
+
281
286
# Derived from `scripts/Makefile.clang`.
282
287
BINDGEN_TARGET_arm := arm-linux-gnueabi
283
288
BINDGEN_TARGET_arm64 := aarch64-linux-gnu
@@ -291,7 +296,7 @@ BINDGEN_TARGET := $(BINDGEN_TARGET_$(SRCARCH))
291
296
# some configurations, with new GCC versions, etc.
292
297
bindgen_extra_c_flags = -w --target=$(BINDGEN_TARGET )
293
298
294
- bindgen_c_flags = $(filter-out $(bindgen_skip_c_flags ) , $(c_flags ) ) \
299
+ bindgen_c_flags = $(filter-out $(bindgen_skip_c_flags ) , $(bindgen_c_flags_patsubst ) ) \
295
300
$(bindgen_extra_c_flags )
296
301
endif
297
302
You can’t perform that action at this time.
0 commit comments