public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* --with-headers for cross-compile broken? (egcs-971201)
@ 1997-12-02  9:56 Mike Neuhauser
  1997-12-02 11:25 ` Jeffrey A Law
  0 siblings, 1 reply; 5+ messages in thread
From: Mike Neuhauser @ 1997-12-02  9:56 UTC (permalink / raw)
  To: egcs

I'm trying to build a powerpc-unknown-linux-gnulibc2 targeted cross
compiler on an i686-pc-linux-gnulibc1 host. I've got problems with the
target header files.

I'm using bintuls-2.8.1.0.17 (binutils and egcs are built together)
and egcs-971201 (egcs-971122 shows same behaviour).
The following sets up the build directory and does the build:

mkdir otb
cd otb
ln -s ../egcs-971201/* .
ln -s ../binutils-2.8.1.0.17/{bfd,binutils,gas,gprof,ld,opcodes} .
mkdir build
cd build
../configure --prefix=/usr/local/powerpc-unknown-linux-gnulibc2 \
	--target=powerpc-unknown-linux-gnulibc2 \
	--with-headers=<dir with headers of gnu-libc2>
make cross

configure copies the headers to
/usr/local/powerpc-unknown-linux-gnulibc2/powerpc-unknown-linux-gnulibc2/sys-include,
but when libgcc2.c is compiled to get _eprintf.o, the header stdio.h is
not found. The header search list for this compile is
 include
 .
 ../../gcc
 ../../gcc/config
 /disk/home/mike/SOHO/Src/otb/build/gcc/include
 /usr/local/powerpc-unknown-linux-gnulibc2/lib/gcc-lib/powerpc-unknown-linux-gnulibc2/egcs-2.90.18/include
 /usr/local/powerpc-unknown-linux-gnulibc2/powerpc-unknown-linux-gnulibc2/include

After I copied the headers manually to
/usr/local/powerpc-unknown-linux-gnulibc2/powerpc-unknown-linux-gnulibc2/include
the cross-compiler was build successfully.

Does anyone know, if this is a bug, or if I have used this feature wrong
(whats the right way to do it)?

Thank you!

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

* Re: --with-headers for cross-compile broken? (egcs-971201)
  1997-12-02  9:56 --with-headers for cross-compile broken? (egcs-971201) Mike Neuhauser
@ 1997-12-02 11:25 ` Jeffrey A Law
  1997-12-03  3:30   ` Mike Neuhauser
  0 siblings, 1 reply; 5+ messages in thread
From: Jeffrey A Law @ 1997-12-02 11:25 UTC (permalink / raw)
  To: Mike Neuhauser; +Cc: egcs

  In message < 199712021615.RAA11779@scully.gams.co.at >you write:
  > I'm trying to build a powerpc-unknown-linux-gnulibc2 targeted cross
  > compiler on an i686-pc-linux-gnulibc1 host. I've got problems with the
  > target header files.
  > 
  > I'm using bintuls-2.8.1.0.17 (binutils and egcs are built together)
  > and egcs-971201 (egcs-971122 shows same behaviour).
  > The following sets up the build directory and does the build:
Hmmm, the include search path didn't look correct.

The first thing I would do is make sure CROSS_COMPILE is being defined
when building cccp.c.

Jeff

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

* Re: --with-headers for cross-compile broken? (egcs-971201)
  1997-12-02 11:25 ` Jeffrey A Law
