@@ -110,31 +110,10 @@ CFLAGS_test_fprobe.o += $(CC_FLAGS_FTRACE)
110
110
obj-$(CONFIG_FPROBE_SANITY_TEST) += test_fprobe.o
111
111
obj-$(CONFIG_TEST_OBJPOOL) += test_objpool.o
112
112
113
- #
114
- # CFLAGS for compiling floating point code inside the kernel. x86/Makefile turns
115
- # off the generation of FPU/SSE* instructions for kernel proper but FPU_FLAGS
116
- # get appended last to CFLAGS and thus override those previous compiler options.
117
- #
118
- FPU_CFLAGS := -msse -msse2
119
- ifdef CONFIG_CC_IS_GCC
120
- # Stack alignment mismatch, proceed with caution.
121
- # GCC < 7.1 cannot compile code using `double` and -mpreferred-stack-boundary=3
122
- # (8B stack alignment).
123
- # See https://gcc.gnu.org/bugzilla/show_bug.cgi?id=53383
124
- #
125
- # The "-msse" in the first argument is there so that the
126
- # -mpreferred-stack-boundary=3 build error:
127
- #
128
- # -mpreferred-stack-boundary=3 is not between 4 and 12
129
- #
130
- # can be triggered. Otherwise gcc doesn't complain.
131
- FPU_CFLAGS += -mhard-float
132
- FPU_CFLAGS += $(call cc-option,-msse -mpreferred-stack-boundary=3,-mpreferred-stack-boundary=4)
133
- endif
134
-
135
113
obj-$(CONFIG_TEST_FPU) += test_fpu.o
136
114
test_fpu-y := test_fpu_glue.o test_fpu_impl.o
137
- CFLAGS_test_fpu_impl.o += $(FPU_CFLAGS )
115
+ CFLAGS_test_fpu_impl.o += $(CC_FLAGS_FPU )
116
+ CFLAGS_REMOVE_test_fpu_impl.o += $(CC_FLAGS_NO_FPU )
138
117
139
118
# Some KUnit files (hooks.o) need to be built-in even when KUnit is a module,
140
119
# so we can't just use obj-$(CONFIG_KUNIT).
0 commit comments