This is the mail archive of the crossgcc@sources.redhat.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more information.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Console trouble with glibc compiled with gcc-3.4.x


Martin Schaffner wrote:
I am maintaining the Linux from Scratch Hint "LFS from OSX" (http://mirror.vtx.ch/lfs/hints/downloads/files/lfs-from-osx.txt). I tried cross-compiling glibc-2.3.2 using Mac OS X as build for a GNU/Linux/PPC host. I use crosstool-0.28-rc28 available from http://kegel.com/crosstool
If I compile glibc-2.3.2 using gcc-3.3.3, everything is OK.
If I compile glibc-2.3.2 using gcc-3.4.0 or gcc-3.4.1, then the console is broken: It doesn't display the bash prompt, and it echoes input but doesn't process it (like after typing `cat > /dev/null`).


What I found out later:
glibc-build is 488M after compiling with gcc-3.3.3 but only 198M
after compiling with gcc-3.4.1. The difference is distributed
evenly among the subdirectories. This convinces me that the problem is in glibc.

Dan Kegel wrote:
How about testing chimeric glibc's, i.e. ones compiled half
with gcc-3.3.3, half with gcc-3.4.1?  You could do that
by hitting ^C partway through the build and changing the PATH,
I imagine.  (Or by selectively removing .o's and rerunning the build.)
This ought to let you zero in on what part of glibc is being
miscompiled...
- Dan

Ryan Oliver wrote:
Did you build bash static or shared?

I narrowed down the problem:
I built bash statically by adding the following to the final link command that creates "bash":
-static -nostdlib /tools333/lib/{crt?.o,libc.a,gcc-lib/powerpc-750-linux-gnu/3.3.3/nof/ libgcc.a}


This gives an executable for which "readelf" tells me that it does not require an interpreter (like /tools/lib/ld.so.1)

But when I boot with init=/bash, the console works only if /lib/libc-2.3.2.so is compiled with gcc-3.3.3, not with gcc-3.4.1. I uploaded these two files, as well as my "static" bash:
http://membres.lycos.fr/schaffner/prog/libc-2.3.2.so-compiledwith- gcc333.bz2
http://membres.lycos.fr/schaffner/prog/libc-2.3.2.so-compiledwith- gcc341.bz2
http://membres.lycos.fr/schaffner/prog/bash.bz2


The first remarkable thing is that the version compiled with 3.4.1 is ~ 30 MB, but the other version is only ~ 11 MB.




I have a second problem with my LFS-from-OSX effort: Once I booted into the system in /tools, most things work, but if I try to compile a "hello world", I get:
/tools/bin/gcc-lib/powerpc-750-linux-gnu/3.3.3/../../../../powerpc-750- linux-gnu/bin/ld: cannot open crt1.o: No such file or directory
collect2: ld returned 1 exit status


I tried with ld compiled with both LIB_PATH=/tools/lib and with no LIB_PATH, but saw no difference.

The file /tools/lib/crt1.o exists, but is not obviously not found by ld. --verbose gives me:
Reading specs from /tools/lib/gcc-lib/powerpc-750-linux-gnu/3.3.3/specs
[...]
/tools/lib/gcc-lib/powerpc-750-linux-gnu/3.3.3/../../../../powerpc-750- linux-gnu/bin/as -mppc -V -Qy -o ./cc6iQp8l.o ./cclzxxOd.s
GNU assembler version 2.14 (powerpc-750-linux-gnu) using BFD version 2.14 20030612
/tools/lib/gcc-lib/powerpc-750-linux-gnu/3.3.3/collect2 --eh-frame-hdr -V -Qy -m elf32ppclinux -dynamic-linker /lib/ld.so.1 -o h crt1.o crti.o /tools/lib/gcc-lib/powerpc-750-linux-gnu/3.3.3/crtbegin.o -L/tools/lib/gcc-lib/powerpc-750-linux-gnu/3.3.3 -L/tools/lib/gcc-lib/powerpc-750-linux-gnu/3.3.3/../../../../powerpc -750-linux-gnu/lib ./cc6iQp8l.o -lgcc -lgcc_eh -lc -lgcc -lgcc_eh /tools/lib/gcc-lib/powerpc-750-linux-gnu/3.3.3/crtsavres.o /tools/lib/gcc-lib/powerpc-750-linux-gnu/3.3.3/crtend.o crtn.o
/tools/lib/gcc-lib/powerpc-750-linux-gnu/3.3.3/../../../../powerpc-750- linux-gnu/bin/ld: cannot open crt1.o: No such file or directory
GNU ld version 2.14 20030612
Supported emulations:
elf32ppclinux
elf32ppc
elf32ppcsim
collect2: ld returned 1 exit status



-- Martin


------ Want more information? See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/ Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]