I have started into a uClibc version of hlfs on a
partition I wiped some windoze junk off. I nosedived in chapter 5
on the second build of gcc.
I am building the latest download of the SVN book, with a lfs-6.0
base system. Versions: gcc-3.4.1; kernel-2.6.12.1; glibc-2.3.4;
The gcc cross compile seemed fine, but I bombed out
after the make install, where some tests are done (to prove the
gcc you have just installed is awol:-/.)
>From <hlfs-book>/uclibc/chapter05/gcc.html
Now compile and run it with gcc: gcc -o test test.c
./test
This should return something like this
__guard = 0xbd06f7b2;
./test: stack smashing attack in function overflow()
Aborted
I got the '__guard' line followed by a segmentation fault line
On this bit
readelf -l test{,2} | grep -e ': /tools' -e 'Shared' \
-e 'GNU_RELRO' -e 'PAX_FLAGS'
I only got the first one, 'GNU_RELRO' as shown. But when I
reversed the two expressions, I got the other. I conclude it is
only giving me one for some bizzarre reason. As it seemed like a
grep issue, not a gcc issue, we proceeded.
readelf -d test{,2} | grep -e 'BIND_NOW' -e 'TEXTREL'
BIND_NOW did not exist. So I deleted the source and build
directories, started again and it came out worse, failing to
compile test.c So I deleted, presuming it was mucked up, and went
to try again.. I now fail every compile because ${target}-gcc
(i686-tools-linux-uclibc-gcc) can't compile conftest.c because it
isn't a [EMAIL PROTECTED] compiler, so configure thinks.
There's always a bit of snakes & ladders in LFS, and somehow I am
prepared for a few extra snakes in hlfs :-). Can we learn anything
from what I have before I wipe it? Can I get back to using the
'cross compile' compiler?
Presuming I wipe, can I run those tests on gcc _before_ installing
it? It seems weird to test it after installing it :-/.
--
With best Regards,
Declan Moriarty.
--
http://linuxfromscratch.org/mailman/listinfo/hlfs-dev
FAQ: http://www.linuxfromscratch.org/faq/
Unsubscribe: See the above information page