public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Help building cross compiler...
@ 1998-02-04 14:09 joseph layton galbraith
  1998-02-05  6:40 ` Joseph H. Buehler
  1998-02-08 13:45 ` Jeffrey A Law
  0 siblings, 2 replies; 3+ messages in thread
From: joseph layton galbraith @ 1998-02-04 14:09 UTC (permalink / raw)
  To: egcs

I am trying to build a cross compiler from linux
to sunos4, and it is failing building target
libraries (in libio/gen-params) because it
can't find stdio.h.

Here is what I've done ... if someone can please give me some hint where
I've gone wrong, I'dbe eternally grateful.  I've read all the faqs and
information I can find...  (including egcs INSTALL directory and the
cross-faq at cygnus) 

1. Build binutils-2.8.1.0.19 for targeted for sparc-sunos4
   and installed into /home/galb/egcs-sun.

2. Copied newlib-1.8.0/newlib/libc/include to
   /home/galb/egcs-sun and to /egcs-980122/include

3. Configured egcs as follows (from config.status):
../egcs-980122/configure --host=i586-pc-linux-gnulibc1
--prefix=/home/galb/egcs-sun --target=sparc-sunos4
--with-headers=/home/galb/egcs-sun/include
--with-libs=/home/galb/egcs-sun/lib --with-newlib --norecursion 

4. gmake cross

which gets the following error:

gmake[2]: Entering directory `/home/galb/egcs-build/sparc-sunos4/libio'
rootme=`pwd`/ ; export rootme; \
CC="/home/galb/egcs-build/gcc/xgcc -B/home/galb/egcs-build/gcc/"; export
CC; \
CXX="/home/galb/egcs-build/gcc/xgcc -B/home/galb/egcs-build/gcc/
-nostdinc++ -g -O2"; export CXX; \
CONFIG_NM="sparc-sunos4-nm"; export CONFIG_NM; \
/bin/sh ../../../egcs-980122/libio/gen-params LIB_VERSION=2.8.0
>tmp-params.h
dummy.c:1: sys/types.h: No such file or directory
dummy.c:8: stdio.h: No such file or directory
dummy.c:9: time.h: No such file or directory
dummy.c:10: signal.h: No such file or directory
gen-params: could not invoke /home/galb/egcs-build/gcc/xgcc
-B/home/galb/egcs-build/gcc/ -E on dummy.c
gmake[2]: *** [_G_config.h] Error 1
gmake[2]: Leaving directory `/home/galb/egcs-build/sparc-sunos4/libio'
gmake[1]: *** [all-target-libio] Error 2
gmake[1]: Leaving directory `/home/galb/egcs-build'
gmake: *** [cross] Error 2

Each of the .h files referenced above exists
in /home/galb/egcs-sun/include.

At first it looked to me like gen-params needed to be
passed some -I options for the compiler, but then I
thought the cross compiler should be automatically
searching the /home/galb/egcs-sun/include directory
for it's system includes... now I don't even pretend to have a
clue what is up.

So what did I screw up... I'm sure it's something obvious
and dumb.

Thanks for your time and patience,

Joseph


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

* Re: Help building cross compiler...
  1998-02-04 14:09 Help building cross compiler joseph layton galbraith
@ 1998-02-05  6:40 ` Joseph H. Buehler
  1998-02-08 13:45 ` Jeffrey A Law
  1 sibling, 0 replies; 3+ messages in thread
From: Joseph H. Buehler @ 1998-02-05  6:40 UTC (permalink / raw)
  To: egcs, galb

joseph layton galbraith <galb@unm.edu> writes:

> I am trying to build a cross compiler from linux
> to sunos4, and it is failing building target
> libraries (in libio/gen-params) because it
> can't find stdio.h.
> 
> Here is what I've done ... if someone can please give me some hint where
> I've gone wrong, I'dbe eternally grateful.  I've read all the faqs and
> information I can find...  (including egcs INSTALL directory and the
> cross-faq at cygnus) 

...

> 3. Configured egcs as follows (from config.status):
> ../egcs-980122/configure --host=i586-pc-linux-gnulibc1
> --prefix=/home/galb/egcs-sun --target=sparc-sunos4
> --with-headers=/home/galb/egcs-sun/include
> --with-libs=/home/galb/egcs-sun/lib --with-newlib --norecursion 

I do something simpler, and it works for me:

- Put all the cross-compiler includes under /usr/local/TARGET/include.
- Put all the cross-compiler libs under  /usr/local/TARGET/lib.

Then "../configure --target=TARGET" and "gmake cross".

Joe Buehler

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

* Re: Help building cross compiler...
  1998-02-04 14:09 Help building cross compiler joseph layton galbraith
  1998-02-05  6:40 ` Joseph H. Buehler
