Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

x86/boot/compressed: prefer cc-option for CFLAGS additions

as-option tests new options using KBUILD_CFLAGS, which causes problems
when using as-option to update KBUILD_AFLAGS because many compiler
options are not valid assembler options.

This will be fixed in a follow up patch. Before doing so, move the
assembler test for -Wa,-mrelax-relocations=no from using as-option to
cc-option.

Link: https://lore.kernel.org/llvm/CAK7LNATcHt7GcXZ=jMszyH=+M_LC9Qr6yeAGRCBbE6xriLxtUQ@mail.gmail.com/
Suggested-by: Masahiro Yamada <masahiroy@kernel.org>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Tested-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Nick Desaulniers <ndesaulniers@google.com>
Signed-off-by: Nathan Chancellor <nathan@kernel.org>
Tested-by: Linux Kernel Functional Testing <lkft@linaro.org>
Tested-by: Anders Roxell <anders.roxell@linaro.org>
Signed-off-by: Masahiro Yamada <masahiroy@kernel.org>

authored by

Nick Desaulniers and committed by
Masahiro Yamada
994f5f78 837962ca

+1 -1
+1 -1
arch/x86/boot/compressed/Makefile
··· 50 50 KBUILD_CFLAGS += -fno-asynchronous-unwind-tables 51 51 KBUILD_CFLAGS += -D__DISABLE_EXPORTS 52 52 # Disable relocation relaxation in case the link is not PIE. 53 - KBUILD_CFLAGS += $(call as-option,-Wa$(comma)-mrelax-relocations=no) 53 + KBUILD_CFLAGS += $(call cc-option,-Wa$(comma)-mrelax-relocations=no) 54 54 KBUILD_CFLAGS += -include $(srctree)/include/linux/hidden.h 55 55 56 56 # sev.c indirectly inludes inat-table.h which is generated during