Currently kconfig does not have a feature that allows to detect if the used assembler supports a specific compilation option. Introduce 'as-option' to serve this purpose in the context of Kconfig: config X def_bool $(as-option,...)
Showing the changes to scripts (1 of 1 file). Show all
Unified · Split
| @@ -31,6 +31,12 @@ cc-option = $(success,$(CC) -Werror $(CLANG_FLAGS) $(1) -S -x c /dev/null -o /de · 30 unmodified lines | |||
| 31 | # Return y if the linker supports <flag>, n otherwise | 31 | # Return y if the linker supports <flag>, n otherwise |
| 32 | ld-option = $(success,$(LD) -v $(1)) | 32 | ld-option = $(success,$(LD) -v $(1)) |
| 33 | 33 | ||
| 34 | # $(as-option,<flag>) | ||
| 35 | # /dev/zero is used as output instead of /dev/null as some assembler cribs when | ||
| 36 | # both input and output are same. Also both of them have same write behaviour so | ||
| 37 | # can be easily substituted. | ||
| 38 | as-option = $(success, $(CC) $(CLANG_FLAGS) $(1) -c -x assembler /dev/null -o /dev/zero) | ||
| 39 | |||
| 34 | # $(as-instr,<instr>) | 40 | # $(as-instr,<instr>) |
| 35 | # Return y if the assembler supports <instr>, n otherwise | 41 | # Return y if the assembler supports <instr>, n otherwise |
| 36 | as-instr = $(success,printf "%b\n" "$(1)" | $(CC) $(CLANG_FLAGS) -c -x assembler -o /dev/null -) | 42 | as-instr = $(success,printf "%b\n" "$(1)" | $(CC) $(CLANG_FLAGS) -c -x assembler -o /dev/null -) |