I can not build uclibc 0.9.33.2 when stack smashing protection is activated and
GCC 4.7.x is selected. The build fails as follow:
STRIP -x -R .note -R .comment libc/libc_so.a
libc/libc_so.a(fnmatch.os):(.text+0xe0): undefined reference to `__stack_chk_guard'
collect2: error: ld returned 1 exit status
If GCC 4.6.x is selected, everything is fine.
Commit 2babed4a50fcd050abc4686e05e24d0e374d10a8 introduces the following change
-# Before uClibc is built, we must have the second stage cross-compiler
+# Before uClibc is built, we must have the second stage
+# cross-compiler, for some gcc versions, and when NPTL is used.
+uclibc-build: $(if $(BR2_TOOLCHAIN_NEEDS_THREE_STAGE_BUILD),host-gcc-intermediate)
So, with GCC 4.6.x BR2_TOOLCHAIN_NEEDS_THREE_STAGE_BUILD is set to 'y' and the
dependency to host-gcc-intermediate is added, but not with GCC 4.7.x. Forcing
the dependency (as it was before) fixes the issue.
I attached my defconfig. Did anyone else experienced this problem?
Re: uClibc fails to build with stack smash protection
Dear Eric Le Bihan,
On Mon, 16 Sep 2013 16:25:02 +0200, Eric Le Bihan wrote:
> I can not build uclibc 0.9.33.2 when stack smashing protection is activated and
> GCC 4.7.x is selected. The build fails as follow:
> STRIP -x -R .note -R .comment libc/libc_so.a
> LD libuClibc-0.9.33.2.so
> libc/libc_so.a(fnmatch.os):(.text+0xe0): undefined reference to `__stack_chk_guard'
> collect2: error: ld returned 1 exit status
Hum, interesting, I am not reproducing the exact same problem (but I
was testing on ARM, with a slightly different defconfig). I believed
I've fixed the problem I was seeing. I've now started a build with your
defconfig, to see if I reproduce the same problem.