This is the mail archive of the crossgcc@sourceware.cygnus.com mailing list for the crossgcc project.

See the CrossGCC FAQ for lots more infromation.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Still can't find the target headers


Kai Ruottu just posted a comment to this list about finding target headers.
He included a clip from the documentation for gcc 2.96:

--------------------------- clip --------------------------------
When you have found suitable header files, put them in the directory
/usr/local/target/include, before building the cross compiler.  Then
installation will run fixincludes properly and install the corrected
versions of the header files where the compiler will use them.

Provide the header files before you build the cross-compiler, because
the build stage actually runs the cross-compiler to produce parts of
libgcc.a.  (These are the parts that can be compiled with GNU CC.)
Some of them need suitable header files.
--------------------------- clip --------------------------------

This sounds like a good idea to me.  As it happens, I too am having problems
trying to build a cross compiler.  Therefore, I tried exactly that.  First,
I built and installed binutils-2.9.5.0.34 to <prefix>/bin, with <prefix> as
defined below.

I use a script called set.environment to set up my build environment (so
that my notoriously bad typing doesn't bolix up my build environment.)  It
contains:

host=i686-pc-linux-gnu
target=i486-rtemself
prefix=/opt/cross
i=$prefix/bin
PATH=$i:$PATH (This helps the build to find the new binutils binaries.)

I start each work session with:  "source set.environment"

I did "cp -r" <source-prefix>/newlib-1.8.2/newlib/libc/include
/usr/local/i486-rtemself.  So if I do "ls /usr/local/i486-rtemself/include",
I see all my include files.  Then I did
"configure --target=$target --prefix=$prefix -v" and then 'make
LANGUAGES="c"'.  But I still can't build gcc.  The attempt to make libgcc2
fails because it still can't find the header files, yet they're right where
(I think) they're supposed to be, in /usr/local/<target>/include.

So does anyone have any ideas how I can troubleshoot this?  I thought of the
old "invisible characters in a variable sting" bug, so I've retyped my
script twice, and I've removed and replaced the include directory twice.
My variables are correct.

Yet gcc still can't find them.

Any suggestions would be welcome!

Richard Bowser
Engineer
Thunder Scientific Corporation

email:   richardb@thunderscientific.com




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


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]