public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
* Cross compiler (i386 target on x86_64 machine)
@ 2009-07-24 14:08 Mark Ryden
  2009-07-24 20:25 ` Khem Raj
  0 siblings, 1 reply; 4+ messages in thread
From: Mark Ryden @ 2009-07-24 14:08 UTC (permalink / raw)
  To: crossgcc

Hello,

 I am trying to use a cross compiler tool in order to build a 386
gcc compiler on an x86_64 machine (both Intel).

I found this project: git://git.infradead.org/users/segher/buildall.git

I git clone the sources from this URL,
and configured it according to the source I need:
binutils-2.18.50.0.6, gcc-4.3.0-20080428 and linux-2.6.25. (these are
the versions
for Fedora 9, where I want to insmod my module).

My aim is to be able to build a module with the cross compiler in x86_64
so that I can insmod it on a 32 bit Intel machine.

So I configured the config file and ran:

./build i386
And it was ok:

Building i386... (target i386-linux)
 binutils: configure [00:03] build [00:51] install [00:04]
 gcc: configure [00:07] build [01:36] install [00:04]
 kernel: configure [00:01] build [03[15:54]  26 warnings  OK



 Now I tried to build a simple HelloWorld file. I got this error message:

make  -C /work/rpmbuild/BUILD/kernel-2.6.25/linux-2.6.25.i686
SUBDIRS=/work/dev/tests/kernel/helloWorld modules
make[1]: Entering directory
`/work/rpmbuild/BUILD/kernel-2.6.25/linux-2.6.25.i686'

 ERROR: Kernel configuration is invalid.
        include/linux/autoconf.h or include/config/auto.conf are missing.
        Run 'make oldconfig && make prepare' on kernel src to fix it.


 WARNING: Symbol version dump
/work/rpmbuild/BUILD/kernel-2.6.25/linux-2.6.25.i686/Module.symvers
          is missing; modules will have no dependencies and modversions.

 CC [M]  /work/dev/tests/kernel/helloWorld/helloWorld.o
gcc: error trying to exec 'cc1': execvp: No such file or directory
make[2]: *** [/work/dev/tests/kernel/helloWorld/helloWorld.o] Error 1
make[1]: *** [_module_/work/dev/tests/kernel/helloWorld] Error 2
make[1]: Leaving directory
`/work/rpmbuild/BUILD/kernel-2.6.25/linux-2.6.25.i686'
make: *** [default] Error 2


I beleieve that it can be that some little thing should be
added/changed in the makefile,
or something to the PATH. I really don't know what is the 'cc1' error.

I would appreciate if you can advise.

following is the config and the HellWorld Makefile I am using.

config:
=========
BINUTILS_SRC=/work/rpmbuild/BUILD/binutils-2.18.50.0.6
GCC_SRC=/work/rpmbuild/BUILD/gcc-4.3.0-20080428
KERNEL_SRC=/work/rpmbuild/BUILD/kernel-2.6.25/linux-2.6.25.i686
PREFIX=/work/buildTest
CHECKING=release

Makefile:
==========
obj-m    := helloWorld.o

CC:=/work/buildTest/i386-linux/bin/gcc
KDIR:=/work/rpmbuild/BUILD/kernel-2.6.25/linux-2.6.25.i686

PWD    := $(shell pwd)

default:
       $(MAKE)  -C $(KDIR) SUBDIRS=$(PWD) modules



Rgs,
Mark Ryden

--
For unsubscribe information see http://sourceware.org/lists.html#faq

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2009-07-25 11:50 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2009-07-24 14:08 Cross compiler (i386 target on x86_64 machine) Mark Ryden
2009-07-24 20:25 ` Khem Raj
2009-07-25  9:23   ` Mark Ryden
2009-07-25 11:50     ` Thomas Petazzoni

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).