This is the mail archive of the crossgcc@sourceware.org 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] |
Mark, All, On Monday 16 November 2009 14:47:48 St. Pierre, Mark wrote: > Hi Yann, sorry to bother you with possibly a basic question. Thank you > for your excellent work on Crosstool-NG, amazing job. This kind of queries are better directed at the crossgcc mailing list: crossgcc@sourceware.org > I need the toolchain to be built 64bit (x86_64) but be able to build 32 > and 64 bit applications (-m32 / - m64). This is called multi-lib, and crosstool-NG does not (yet?) supports that. Supporting multi-lib will require quite a bit of tunning and efforts, and I don't have much time for it, and _I_ don't really _need_ it. As, on my side, crosstool-NG is mostly driven by need, I won't/can't invest much time on it. If you (or someone else) is willing to tackle this subject, I will be glad to review and include patches! > I can build of for -m64 ok but > am having issues with -m32). I am hitting the following issues: > mstpierre.sbx5k-/tmp> > /tmp/x86_64-sonus-linux-gnu/bin/x86_64-sonus-linux-gnu-gcc -v -m32 -o > test test.c [--SNIP--] > /tmp/x86_64-sonus-linux-gnu/bin/../x86_64-sonus-linux-gnu//sys-root/usr/ > include/gnu/stubs.h:7:27: error: gnu/stubs-32.h: No such file or > directory > I fix that by coping in the 32bit headers If you copy it from your host, then you're doomed. At least, you should copy it from the same glibc as the one used to build your toolchain. > but then hit issues with the > linker not finding 32bit libs: Yes, the toolchain is not multi-lib aware. > mstpierre.sbx5k-/tmp> > /tmp/x86_64-sonus-linux-gnu/bin/x86_64-sonus-linux-gnu-gcc -v -m32 -o > test test.c [--SNIP--] > /tmp/x86_64-sonus-linux-gnu/bin/../lib/gcc/x86_64-sonus-linux-gnu/4.2.0/ > ../../../../x86_64-sonus-linux-gnu/bin/ld: skipping incompatible > /tmp/x86_64-sonus-linux-gnu/bin/../lib/gcc/x86_64-sonus-linux-gnu/4.2.0/ > libgcc.a when searching for -lgcc > /tmp/x86_64-sonus-linux-gnu/bin/../lib/gcc/x86_64-sonus-linux-gnu/4.2.0/ > ../../../../x86_64-sonus-linux-gnu/bin/ld: cannot find -lgcc > collect2: ld returned 1 exit status Your libgcc is 64-bit (which is normal, as you build for a 64-bit target). And because the toolchain is not multi-lib, the 32-bit libraries are not built. > Am I missing a config setting to support this. How do I best going about > building a toolchain that supports x86_64 and both -m32 and m64. Very > much appreciate any guidance you might be able to share. You can look at the archives, there has been some discussion on the subject some time ago. Also, if you want to tackle the sucker, you may want to have a look at the debian and embdebian toolchains, to see how they build theirs. Most of the work would end up in the C library/ies build scripts ( in scripts/build/libc/ ), the tweaking of gcc and binutils should be quite easy, if not straightforward. Regards, Yann E. MORIN. -- .-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 223 225 172 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | `------------------------------^-------^------------------^--------------------' -- For unsubscribe information see http://sourceware.org/lists.html#faq
Index Nav: | [Date Index] [Subject Index] [Author Index] [Thread Index] | |
---|---|---|
Message Nav: | [Date Prev] [Date Next] | [Thread Prev] [Thread Next] |