Problem compiling native GCC - cannot execute binary file error

Gour gour@mail.inet.hr
Fri Apr 4 10:48:00 GMT 2003


Hi!

I'm a newbie in the cross-compiling world, but following tips from the
ml archive & using the cross-build I built cross-compiler on my Linux
box for mingw32msvc target.

By using this toolchain I also compiled Ruby 1.6.8 and tested its
execution under Win98 platform.

Since I'm having problems cross-compiling Ruby 1.8.0 on my Linux box,
I'd like to produce native tools with the built toolchain.

The native version of binutils are built, but I have problem building
GCC.

I use cross-configure & cross-make scripts, and I get the following
error when running cross-make:

<snip>

make[1]: Entering directory
`/home/ggd/cross/source/gcc-2.95.3-8-20020922-1/gcc'
(cd intl && make all)
make[2]: Entering directory
`/home/ggd/cross/source/gcc-2.95.3-8-20020922-1/gcc/intl'
make[2]: Nothing to be done for `all'.
make[2]: Leaving directory
`/home/ggd/cross/source/gcc-2.95.3-8-20020922-1/gcc/intl'
gcc -c  -DIN_GCC    -g -O2
-DCYGWIN_CROSS_DIR=\"/opt/pkgs/epkg/encap/MinGW/i686-mingw32msvc\" -I.
-I. -I./config -I./../include \
  ./gencheck.c
gcc  -DIN_GCC    -g -O2   -o gencheck \
 gencheck.o ` case "obstack.o" in ?*) echo i686-pc-linux-gnu-obstack.o
;; esac ` ` case "" in ?*) echo i686-pc-linux-gnu- ;; esac ` ` case ""
in ?*) echo i686-pc-linux-gnu- ;; esac `  ` case "" in ?*) echo
i686-pc-linux-gnu- ;; esac ` ` case "" in ?*) echo i686-pc-linux-gnu- ;;
esac `
./gencheck > tmp-check.h
/bin/sh: ./gencheck: cannot execute binary file
make[1]: *** [s-check] Error 126
make[1]: Leaving directory
`/home/ggd/cross/source/gcc-2.95.3-8-20020922-1/gcc'
make: *** [all-gcc] Error 2
ggd@gaura:~/cross/source/gcc-2.95.3-8-20020922-1>


gencheck binary is present, but it is a native Win application which, of
course, cannot be executed on my i686 Linux box.

What is the procedure to build GCC?

I have found several post in the ml archive with the same & or similar
problem (just another binaries), but didn't found any solution.

Any hint?

Sincerely,
Gour

-- 
Gour
gour@mail.inet.hr
Registered Linux User #278493


------
Want more information?  See the CrossGCC FAQ, http://www.objsw.com/CrossGCC/
Want to unsubscribe? Send a note to crossgcc-unsubscribe@sources.redhat.com



More information about the crossgcc mailing list