From: Jeff Dike Date: Sun, 4 Jun 2006 09:51:49 +0000 (-0700) Subject: [PATCH] uml: add -ffreestanding to CFLAGS X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=fec468b0c9e0a75b89514408e3b35b1576b57071;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [PATCH] uml: add -ffreestanding to CFLAGS From: Jeff Dike This fixes the undefined reference to strcpy seen when building modules on i386. Tracked down by Al Viro. Signed-off-by: Jeff Dike Cc: Paolo 'Blaisorblade' Giarrusso Signed-off-by: Andrew Morton Signed-off-by: Linus Torvalds --- diff --git a/arch/um/Makefile-i386 b/arch/um/Makefile-i386 index 7a0e04e34bf9..b65ca115ef77 100644 --- a/arch/um/Makefile-i386 +++ b/arch/um/Makefile-i386 @@ -33,5 +33,9 @@ include $(srctree)/arch/i386/Makefile.cpu # prevent gcc from keeping the stack 16 byte aligned. Taken from i386. cflags-y += $(call cc-option,-mpreferred-stack-boundary=2) +# Prevent sprintf in nfsd from being converted to strcpy and resulting in +# an unresolved reference. +cflags-y += -ffreestanding + CFLAGS += $(cflags-y) USER_CFLAGS += $(cflags-y)