From: Henry N. <hen...@ar...> - 2010-06-26 11:58:49
|
Ubuntu 9.04 (Debian 5.0) has gcc 4.3.3 with 64 bit support. You needs to install package libc6-dev-amd64, than "gcc -m64 ..." works. An image Ubuntu 9.04 for coLinux exist on SF: http://sourceforge.net/projects/colinux/files/Images%202.6.x%20Ubuntu/Ubuntu%209.04/ A link to image Ubuntu 9.10 exist in Wiki: http://colinux.wikia.com/wiki/UbuntuKarmic -- Henry On 26.06.2010 11:06, Paolo Minazzi wrote: > It is not so simple to generate 64bit code on a 32bit system. > I have tried both gcc 3.4.3 and a gcc 4.1.2 version. > Probably these compiler are not build enabling 64bit. > I have always this message: > > gcc p.c -m64 > ======> p.c:1: sorry, unimplemented: 64-bit mode not compiled in > p.c: In function `main': > p.c:4: warning: return type of 'main' is not `int' > > I have found several reference in google about this message, but not a > simple solution. > > A possibiliy is to use the Henry script build_cross.sh and substitute > --target=xxxx. > xxx should be x86_64 or something else. > > Probably (I'm not sure) we need to build a cross compiler. > > Paolo > > On Fri, Jun 25, 2010 at 10:44 PM, Henry Nestler<hen...@ar...> wrote: >> Currently the gcc is forced to build a 32 bit Linux kernel with the option >> "ARCH=i386" in the call "make ... vmlinux". We need this to build coLinux >> for 32 bit on 64 bit platforms. >> >> Maybe a "ARCH=x86_64" can force the other way for you? >> >> The option '-m64' exist also in source of gcc 3.4.5, see that changelog: >> 2004-02-18 Jakub Jelinek<ja...@re...> >> >> * config/i386/i386.c (override_options): Don't imply 3DNow! for -m64 >> by default. >> >> ... and more ... >> >> The default GCC inside a 32 bit system has mostly not enabled the 64 bit >> option? >> >> -- >> Henry >> >> On 25.06.2010 10:22, Paolo Minazzi wrote: >>> I try to answer myself. >>> gcc 4.0 can produce also 64bit code (I have read -m64 option or >>> arch=x86_64) >>> It seems gcc 3.x cannot do it. >>> >>> On my linux native I have a gcc 3.x, so colinux kernel_64bit is not >>> compiled in 64bit mode. >>> >>> I will check it. >>> Paolo >>> >>> >>> >>> >>> On Fri, Jun 25, 2010 at 8:53 AM, Paolo Minazzi<pao...@gm...> >>> wrote: >>>> Hi Henry, >>>> I have tried to use your devel-64bit packages on my 32bit linux system. >>>> All compiling process is OK. >>>> To understand 64bit internal (IDT and memory management) I'd like to >>>> test a linux native 64bit on a qemu-64bit. >>>> But I need gcc 64bit. >>>> >>>> My gcc produce 32bit code. Is there some option ? >>>> I have see that your 64bit package compile linux kernel. But it uses >>>> gcc. And my gcc is 32bit. >>>> >>>> Thanks, >>>> Paolo |