History

kconfig: Add support for 'as-option'

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,...)

Vincenzo Frascino committed 6 years ago

Commit c2d920b1 parent e51f5f51 file · +6 −0Browse files

Showing the changes to scripts (1 of 1 file). Show all

Unified · Split

scripts/Kconfig.include+6−0
@@ -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 otherwise31# Return y if the linker supports <flag>, n otherwise
32ld-option = $(success,$(LD) -v $(1))32ld-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.
38as-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 otherwise41# Return y if the assembler supports <instr>, n otherwise
36as-instr = $(success,printf "%b\n" "$(1)" | $(CC) $(CLANG_FLAGS) -c -x assembler -o /dev/null -)42as-instr = $(success,printf "%b\n" "$(1)" | $(CC) $(CLANG_FLAGS) -c -x assembler -o /dev/null -)

Keyboard shortcuts

General

Show keyboard shortcuts
?
Focus the current search
/

Issues and pull requests

Open filters
f

Issues, pull requests and Inbox

Select next item
j↓
Select previous item
k↑
Open selected item
Enter
Dismiss filters or clear selection
Esc

Repository code

Go to file
t