Skip to content

Commit

Permalink
kbuild: check as-option support in Kconfig
Browse files Browse the repository at this point in the history
Signed-off-by: Conor Dooley <conor.dooley@microchip.com>
  • Loading branch information
ConchuOD committed Oct 5, 2022
1 parent cfadbb9 commit 0ce26a8
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions scripts/Kconfig.include
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,10 @@ cc-option = $(success,trap "rm -rf .tmp_$$" EXIT; mkdir .tmp_$$; $(CC) -Werror $
# Return y if the linker supports <flag>, n otherwise
ld-option = $(success,$(LD) -v $(1))

# as-option
# Return y if the assember supports <flag>, n otherwise
as-option = $(success,trap "rm -rf .tmp_$$" | mkdir .tmp-$$; $(CC) -Werror $(1) -c -x assembler /dev/null -o "$$TMP")

# $(as-instr,<instr>)
# Return y if the assembler supports <instr>, n otherwise
as-instr = $(success,printf "%b\n" "$(1)" | $(CC) $(CLANG_FLAGS) -c -x assembler -o /dev/null -)
Expand Down

0 comments on commit 0ce26a8

Please sign in to comment.