Skip to content

Commit 84edc2e

Browse files
arndbtorvalds
authored andcommitted
selftest/fpu: avoid clang warning
With extra warnings enabled, clang complains about the redundant -mhard-float argument: clang: error: argument unused during compilation: '-mhard-float' [-Werror,-Wunused-command-line-argument] Move this into the gcc-only part of the Makefile. Link: https://lkml.kernel.org/r/20201203223652.1320700-1-arnd@kernel.org Fixes: 4185b3b ("selftests/fpu: Add an FPU selftest") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Cc: Nathan Chancellor <natechancellor@gmail.com> Cc: Nick Desaulniers <ndesaulniers@google.com> Cc: Petteri Aimonen <jpa@git.mail.kapsi.fi> Cc: Borislav Petkov <bp@suse.de> Cc: Arnd Bergmann <arnd@arndb.de> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
1 parent 40d6366 commit 84edc2e

1 file changed

Lines changed: 2 additions & 1 deletion

File tree

lib/Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ obj-$(CONFIG_TEST_FREE_PAGES) += test_free_pages.o
107107
# off the generation of FPU/SSE* instructions for kernel proper but FPU_FLAGS
108108
# get appended last to CFLAGS and thus override those previous compiler options.
109109
#
110-
FPU_CFLAGS := -mhard-float -msse -msse2
110+
FPU_CFLAGS := -msse -msse2
111111
ifdef CONFIG_CC_IS_GCC
112112
# Stack alignment mismatch, proceed with caution.
113113
# GCC < 7.1 cannot compile code using `double` and -mpreferred-stack-boundary=3
@@ -120,6 +120,7 @@ ifdef CONFIG_CC_IS_GCC
120120
# -mpreferred-stack-boundary=3 is not between 4 and 12
121121
#
122122
# can be triggered. Otherwise gcc doesn't complain.
123+
FPU_CFLAGS += -mhard-float
123124
FPU_CFLAGS += $(call cc-option,-msse -mpreferred-stack-boundary=3,-mpreferred-stack-boundary=4)
124125
endif
125126

0 commit comments

Comments
 (0)