|
HLFS glibc-2.5 and ssp
I'm trying to at least get started on the development HLFS since the original link for the old version has been broken for awhile. I get stuck on Chapter 5.9 The Cocoon Toolchain. Since the mailing list won't accept my posts, I thought I'd try here.
It seems that the hardened specs file is causing the build to fail due to a failure in adjusting the toolchain or the host system not having some variables defined.
../../cocoon-toolchain/gcc/hardened-specs.h:48:2: error: #error "You are using an unsupported system. This header can not be used."
That is the line of interest. I've found the statement that causes this.
#if defined(__i386__) && defined(__linux__) && defined(__ELF__) \
&& defined(HAVE_LD_PIE) && defined(TARGET_LIBC_PROVIDES_SSP)
So, I broke it down like this..
#if defined(__i386__)
#else
#error "i386 not defined"
#endif
#if defined(__linux__)
#else
#error "linux not defined"
#endif
#if defined(__ELF__)
#else
#error "ELF not defined"
#endif
#if defined(HAVE_LD_PIE)
#else
#error "HAVE_LD_PIE not defined"
#endif
#if defined(TARGET_LIBC_PROVIDES_SSP)
#else
#error "TARGET_LIBC_PROVIDES_SSP not defined"
#endif
Which results in the following error
In file included from ../../cocoon-toolchain/gcc/gcc.c:553:
../../cocoon-toolchain/gcc/hardened-specs.h:26:2: error: #error "TARGET_LIBC_PROVIDES_SSP not defined"
This is because -fstack-protector is failing. SSP is not built in the first gcc build. Support for it is supposed to be built into glibc-2.5, however, after some checking, it tells me "cannot find -lssp_nonshared" whenever I try to compile something with -fstack-protector. That means that gcc supports it, but it is not installed. How can I be sure it is installed in glibc? I made sure I am using the newly compiled gcc and the linker seems to be the new glibc.
|