x86: Force asm-goto · ClangBuiltLinux/linux@e501ce9 (original) (raw)

Original file line number Diff line number Diff line change
@@ -494,6 +494,13 @@ RETPOLINE_CFLAGS_CLANG := -mretpoline-external-thunk
494 494 RETPOLINE_CFLAGS := (callcc−option,(call cc-option,(callccoption,(RETPOLINE_CFLAGS_GCC),$(call cc-option,$(RETPOLINE_CFLAGS_CLANG)))
495 495 export RETPOLINE_CFLAGS
496 496
497 +# check for 'asm goto'
498 +ifeq ($(call shell-cached,$(CONFIG_SHELL) (srctree)/scripts/gcc−goto.sh(srctree)/scripts/gcc-goto.sh (srctree)/scripts/gccgoto.sh(CC) $(KBUILD_CFLAGS)), y)
499 +CC_HAVE_ASM_GOTO := 1
500 +KBUILD_CFLAGS += -DCC_HAVE_ASM_GOTO
501 +KBUILD_AFLAGS += -DCC_HAVE_ASM_GOTO
502 +endif
503 +
497 504 ifeq ($(config-targets),1)
498 505 # ===========================================================================
499 506 # *config targets only - make sure prerequisites are updated, and descend
@@ -658,12 +665,6 @@ KBUILD_CFLAGS += $(call cc-ifversion, -lt, 0409, \
658 665 # Tell gcc to never replace conditional load with a non-conditional one
659 666 KBUILD_CFLAGS += $(call cc-option,--param=allow-store-data-races=0)
660 667
661 -# check for 'asm goto'
662 -ifeq ($(call shell-cached,$(CONFIG_SHELL) (srctree)/scripts/gcc−goto.sh(srctree)/scripts/gcc-goto.sh (srctree)/scripts/gccgoto.sh(CC) $(KBUILD_CFLAGS)), y)
663 - KBUILD_CFLAGS += -DCC_HAVE_ASM_GOTO
664 - KBUILD_AFLAGS += -DCC_HAVE_ASM_GOTO
665 -endif
666 -
667 668 include scripts/Makefile.kcov
668 669 include scripts/Makefile.gcc-plugins
669 670