[PATCH] build error: 2.6.17-rc5

Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]
From: Tej
Date: Wednesday, October 22, 2008 - 1:01 pm

observed following build error for 2.6.17-rc5 kernel (git repo)

<---snip---->
/opt/Testing/Tools/linux-2.6/init/do_mounts.c:115: undefined reference
to `__stack_chk_fail'
init/built-in.o: In function `name_to_dev_t':
/opt/Testing/Tools/linux-2.6/init/do_mounts.c:206: undefined reference
to `__stack_chk_fail'
init/built-in.o: In function `change_floppy':
/opt/Testing/Tools/linux-2.6/init/do_mounts.c:363: undefined reference
to `__stack_chk_fail'
init/built-in.o: In function `mount_block_root':
/opt/Testing/Tools/linux-2.6/init/do_mounts.c:321: undefined reference
to `__stack_chk_fail'
init/built-in.o: In function `do_header':
/opt/Testing/Tools/linux-2.6/init/initramfs.c:206: undefined reference
to `__stack_chk_fail'
arch/i386/kernel/built-in.o:/opt/Testing/Tools/linux-2.6/arch/i386/kernel/ptrace.c:634:
more undefined references to `__stack_chk_fail' follow
make: *** [.tmp_vmlinux1] Error 1

attached patch solve problem, which seems to be obvious by looking at
defination of "__stack_chk_fail" with subsequent kernel versions.

Signed-off-by: Tej Parkash <bewith.tej@gmail.com>

diff --git a/Makefile b/Makefile
index 435d209..d2afeea 100644
--- a/Makefile
+++ b/Makefile
@@ -306,7 +306,7 @@ LINUXINCLUDE    := -Iinclude \
 CPPFLAGS        := -D__KERNEL__ $(LINUXINCLUDE)

 CFLAGS                 := -Wall -Wundef -Wstrict-prototypes -Wno-trigraphs \
-                  -fno-strict-aliasing -fno-common
+                  -fno-strict-aliasing -fno-common -fno-stack-protector
 AFLAGS         := -D__ASSEMBLY__

 # Read KERNELRELEASE from .kernelrelease (if it exists)
--
Previous message: [thread] [date] [author]
Next message: [thread] [date] [author]

Messages in current thread:
[PATCH] build error: 2.6.17-rc5, Tej, (Wed Oct 22, 1:01 pm)