booleandomain wrote: >> This is the relevant part of config.log: >> >> /usr/lib/gcc/x86_64-pc-linux-gnu/4.3.3/../../../../x86_64-pc-linux-gnu/bin/ld: >> >> warning: cannot find entry symbol _start; defaulting to 0000000000400120 >> configure:3206: $? = 0 >> configure:3244: result: a.out >> configure:3263: checking whether the C compiler works >> configure:3273: ./a.out >> .../bash-4.0/configure: line 3275: 11682 Segmentation fault >> ./$ac_file >> configure:3277: $? = 139 >> configure:3284: error: in >> `/home/booleandomain/tmp/lfs/sources/bash-build': >> configure:3288: error: cannot run C compiled programs. >> If you meant to cross compile, use `--host'. >> See `config.log' for more details. > > I tried the following thing: > > $ echo "int main(){}" > dummy.c > $ gcc dummy.c -nostdlib -L/tools/lib > /usr/lib/gcc/x86_64-pc-linux-gnu/4.3.3/../../../../x86_64-pc-linux-gnu/bin/ld: > warning: cannot find entry symbol _start; defaulting to 0000000000400120 > $ ./a.out > Segmentation fault > > So it seems it is not finding some required libraries... > Okay, it is missing the crt1.o which is usually in /usr/lib. But, I did not read the -nostdlib option completely and carefully. It means that none of the standard libraries are passed to the linker. I just thought that I will not search the standard libraries. Sorry for this. So, you should need use the -nostdlib option. :)