0

I am trying to use Circle CI(github auto build/testing) to build my operating system for i386(32bit) and Circle CI seems to use 64 bit. Normally i use a pre compiled cross-toolchain but my code can also compile on a plain 32-bit linux gcc...

The error from Circle CI is as follows.

ld -Tlink.ld -arch=i386 -o ~/WaspOS/bin/WaspOS.bin boot.o ./initScreenFunc.o ./kernel.o ./stdio.o #
ld: i386 architecture of input file `boot.o' is incompatible with i386:x86-64 output
ld: i386 architecture of input file `./initScreenFunc.o' is incompatible with i386:x86-64 output
ld: i386 architecture of input file `./kernel.o' is incompatible with i386:x86-64 output
ld: i386 architecture of input file `./stdio.o' is incompatible with i386:x86-64 output

So my main question is how do I get Cirlce CI to use a 32-bit toolchain or do I have to upload all of my cross-toolchain to get this to work?

Thanks in advance

grantperry
  • 139
  • 4
  • 18
  • 1
    Did you compile your c files to object files using the `-m32` option? . Have you tried _LD_ with `-melf_i386` ? – Michael Petch Sep 15 '16 at 04:05
  • @MichaelPetch Hi thankyou, I will have a go at this now – grantperry Sep 15 '16 at 04:06
  • And if you assemble directly with GNU assembler `as` then you'd need the `--32` option. If using NASM to assemble you'd need `-f elf32` option . Hard to tell since we don't know which tools you actually use. You may use neither, and then this comment wouldn't apply. – Michael Petch Sep 15 '16 at 04:14

0 Answers0