This is the mail archive of the crossgcc@sourceware.org mailing list for the crossgcc project.

See crosstool-NG 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]

How to generate a cross gcc toolchain that accepts both -m32 and -m64 compiler option?


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


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