This is the mail archive of the 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: Trying to cross-compile gcc 3.3.2 and glibc 2.3.2

Gregory Sacre wrote:
I'm trying to compile gcc 3.3.2 and glibc 2.3.2 for a cross-compile toolchain. I do these steps:
1. configure, make and make install binutils 2.14
2. configure, make install-headers glibc 2.3.2 to have headers to compile gcc 3.3.2
3. configure, make all-gcc and make install-gcc to have a bootstrap compiler
4. configure, make and make install for a complete glibc
5. configure, make and make install to have a complete gcc with c++ enabled.

The problem comes when I try to configure glibc after compiling the bootstrap (step 4). I have this message:

checking size of long double... configure: error: cannot compute sizeof (long double), 77

What did I do wrong? If it's needed, I can send the complete cross-compiling script with the options I'm using.
I work on a Gentoo box.

If I remember correctly this is actually a symptom of another more important problem. The problem isn't that it wasn't able to compute sizeof of something, it's that it tried to link a program and failed to do that because the crt1.o file it needs is only available after glibc is installed (you can verify this by looking in the config.log file and trying out by hand the command the configure script tries to run.) So what you need to do is to provide it both with --host=X and --build=Y. Since host != build, it won't try to link the test program and won't fail. That's not a guarantee that it'll actually fully build, but it's a start. In fact, the next thing you hit will probably be some sscanf definition problem. There's a patch within Dan's crosstool for this particular problem within the glibc-2.3.2 directory.

There's also a comment in crosstool about the sizeof error:
# Set --build, else glibc-2.3.2 will think you're not cross-compiling, and try to run the test program

Author, Speaker, Developer, Consultant
Pushing Embedded and Real-Time Linux Systems Beyond the Limits || || 1-866-677-4546

------ Want more information? See the CrossGCC FAQ, Want to unsubscribe? Send a note to

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