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: Trying to cross-compile gcc 3.3.2 and glibc 2.3.2


Karim Yaghmour wrote:
Gregory Sacre wrote:

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

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.

Probably http://kegel.com/crosstool/current/patches/glibc-2.3.2/sscanf.patch

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

Thanks as always to Karim for the good explanation; he definitely keeps more about this stuff in his head than I do (or can)!

One interesting bit of trivia: unless you patch config.sub,
you can't supply host != build for architectures with only
one known vendor.  This is by design; the maintainer of config.sub
frowns on how I ensure host != build, and prefers that I fix
gcc and glibc's configuration system to detect cross-compiling
some other way.  He's right, but ouch...
- Dan

--
My technical stuff: http://kegel.com
My politics: see http://www.misleader.org for examples of why I'm for regime change

------
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]