public inbox for crossgcc@sourceware.org
 help / color / mirror / Atom feed
From: Mark Ryden <markryde@gmail.com>
To: crossgcc@sourceware.org
Subject: Cross compiler (i386 target on x86_64 machine)
Date: Fri, 24 Jul 2009 14:08:00 -0000	[thread overview]
Message-ID: <dac45060907240708g2c7e6f2bweb35e6581861e8c@mail.gmail.com> (raw)

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

             reply	other threads:[~2009-07-24 14:08 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-07-24 14:08 Mark Ryden [this message]
2009-07-24 20:25 ` Khem Raj
2009-07-25  9:23   ` Mark Ryden
2009-07-25 11:50     ` Thomas Petazzoni

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=dac45060907240708g2c7e6f2bweb35e6581861e8c@mail.gmail.com \
    --to=markryde@gmail.com \
    --cc=crossgcc@sourceware.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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).