Message ID | 20220203204025.1153397-1-keescook@chromium.org (mailing list archive) |
---|---|
State | Changes Requested |
Commit | 1099ce55b0530ff429312dc37362ad43aee8c5c0 |
Headers | show |
Series | [v2] x86/build: don't build CONFIG_X86_32 as -ffreestanding | expand |
On Thu, Feb 3, 2022 at 12:40 PM Kees Cook <keescook@chromium.org> wrote: > > From: Nick Desaulniers <ndesaulniers@google.com> > > -ffreestanding typically inhibits "libcall optimizations" where calls to > certain library functions can be replaced by the compiler in certain > cases to calls to other library functions that may be more efficient. > This can be problematic for embedded targets that don't provide full > libc implementations. While the bcmp shenanigans were ultimately resolved by commit 5f074f3e192f ("lib/string.c: implement a basic bcmp") (and this popped up again in commit 1e1b6d63d634 ("lib/string.c: implement stpcpy") ). I'm still very much in favor of this patch, and should have pursued it. Thanks for resending!
diff --git a/arch/x86/Makefile b/arch/x86/Makefile index e84cdd409b64..7ef211865239 100644 --- a/arch/x86/Makefile +++ b/arch/x86/Makefile @@ -88,9 +88,6 @@ ifeq ($(CONFIG_X86_32),y) include $(srctree)/arch/x86/Makefile_32.cpu KBUILD_CFLAGS += $(cflags-y) - # temporary until string.h is fixed - KBUILD_CFLAGS += -ffreestanding - ifeq ($(CONFIG_STACKPROTECTOR),y) ifeq ($(CONFIG_SMP),y) KBUILD_CFLAGS += -mstack-protector-guard-reg=fs -mstack-protector-guard-symbol=__stack_chk_guard