@ 1998-02-08 13:45 ` Jeffrey A Law
  1 sibling, 0 replies; 3+ messages in thread
From: Jeffrey A Law @ 1998-02-08 13:45 UTC (permalink / raw)
  To: joseph layton galbraith; +Cc: egcs

  In message < Pine.A41.3.96.980204115032.370728B-100000@musca.unm.edu >you write:
  > I am trying to build a cross compiler from linux
  > to sunos4, and it is failing building target
  > libraries (in libio/gen-params) because it
  > can't find stdio.h.
Yup.  There's an outstanding bug in the "--with-headers" support that
badly needs to be fixed.

Note you can try to compile a trivial file with the "-v" option and
the compiler will dump out its internal include search list:

[law@hurl /puke/law] gcc -v k.c
Reading specs from /usr/cygnus/latest-940103/H-hppa1.1-hp-hpux10/lib/gcc-lib/hppa1.1-hp-hpux10/cygnus-2.91.07/specs
gcc version cygnus-2.91.07 980205 (gcc-2.8.0 release)
 /usr/cygnus/latest-940103/H-hppa1.1-hp-hpux10/lib/gcc-lib/hppa1.1-hp-hpux10/cygnus-2.91.07/cpp -lang-c -v -undef -D__GNUC__=2 -D__GNUC_MINOR__=91 -Dhppa -Dhp9000s800 -D__hp9000s800 -Dhp9k8 -DPWB -Dhpux -Dunix -D__hppa__ -D__hp9000s800__ -D__hp9000s800 -D__hp9k8__ -D__PWB__ -D__hpux__ -D__unix__ -D__hppa -D__hp9000s800 -D__hp9k8 -D__PWB -D__hpux -D__unix -Asystem(unix) -Asystem(hpux) -Acpu(hppa) -Amachine(hppa) -D__hp9000s700 -D_PA_RISC1_1 -D_HPUX_SOURCE -D_HIUX_SOURCE k.c /tmp/cca12162.i
GNU CPP version cygnus-2.91.07 980205 (gcc-2.8.0 release) (hppa)
#include "..." search starts here:
#include <...> search starts here:
 /usr/cygnus/latest-940103/H-hppa1.1-hp-hpux10/lib/gcc-lib/hppa1.1-hp-hpux10/cygnus-2.91.07/../../../../../include
 /usr/cygnus/latest-940103/H-hppa1.1-hp-hpux10/lib/gcc-lib/hppa1.1-hp-hpux10/cygnus-2.91.07/../../../../hppa1.1-hp-hpux10/include
 /usr/cygnus/latest-940103/H-hppa1.1-hp-hpux10/lib/gcc-lib/hppa1.1-hp-hpux10/cygnus-2.91.07/include
 /usr/include
End of search list.

This ought to give you some hints about where to put the include files so
that gcc can find them until we get the --with-headers stuff fixed.

jeff

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

end of thread, other threads:[~1998-02-08 13:45 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-02-04 14:09 Help building cross compiler joseph layton galbraith
1998-02-05  6:40 ` Joseph H. Buehler
1998-02-08 13:45 ` Jeffrey A Law

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).