Skip to content

Commit 6580c5c

Browse files
sulixrichardweinberger
authored andcommitted
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: 744814d ("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>
1 parent 4ef5a0b commit 6580c5c

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

arch/um/Makefile

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -75,6 +75,10 @@ USER_CFLAGS = $(patsubst $(KERNEL_DEFINES),,$(patsubst -I%,,$(KBUILD_CFLAGS))) \
7575
-D_FILE_OFFSET_BITS=64 -idirafter $(srctree)/include \
7676
-idirafter $(objtree)/include -D__KERNEL__ -D__UM_HOST__
7777

78+
ifdef CONFIG_CC_IS_CLANG
79+
USER_CFLAGS := $(patsubst -mno-global-merge,,$(USER_CFLAGS))
80+
endif
81+
7882
#This will adjust *FLAGS accordingly to the platform.
7983
include $(srctree)/$(ARCH_DIR)/Makefile-os-$(OS)
8084

0 commit comments

Comments
 (0)