* How to generate a cross gcc toolchain that accepts both -m32 and -m64 compiler option?
@ 2014-11-19 16:47 Jimm Chen
2014-11-22 20:46 ` Thomas Petazzoni
0 siblings, 1 reply; 3+ messages in thread
From: Jimm Chen @ 2014-11-19 16:47 UTC (permalink / raw)
To: crossgcc
Using crosstool-ng 1.20, I've managed to build a gcc 4.8.3 cross
compiler on openSUSE 12.3(32-bit) that is targeted at x86_64(x64)
linux. The CT-NG tool is a life saver. However, I have a question. the
generated compiler x86_64-pc-linux-gnu-gcc can only produce x64
executables. When I try to do
x86_64-pc-linux-gnu-gcc -m32 hello.c
I got error message like:
/home/chj/x-tools/.../sysroot/usr/include/gnu/stubs.h:7:27: fatal
error: gnu/stubs-32.h: No such file or directory
# include <gnu/stubs-32.h>
^
compilation terminated.
You know, on an openSUSE Linux 64-bit distribution, we can use -m64 to
produce 64-bit image and -m32 to produce 32-bit image. Can someone
tell me how to achieve that functionality with CT-NG generated
toolchain?
--
For unsubscribe information see http://sourceware.org/lists.html#faq
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How to generate a cross gcc toolchain that accepts both -m32 and -m64 compiler option?
2014-11-19 16:47 How to generate a cross gcc toolchain that accepts both -m32 and -m64 compiler option? Jimm Chen
@ 2014-11-22 20:46 ` Thomas Petazzoni
2014-11-23 3:25 ` Bryan Hundven
0 siblings, 1 reply; 3+ messages in thread
From: Thomas Petazzoni @ 2014-11-22 20:46 UTC (permalink / raw)
To: Jimm Chen; +Cc: crossgcc
Dear Jimm Chen,
On Thu, 20 Nov 2014 00:47:37 +0800, Jimm Chen wrote:
> Using crosstool-ng 1.20, I've managed to build a gcc 4.8.3 cross
> compiler on openSUSE 12.3(32-bit) that is targeted at x86_64(x64)
> linux. The CT-NG tool is a life saver. However, I have a question. the
> generated compiler x86_64-pc-linux-gnu-gcc can only produce x64
> executables. When I try to do
>
> x86_64-pc-linux-gnu-gcc -m32 hello.c
>
> I got error message like:
>
> /home/chj/x-tools/.../sysroot/usr/include/gnu/stubs.h:7:27: fatal
> error: gnu/stubs-32.h: No such file or directory
> # include <gnu/stubs-32.h>
> ^
> compilation terminated.
>
> You know, on an openSUSE Linux 64-bit distribution, we can use -m64 to
> produce 64-bit image and -m32 to produce 32-bit image. Can someone
> tell me how to achieve that functionality with CT-NG generated
> toolchain?
You need to look at something called "multilib support". I don't
remember if Crosstool-NG has added multilib support. Last time I
looked, it didn't had multilib support, but maybe it has changed since
then.
Best regards,
Thomas
--
Thomas Petazzoni, CTO, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
--
For unsubscribe information see http://sourceware.org/lists.html#faq
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How to generate a cross gcc toolchain that accepts both -m32 and -m64 compiler option?
2014-11-22 20:46 ` Thomas Petazzoni
@ 2014-11-23 3:25 ` Bryan Hundven
0 siblings, 0 replies; 3+ messages in thread
From: Bryan Hundven @ 2014-11-23 3:25 UTC (permalink / raw)
To: Thomas Petazzoni
Cc: Jimm Chen, crossgcc maillist, Yann E. MORIN, Ray Donnelly
Jimm, Thomas,
On Sat, Nov 22, 2014 at 12:45 PM, Thomas Petazzoni
<thomas.petazzoni@free-electrons.com> wrote:
> Dear Jimm Chen,
>
> On Thu, 20 Nov 2014 00:47:37 +0800, Jimm Chen wrote:
>> Using crosstool-ng 1.20, I've managed to build a gcc 4.8.3 cross
>> compiler on openSUSE 12.3(32-bit) that is targeted at x86_64(x64)
>> linux. The CT-NG tool is a life saver. However, I have a question. the
>> generated compiler x86_64-pc-linux-gnu-gcc can only produce x64
>> executables. When I try to do
>>
>> x86_64-pc-linux-gnu-gcc -m32 hello.c
>>
>> I got error message like:
>>
>> /home/chj/x-tools/.../sysroot/usr/include/gnu/stubs.h:7:27: fatal
>> error: gnu/stubs-32.h: No such file or directory
>> # include <gnu/stubs-32.h>
>> ^
>> compilation terminated.
>>
>> You know, on an openSUSE Linux 64-bit distribution, we can use -m64 to
>> produce 64-bit image and -m32 to produce 32-bit image. Can someone
>> tell me how to achieve that functionality with CT-NG generated
>> toolchain?
>
> You need to look at something called "multilib support". I don't
> remember if Crosstool-NG has added multilib support. Last time I
> looked, it didn't had multilib support, but maybe it has changed since
> then.
Correct. Crosstool-NG currently does not have multilib support.
Last commit to Yann's repository was back in September:
http://crosstool-ng.org/git/crosstool-ng/log/
There are a lot of patches waiting to be applied:
https://patchwork.ozlabs.org/project/crosstool-ng/list/
Ray Donnelly and I started to work on multilib support, but I stopped
sending patches when Yann stopped applying them. Some of the patches
in the patchwork list no longer apply correctly and need to be resent.
I hope Crosstool-NG keeps going.
-Bryan
--
For unsubscribe information see http://sourceware.org/lists.html#faq
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2014-11-23 3:25 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2014-11-19 16:47 How to generate a cross gcc toolchain that accepts both -m32 and -m64 compiler option? Jimm Chen
2014-11-22 20:46 ` Thomas Petazzoni
2014-11-23 3:25 ` Bryan Hundven
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).