diff options
author | David Gow <davidgow@google.com> | 2022-03-03 10:06:42 +0100 |
---|---|---|
committer | Richard Weinberger <richard@nod.at> | 2022-03-11 10:51:41 +0100 |
commit | 6580c5c18fb3df2b11c5e0452372f815deeff895 (patch) | |
tree | 9c84177151f92c00749e5f3b90f44195192d6672 /arch/um/Makefile | |
parent | docs: UML: Mention telnetd for port channel (diff) | |
download | linux-6580c5c18fb3df2b11c5e0452372f815deeff895.tar.xz linux-6580c5c18fb3df2b11c5e0452372f815deeff895.zip |
um: clang: Strip out -mno-global-merge from USER_CFLAGS
The things built with USER_CFLAGS don't seem to recognise it as a
compiler option, and print a warning:
clang: warning: argument unused during compilation: '-mno-global-merge' [-Wunused-command-line-argument]
Fixes: 744814d2fa ("um: Allow builds with Clang")
Signed-off-by: David Gow <davidgow@google.com>
Reviewed-by: Nathan Chancellor <nathan@kernel.org>
Signed-off-by: Richard Weinberger <richard@nod.at>
Diffstat (limited to 'arch/um/Makefile')
-rw-r--r-- | arch/um/Makefile | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/arch/um/Makefile b/arch/um/Makefile index f2fe63bfd819..320b09cd513c 100644 --- a/arch/um/Makefile +++ b/arch/um/Makefile @@ -75,6 +75,10 @@ USER_CFLAGS = $(patsubst $(KERNEL_DEFINES),,$(patsubst -I%,,$(KBUILD_CFLAGS))) \ -D_FILE_OFFSET_BITS=64 -idirafter $(srctree)/include \ -idirafter $(objtree)/include -D__KERNEL__ -D__UM_HOST__ +ifdef CONFIG_CC_IS_CLANG +USER_CFLAGS := $(patsubst -mno-global-merge,,$(USER_CFLAGS)) +endif + #This will adjust *FLAGS accordingly to the platform. include $(srctree)/$(ARCH_DIR)/Makefile-os-$(OS) |