From: Nicolas Thill <n...@openwrt.org>

Ubuntu 8.10 and newer enable compile-time buffer checks by default,
which can sometime cause build failures like this:

  LD      vmlinux
  SYSMAP  System.map
  SYSMAP  .tmp_System.map
  LINK linux
  Building modules, stage 2.
  MODPOST 51 modules
ERROR: "__sprintf_chk" [arch/um/drivers/harddog.ko] undefined!

disable compile-time buffer checks to avoid such errors.

Signed-off-by: Nicolas Thill <n...@openwrt.org>
---
diff --git a/arch/um/Makefile-os-Linux b/arch/um/Makefile-os-Linux
index 2c8a598..2968e0d 100644
--- a/arch/um/Makefile-os-Linux
+++ b/arch/um/Makefile-os-Linux
@@ -6,4 +6,7 @@
 # To get a definition of F_SETSIG
 USER_CFLAGS += -D_GNU_SOURCE -D_LARGEFILE64_SOURCE
 KBUILD_CFLAGS += -D_LARGEFILE64_SOURCE
+# disable compile-time buffer checks, enabled by default on Ubuntu 8.10
+# and later
+KBUILD_CFLAGS += $(call cc-option,-U_FORTIFY_SOURCE)
 DEV_NULL_PATH = \"/dev/null\"
-- 
1.7.4.1


------------------------------------------------------------------------------
EditLive Enterprise is the world's most technically advanced content
authoring tool. Experience the power of Track Changes, Inline Image
Editing and ensure content is compliant with Accessibility Checking.
http://p.sf.net/sfu/ephox-dev2dev
_______________________________________________
User-mode-linux-devel mailing list
User-mode-linux-devel@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/user-mode-linux-devel

Reply via email to