ld of gcc 64

Question about which tools to use, bugs, the best way to implement a function, etc should go here. Don't forget to see if your question is answered in the wiki first! When in doubt post here.
Post Reply
digo_rp
Member
Member
Posts: 233
Joined: Sun Jun 05, 2005 11:00 pm

ld of gcc 64

Post by digo_rp »

at my attemp of compile digos, I got this error, how do I compile my digos of 32bits kernel using 64 bits gcc under ubuntu 9.04 64bits ?

ld: i386 architecture of input file `strtoul.o' is incompatible with i386:x86-64 output
ld: i386 architecture of input file `pci32.o' is incompatible with i386:x86-64 output
ld: i386 architecture of input file `cmd.o' is incompatible with i386:x86-64 output
ld: i386 architecture of input file `svga.o' is incompatible with i386:x86-64 output
ld: i386 architecture of input file `svgalib.o' is incompatible with i386:x86-64 output
ld: i386 architecture of input file `gui.o' is incompatible with i386:x86-64 output
ld: i386 architecture of input file `guiapp1.o' is incompatible with i386:x86-64 output
ld: i386 architecture of input file `dia.o' is incompatible with i386:x86-64 output
ld: i386 architecture of input file `kstart.o' is incompatible with i386:x86-64 output
ld: i386 architecture of input file `lib.o' is incompatible with i386:x86-64 output
ld: i386 architecture of input file `pci32a.o' is incompatible with i386:x86-64 output
?? any help please?
User avatar
Troy Martin
Member
Member
Posts: 1686
Joined: Fri Apr 18, 2008 4:40 pm
Location: Langley, Vancouver, BC, Canada
Contact:

Re: ld of gcc 64

Post by Troy Martin »

-m32

EDIT: specifically on GCC.
Image
Image
Solar wrote:It keeps stunning me how friendly we - as a community - are towards people who start programming "their first OS" who don't even have a solid understanding of pointers, their compiler, or how a OS is structured.
I wish I could add more tex
pcmattman
Member
Member
Posts: 2566
Joined: Sun Jan 14, 2007 9:15 pm
Libera.chat IRC: miselin
Location: Sydney, Australia (I come from a land down under!)
Contact:

Re: ld of gcc 64

Post by pcmattman »

whowhatwhere
Member
Member
Posts: 199
Joined: Sat Jun 28, 2008 6:44 pm

Re: ld of gcc 64

Post by whowhatwhere »

For any multilib setup, CFLAGS += -m32 and LDFLAGS += -m elf_i386. This will compile correctly.
Otherwise you will need a crosscompiler.
Post Reply