How do i build the toolchain whithout ssp from a host with ssp?

Jonas Norlander jonas.norlander at ovikonline.com
Fri Apr 16 16:04:43 PDT 2004


On Fri, Apr 16, 2004 at 04:28:42PM -0400, Robert Connolly wrote:
> On April 16, 2004 09:43 am, Jonas Norlander wrote:
> > On Fri, Apr 16, 2004 at 07:13:18AM -0400, Robert Connolly wrote:
> > > On April 16, 2004 03:45 am, Jonas Norlander wrote:
> > > > On Thu, Apr 15, 2004 at 05:42:19PM -0400, Robert Connolly wrote:
> > > > > I should also add. If you simply dont use any ssp patches, gcc pass 1
> > > > > will escape it, so uclibc or whatever in chapter 5 should not get any
> > > > > ssp related errors.
> > > >
> > > > So what are you saing, that if I dont use any flags
> > > > (-fno-stack-protector) or ssp patches in chapter 5 I should have a
> > > > clean toolchain for chapter 6 without ssp?
> > >
> > > If you don't use any ssp patches nothing after gcc pass 1 should have any
> > > propolice in it.
> >
> > I have tried compile without patches and flags but i cant get past
> > "Installing GCC-3.3.2 - Pass 1".
> > It looks like the problem is related to that __guard_setup and
> > __stack_smash_handler is included in static builds, and when gcc
> > comes to stage2 it cant for some reason find those symbols.
> 
> make BOOT_CFLAGS="-fno-stack-protector -O2"
With this i get to stage2 then it errors out.

cc1: error: unrecognized option `-fno-stack-protector'
make[2]: *** [gengenrtl.o] Error 1
make[2]: Leaving directory `/mnt/lfs/sources/gcc-build/gcc'
make[1]: *** [stage2_build] Error 2
make[1]: Leaving directory `/mnt/lfs/sources/gcc-build/gcc'
make: *** [bootstrap] Error 2
 
> You will only want that flag for the stage1 gcc.
> 
> > I built this system with the first version of the propolice hint.
> 
> Did you use a glibc propolice patch too? Check with:
> objdump -d /lib/libc.so.6 | grep guard

By that time there was no glibc patch i think. At least I cant find any
in my archive or logs. This is the patches i used
(the date in them are 2003-11-21):

[root at venus /tmp]# ls -l /home/lfs/misc-src/propolice/
total 420
-rw-rw-r--    1 root     root       102101 Nov 21 17:28 gcc-2.95.3-protector_only.patch
-rw-rw-r--    1 root     root       101014 Nov 21 17:27 gcc-3.3.2-protector_only.patch

[root at venus /tmp]# objdump -d /lib/libc.so.6 | grep guard
00111b30 <__guard_setup>:
  111b54:       74 0d                   je     111b63 <__guard_setup+0x33>
  111b7c:       74 2a                   je     111ba8 <__guard_setup+0x78>
  111ba6:       74 ae                   je     111b56 <__guard_setup+0x26>
  111bbd:       eb 97                   jmp    111b56 <__guard_setup+0x26>

> 
> Does your 'gcc -v' say propolice_only? (That would explain why your specs file 
> was clean).

Yes I used the propolice_only if I remember correctly.

[jonas at venus ~]$ gcc -v
Reading specs from /usr/lib/gcc-lib/i686-pc-linux-gnu/3.3.2/specs
Configured with: ../gcc-3.3.2/configure --prefix=/usr --enable-shared --enable-threads=posix --enable-__cxa_atexit --enable-clocale=gnu --enable-languages=c,c++
Thread model: posix
gcc version 3.3.2 (Propolice Only 3.3-5)


I start to think that my system cant build a new system without propolice.

Thanks 
Jonas


-------------- next part --------------
A non-text attachment was scrubbed...
Name: smime.p7s
Type: application/x-pkcs7-signature
Size: 1963 bytes
Desc: not available
URL: <http://lists.linuxfromscratch.org/pipermail/hlfs-dev/attachments/20040417/04e1325c/attachment.bin>


More information about the hlfs-dev mailing list