/tools requirements

Robert Connolly robert at linuxfromscratch.org
Sun Oct 11 17:25:15 PDT 2009


Disregard this note. I'm not sure it's valid.

I found the problem was with simply adding -pie to the "+link" rule in 
configparams in Glibc. Copying/replacing "+link-pie" rules/commands 
to "+link" solved this problem.

robert

On Friday October 9 2009 10:44:13 pm Robert Connolly wrote:
> I'm starting this thread as a note list. This is a bit different than
> the "hlfs to clfs builds" thread, that related to issues
> building /cross-tools and /tools from an hlfs host.
>
> I'm trying to harden x86_64 from the clfs chroot. I didn't harden /tools.
>
> For Glibc applications, like iconv_prog, to build
> with -fPIE -pie, "/tools/lib/gcc/whatever-unknown-linux-gnu/?.?.?/crtend.o"
> needs to be built with -fPIC... /tools GCC needs to be compiled with -fPIC.
>
> So:
> cp -vi gcc/config/i386/linux.h{,.orig}
> sed 's/^\(#define CC1_SPEC.*\)\("\)$/\1 %{fno-pic|fpic|fPIC:;:-fPIC}\2/' \
>     gcc/config/i386/linux.h.orig > gcc/config/i386/linux.h
> ... or
> cp -vi gcc/config/i386/x86-64.h{,.orig}
> sed 's/^\(#define CC1_SPEC.*\)\("\)$/\1 %{fno-pic|fpic|fPIC:;:-fPIC}\2/' \
>         gcc/config/i386/x86-64.h.orig > gcc/config/i386/x86-64.h
> ... or add -fPIC to CFLAGS for GCC
> ... or use all of the above.
>
> I doubt there will be more notes to add to this thread, but I'll add them
> if found.
>
> robert


-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 197 bytes
Desc: not available
URL: <http://lists.linuxfromscratch.org/pipermail/hlfs-dev/attachments/20091011/3103e994/attachment.sig>


More information about the hlfs-dev mailing list