@ 1997-12-03  3:30   ` Mike Neuhauser
  1997-12-05 10:44     ` Jeffrey A Law
  1998-02-24 19:54     ` Jeffrey A Law
  0 siblings, 2 replies; 5+ messages in thread
From: Mike Neuhauser @ 1997-12-03  3:30 UTC (permalink / raw)
  To: law; +Cc: egcs

In message < 3893.881090739@cygnus.com >, Jeffrey A Law writes:

>   In message < 199712021615.RAA11779@scully.gams.co.at >you write:
>
>   > I'm trying to build a powerpc-unknown-linux-gnulibc2 targeted
>   > cross compiler on an i686-pc-linux-gnulibc1 host. I've got
>   > problems with the target header files.
>   >
>   > I'm using bintuls-2.8.1.0.17 (binutils and egcs are built
>   > together) and egcs-971201 (egcs-971122 shows same behaviour). The
>   > following sets up the build directory and does the build:
>
> Hmmm, the include search path didn't look correct.
>
> The first thing I would do is make sure CROSS_COMPILE is being defined
> when building cccp.c.
>
> Jeff

CROSS_COMPILE is defined. I tracked the problem down now,
egcs-971201/configure.in and egcs-971201/gcc/Makefile.in don't agree on
the location for the cross headers:

configure (see egcs-971201/configure.in) copies the headers to

    ${prefix}/${target_alias}/sys-include

while egcs-971201/gcc/Makefile.in defines CROSS_INCLUDE_DIR to be

    $(libsubdir)/sys-include

with libsubdir = $(libdir)/gcc-lib/$(target_alias)/$(version)

So these two directories are clearly different, but which one is the
right one?

--
Michael Neuhauser                            Phone: +43(1)8958499/17
g.a.m.s. edv-dienstleistungen gmbh           Fax:   +43(1)8958499/60
Stiegergasse 15-17/8                         Email: mike@gams.at
A-1150 Vienna/Austria/Europe

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

* Re: --with-headers for cross-compile broken? (egcs-971201)
  1997-12-03  3:30   ` Mike Neuhauser
@ 1997-12-05 10:44     ` Jeffrey A Law
  1998-02-24 19:54     ` Jeffrey A Law
  1 sibling, 0 replies; 5+ messages in thread
From: Jeffrey A Law @ 1997-12-05 10:44 UTC (permalink / raw)
  To: Mike Neuhauser; +Cc: egcs

  In message < 199712031110.MAA13120@scully.gams.co.at >you write:
  > CROSS_COMPILE is defined. I tracked the problem down now,
  > egcs-971201/configure.in and egcs-971201/gcc/Makefile.in don't agree on
  > the location for the cross headers:
  > 
  > configure (see egcs-971201/configure.in) copies the headers to
  > 
  >     ${prefix}/${target_alias}/sys-include
  > 
  > while egcs-971201/gcc/Makefile.in defines CROSS_INCLUDE_DIR to be
  > 
  >     $(libsubdir)/sys-include
  > 
  > with libsubdir = $(libdir)/gcc-lib/$(target_alias)/$(version)
  > 
  > So these two directories are clearly different, but which one is the
  > right one?
Either is correct (IMHO), though as you note they must be consistent!

The first is a little simpler -- there's a nice place where one can go
and find the target libraries, target includes and binaries suitable for
compiling and examining target objects.

The second is also good in that you could have different sets of include
files for different versions of cross compilers for the target.

I believe Cygnus uses the first version internally, but I don't want to 
force that convention on everyone if it doesn't make sense.



jeff

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

* Re: --with-headers for cross-compile broken? (egcs-971201)
  1997-12-03  3:30   ` Mike Neuhauser
  1997-12-05 10:44     ` Jeffrey A Law
@ 1998-02-24 19:54     ` Jeffrey A Law
  1 sibling, 0 replies; 5+ messages in thread
From: Jeffrey A Law @ 1998-02-24 19:54 UTC (permalink / raw)
  To: Mike Neuhauser; +Cc: egcs

  In message <199712031110.MAA13120@scully.gams.co.at>you write:
  > CROSS_COMPILE is defined. I tracked the problem down now,
  > egcs-971201/configure.in and egcs-971201/gcc/Makefile.in don't agree on
  > the location for the cross headers:
  > 
  > configure (see egcs-971201/configure.in) copies the headers to
  > 
  >     ${prefix}/${target_alias}/sys-include
  > 
  > while egcs-971201/gcc/Makefile.in defines CROSS_INCLUDE_DIR to be
  > 
  >     $(libsubdir)/sys-include
  > 
  > with libsubdir = $(libdir)/gcc-lib/$(target_alias)/$(version)
  > 
  > So these two directories are clearly different, but which one is the
  > right one?
This has been fixed for the upcoming 1.0.2 release as well as in the
mainline sources.

We're using ${prefix}/${target_alias}/sys-include

jeff

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

end of thread, other threads:[~1998-02-24 19:54 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-12-02  9:56 --with-headers for cross-compile broken? (egcs-971201) Mike Neuhauser
1997-12-02 11:25 ` Jeffrey A Law
1997-12-03  3:30   ` Mike Neuhauser
1997-12-05 10:44     ` Jeffrey A Law
1998-02-24 19:54     ` 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).