Kevin Day wrote:
> On 1/26/07, Charity <[EMAIL PROTECTED]> wrote:
>
>> 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.
>>
>> After some more research, it seems that something is going wrong with
>> the first gcc build or glibc is not being linked to properly. I know
>> HLFS is in development, but the link to the old stable version of the
>> book is broken. I'm going to try rebuilding gcc after each step just to
>> see if it builds. This should work right? If bootstrapping builds the
>> compiler once, uses the first build to build a second and the second to
>> build a third for comparison, then the compiler should be able to be
>> built after the installation?
>>
>
> gcc (4.1) hardcodes both -lssp and -lssp_nonshared when
> -fstack-protector is passed.
> Instead of letting the linker decide on whether you are using
> libssp.so and libssp.a they felt the need to explicitly identify them
> as different.
> My approach was to use the patch below and rename
> lib/libssp_nonshared.a to lib/libssp.a so that if for any reason I
> needed libssp.a (such as gcc -static) I would be able to do such and
> the linker would know what to do.
>
> gcc-4.1.1-no_static_ssp-1.patch:
> http://linuxfromscratch.org/pipermail/hlfs-dev/attachments/20060616/6736bfa4/attachment-0001.bin
>
>
That's not the whole problem. It can't find -lssp either. It's just
that -lssp_nonshared happens to be listed first in the specs file. I'm
trying a new approach. I can't get the whole toolchain to build at once
after it's installed no matter what I try. It seems to mess up the
linking. I'm trying to follow the seperate build instructions just using
the newer gcc and binutils. Then I noticed the gcc build instructions
say it needs gmp and mpfr. It may not be absolutely needed, but it does
get rid of the error in the configure stage.
--
http://linuxfromscratch.org/mailman/listinfo/hlfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page