On Thu, Aug 6, 2015 at 7:02 PM, Khem Raj <raj.k...@gmail.com> wrote: > On Thu, Aug 6, 2015 at 12:41 PM, Andre McCurdy <armccu...@gmail.com> wrote: >> uclibc fails to build when security_flags.inc is used. >> >> | i686-rdk-linux-uclibc-gcc -m32 -march=core2 -mtune=core2 -msse3 >> -mfpmath=sse --sysroot=/build-vbox32/tmp/sysroots/vbox32-tcbootstrap >> -Wl,-EL -Wl,--sort-common -Wl,--sort-section=alignment -m32 -shared >> -Wl,--warn-common -Wl,--warn-once -Wl,-z,combreloc -Wl,-z,relro -Wl,-z,now >> -Wl,--hash-style=gnu -Wl,-z,defs -Wl,-init,__uClibc_init >> -Wl,-soname=libc.so.0 -nostdlib -o lib/libuClibc-0.9.34-git.so >> -Wl,--whole-archive libc/libc_so.a -Wl,--no-whole-archive ./lib/interp.os >> ./lib/ld-uClibc.so.0 ./lib/uclibc_nonshared.a >> /build-vbox32/tmp/sysroots/vbox32-tcbootstrap/usr/lib/i686-rdk-linux-uclibc/4.9.3/libgcc.a >> | libc/libc_so.a(sigaction.os): In function `__libc_sigaction': >> | >> /build-vbox32/tmp/work/core2-32-rdk-linux-uclibc/uclibc/0.9.33+gitAUTOINC+48a0006012-r9/git/libc/sysdeps/linux/i386/sigaction.c:37: >> undefined reference to `__stack_chk_guard' >> | >> /build-vbox32/tmp/work/core2-32-rdk-linux-uclibc/uclibc/0.9.33+gitAUTOINC+48a0006012-r9/git/libc/sysdeps/linux/i386/sigaction.c:49: >> undefined reference to `__stack_chk_fail_local' >> | collect2: error: ld returned 1 exit status >> | make: *** [lib/libc.so] Error 1 > > This fix is papering over real problem. this means gcc is expecting > ssp implementation from libc but is not detecting it rightly can you > try passing gcc_cv_libc_provides_ssp=yes to help it configure
OK, so I tried adding: export gcc_cv_libc_provides_ssp = 'yes' to gcc-configure-common.inc and uclibc does then seem to build OK without needing to provide uclibc specific SECURITY_CFLAGS. The build still fails later (gcc-runtime fails while configuring libgomp) but getting beyond building uclibc with security_flags.inc enabled seems like progress. >> >> Clearing SECURITY_CFLAGS completely may not be the best approach, but >> it's the approach taken for glibc, so try it for uclibc too. >> >> Signed-off-by: Andre McCurdy <armccu...@gmail.com> >> --- >> meta/conf/distro/include/security_flags.inc | 2 ++ >> 1 file changed, 2 insertions(+) >> >> diff --git a/meta/conf/distro/include/security_flags.inc >> b/meta/conf/distro/include/security_flags.inc >> index 3724972..a107657 100644 >> --- a/meta/conf/distro/include/security_flags.inc >> +++ b/meta/conf/distro/include/security_flags.inc >> @@ -84,6 +84,8 @@ SECURITY_CFLAGS_pn-python-smartpm = >> "${SECURITY_NO_PIE_CFLAGS}" >> SECURITY_CFLAGS_pn-python-numpy = "${SECURITY_NO_PIE_CFLAGS}" >> SECURITY_CFLAGS_pn-tcl = "${SECURITY_NO_PIE_CFLAGS}" >> SECURITY_CFLAGS_pn-tiff = "${SECURITY_NO_PIE_CFLAGS}" >> +SECURITY_CFLAGS_pn-uclibc = "" >> +SECURITY_CFLAGS_pn-uclibc-initial = "" >> SECURITY_CFLAGS_pn-valgrind = "${SECURITY_NO_PIE_CFLAGS}" >> SECURITY_CFLAGS_pn-webkit-gtk = "${SECURITY_NO_PIE_CFLAGS}" >> SECURITY_CFLAGS_pn-zlib = "${SECURITY_NO_PIE_CFLAGS}" >> -- >> 1.9.1 >> >> -- >> _______________________________________________ >> Openembedded-core mailing list >> Openembedded-core@lists.openembedded.org >> http://lists.openembedded.org/mailman/listinfo/openembedded-core -- _______________________________________________ Openembedded-core mailing list Openembedded-core@lists.openembedded.org http://lists.openembedded.org/mailman/listinfo/openembedded-core