public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* m68k-unknown-coff cross failure
@ 1997-12-01 12:31 Neal Becker
  1997-12-01 17:20 ` Jeffrey A Law
  1997-12-01 18:55 ` Robin Kirkham
  0 siblings, 2 replies; 9+ messages in thread
From: Neal Becker @ 1997-12-01 12:31 UTC (permalink / raw)
  To: egcs

I just tried:

../../egcs-971127//configure --target=m68k-unknown-coff
--prefix=/usr/local/m68k 

on hppa1.1-hp-hpux9 host.

PATH=/usr/local/m68k/bin:$PATH make

[....]

rm -f g77-cross
cp g77 g77-cross
rm -f stmp-f2c.h
case "c proto gcov  c++ f77 objc" in \
*f77*) top=`pwd`; \
src=`cd ../../../egcs-971127//gcc; pwd`; \
  cd f/runtime; \
  CROSS="-DCROSS_COMPILE" AR_FLAGS="rc" AR="m68k-unknown-coff-ar" BISON="bison" BISONFLAGS="" CC="gcc" CFLAGS="-g -O2" X_CFLAGS="" LDFLAGS="" LEX="flex" LEXFLAGS="" MAKEINFO="/src/m68k/egcs-971127/texinfo/makeinfo/makeinfo " MAKEINFOFLAGS="" RANLIB="m68k-unknown-coff-ranlib" RANLIB_TEST="[ -f /usr/local/m68k/m68k-unknown-coff/bin/ranlib ]" SHELL="/bin/bash" exec_prefix="/usr/local/m68k" prefix="/usr/local/m68k" tooldir="/usr/local/m68k/m68k-unknown-coff" bindir="/usr/local/m68k/bin" libsubdir="/usr/local/m68k/lib/gcc-lib/m68k-unknown-coff/egcs-2.90.19" \
  CC="`case '/src/m68k/egcs-971127/gcc/xgcc -B/src/m68k/egcs-971127/gcc/' in \
     './xgcc -B./') echo ${top}/xgcc -B${top}/;; \
     *) echo '/src/m68k/egcs-971127/gcc/xgcc -B/src/m68k/egcs-971127/gcc/';; esac`" \
  CONFIG_SITE=/dev/null /bin/bash \
  ${src}/f/runtime/configure --srcdir=${src}/f/runtime ;; \
esac
loading site script /dev/null
/src/egcs-971127/gcc/f/runtime/configure: stdlib.h: command not found
creating cache ./config.cache
checking for gcc... /src/m68k/egcs-971127/gcc/xgcc -B/src/m68k/egcs-971127/gcc/
checking whether the C compiler (/src/m68k/egcs-971127/gcc/xgcc -B/src/m68k/egcs-971127/gcc/ -g -O2 ) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.
make[1]: *** [stmp-f2c.h] Error 1

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

* Re: m68k-unknown-coff cross failure
  1997-12-01 12:31 m68k-unknown-coff cross failure Neal Becker
@ 1997-12-01 17:20 ` Jeffrey A Law
  1997-12-02  5:52   ` Neal Becker
  1997-12-01 18:55 ` Robin Kirkham
  1 sibling, 1 reply; 9+ messages in thread
From: Jeffrey A Law @ 1997-12-01 17:20 UTC (permalink / raw)
  To: Neal Becker; +Cc: egcs

  In message < E0xccUx-0000Th-00@data.ctd.comsat.com >you write:
  > I just tried:
  > 
  > ../../egcs-971127//configure --target=m68k-unknown-coff
  > --prefix=/usr/local/m68k 
  > 
  > on hppa1.1-hp-hpux9 host.
  > 
  > PATH=/usr/local/m68k/bin:$PATH make
  > 
http://www.cygnus.com/egcs/faq.html#cross

Note "make cross"

jeff

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

* Re: m68k-unknown-coff cross failure
  1997-12-01 12:31 m68k-unknown-coff cross failure Neal Becker
  1997-12-01 17:20 ` Jeffrey A Law
@ 1997-12-01 18:55 ` Robin Kirkham
  1997-12-02  9:56   ` Jeffrey A Law
  1 sibling, 1 reply; 9+ messages in thread
From: Robin Kirkham @ 1997-12-01 18:55 UTC (permalink / raw)
  To: egcs

On Mon, 01 Dec 1997, Neal Becker wrote:

> I just tried:
> ../../egcs-971127//configure --target=m68k-unknown-coff
> --prefix=/usr/local/m68k 
> on hppa1.1-hp-hpux9 host.

> PATH=/usr/local/m68k/bin:$PATH make
> [....]
> rm -f g77-cross
> cp g77 g77-cross
> rm -f stmp-f2c.h
> ...

You are trying to build the Fortran runtime which is not supported for
the cross-compiler situation.  You can avoid this by making just C and
C++ using:

    make LANGUAGES="c gcov c++" all install

The approved way is to use

    make cross

which does much the same thing. However, when you come to install the
cross-compiler, "make install" or "make cross install" will still try and
build the Fortran runtime, since target "install" depends on "all" (or
equivalent). So I just use the first method.

Jeff, maybe this minor problem (and a better fix, if there is one) could
be mentioned in the new ECGS install document/FAQ?

Robin Kirkham			CSIRO Manufacturing Science and Technology
Project Engineer		Locked Bag 9, Preston 3072, Australia
robin.kirkham@mlb.dmt.csiro.au	Phone: +61 3 9662-7756  Fax: +61 3 9662-7851

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

* Re: m68k-unknown-coff cross failure
  1997-12-01 17:20 ` Jeffrey A Law
@ 1997-12-02  5:52   ` Neal Becker
  1997-12-02  9:23     ` Jeffrey A Law
  0 siblings, 1 reply; 9+ messages in thread
From: Neal Becker @ 1997-12-02  5:52 UTC (permalink / raw)
  To: law; +Cc: egcs

Now I encounter another puzzling problem:
>head config.status 
../../egcs-971127/configure --host=hppa1.1-hp-hpux9.05 --target=m68k-unknown-coff --prefix=/usr/local/m68k -v --with-newlib --norecursion 

My target is embedded 68k with no OS, and since I use newlib-1.8 I
added --with-newlib.

It builds a long way, then:

 /src/m68k/egcs-971127/gcc/xgcc -B/src/m68k/egcs-971127/gcc/ -c -g -O2 -I. -I../../../../egcs-971127/libiberty/../include   ../../../../egcs-971127/libiberty/vsprintf.c -o pic/vsprintf.o
/src/m68k/egcs-971127/gcc/xgcc -B/src/m68k/egcs-971127/gcc/ -c -g -O2 -I. -I../../../../egcs-971127/libiberty/../include  ../../../../egcs-971127/libiberty/vsprintf.c
../../../../egcs-971127/libiberty/vsprintf.c: In function `vsprintf':
../../../../egcs-971127/libiberty/vsprintf.c:47: structure has no member named `_flag'
../../../../egcs-971127/libiberty/vsprintf.c:47: `_IOWRT' undeclared (first use this function)
../../../../egcs-971127/libiberty/vsprintf.c:47: (Each undeclared identifier is reported only once
../../../../egcs-971127/libiberty/vsprintf.c:47: for each function it appears in.)
../../../../egcs-971127/libiberty/vsprintf.c:47: `_IOSTRG' undeclared (first use this function)
../../../../egcs-971127/libiberty/vsprintf.c:48: structure has no member named `_ptr'
../../../../egcs-971127/libiberty/vsprintf.c:49: structure has no member named `_cnt'
make[3]: *** [vsprintf.o] Error 1
make[3]: Leaving directory `/src/m68k/egcs-971127/m68k-unknown-coff/libiberty'
make[2]: *** [libiberty.a] Error 2
make[2]: Leaving directory `/src/m68k/egcs-971127/m68k-unknown-coff/libiberty'
make[1]: *** [all-target-libiberty] Error 2
make[1]: Leaving directory `/src/m68k/egcs-971127'
make: *** [cross] Error 2

I'm not sure what's going on.  Is this vsprintf for the host or the
target?  The host (hpux) has vsprintf, and this was detected by
configure.  The target should have it in newlib.

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

* Re: m68k-unknown-coff cross failure
  1997-12-02  5:52   ` Neal Becker
@ 1997-12-02  9:23     ` Jeffrey A Law
  1997-12-03  5:46       ` Neal Becker
  0 siblings, 1 reply; 9+ messages in thread
From: Jeffrey A Law @ 1997-12-02  9:23 UTC (permalink / raw)
  To: Neal Becker; +Cc: egcs

  In message < u9k9dnsvlk.fsf@neal.ctd.comsat.com >you write:
  > Now I encounter another puzzling problem:
  > >head config.status 
  > ../../egcs-971127/configure --host=hppa1.1-hp-hpux9.05 --target=m68k-unknow
  > n-coff --prefix=/usr/local/m68k -v --with-newlib --norecursion 
  > 
  > My target is embedded 68k with no OS, and since I use newlib-1.8 I
  > added --with-newlib.
Do you have newlib installed?  Where are your target include files?

Have you read the crossgcc FAQ?

jeff

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

* Re: m68k-unknown-coff cross failure
  1997-12-01 18:55 ` Robin Kirkham
@ 1997-12-02  9:56   ` Jeffrey A Law
  0 siblings, 0 replies; 9+ messages in thread
From: Jeffrey A Law @ 1997-12-02  9:56 UTC (permalink / raw)
  To: Robin Kirkham; +Cc: egcs

  In message < 19971202025445.4672.qmail@ragnarok.mlb.dmt.csiro.au >you write:
  > The approved way is to use
  > 
  >     make cross
  > 
  > which does much the same thing. However, when you come to install the
  > cross-compiler, "make install" or "make cross install" will still try and
  > build the Fortran runtime, since target "install" depends on "all" (or
  > equivalent). So I just use the first method.
Yow.

I've made a note of this in the install instructions and the faq.

I've also checked in a change in the _mainline_ sources for install-cross.

jeff

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

* Re: m68k-unknown-coff cross failure
  1997-12-02  9:23     ` Jeffrey A Law
@ 1997-12-03  5:46       ` Neal Becker
  1997-12-05  8:53         ` Jeffrey A Law
  0 siblings, 1 reply; 9+ messages in thread
From: Neal Becker @ 1997-12-03  5:46 UTC (permalink / raw)
  To: law; +Cc: egcs

>>>>> "Jeffrey" == Jeffrey A Law <law@hurl.cygnus.com> writes:

    Jeffrey>   In message < u9k9dnsvlk.fsf@neal.ctd.comsat.com >you write:
    >> Now I encounter another puzzling problem:
    >> >head config.status 
    >> ../../egcs-971127/configure --host=hppa1.1-hp-hpux9.05 --target=m68k-unknow
    >> n-coff --prefix=/usr/local/m68k -v --with-newlib --norecursion 
    >> 
    >> My target is embedded 68k with no OS, and since I use newlib-1.8 I
    >> added --with-newlib.
    Jeffrey> Do you have newlib installed?  Where are your target include files?

Yes, I have newlib installed, and *other parts of the build process
noticed them correctly*.

For example:


gcc -I../../../egcs-971201/gcc/config ../../../egcs-971201/gcc/scan-decls.c
gcc -DCROSS_COMPILE -DIN_GCC    -g -O2  -DHAVE_CONFIG_H -DHAIFA    -I. -I../../../egcs-971201/gcc -I../../../egcs-971201/gcc/config \
  -DGCC_INCLUDE_DIR=\"/usr/local/m68k/lib/gcc-lib/m68k-unknown-coff/egcs-2.90.20/include\" \
  -DGPLUSPLUS_INCLUDE_DIR=\"/usr/local/m68k/include/g++\" \
  -DOLD_GPLUSPLUS_INCLUDE_DIR=\"/usr/local/m68k/lib/g++-include\" \
  -DLOCAL_INCLUDE_DIR=\"/usr/local/include\" \
  -DCROSS_INCLUDE_DIR=\"/usr/local/m68k/lib/gcc-lib/m68k-unknown-coff/egcs-2.90.20/sys-include\" \
  -DTOOL_INCLUDE_DIR=\"/usr/local/m68k/m68k-unknown-coff/include\" \


The newlib stuff is in /usr/local/m68k/m68k-unknown-coff/include.

>Have you read the crossgcc FAQ?

I think so.


I retried with 971201, same results.  I suppose I could try again
explicitly telling configure where to find the target includes, but as 
you see from TOOL_INCLUDE_DIR it seems to have found them without
help.

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

* Re: m68k-unknown-coff cross failure
  1997-12-03  5:46       ` Neal Becker
@ 1997-12-05  8:53         ` Jeffrey A Law
  1997-12-05 11:48           ` Neal Becker
  0 siblings, 1 reply; 9+ messages in thread
From: Jeffrey A Law @ 1997-12-05  8:53 UTC (permalink / raw)
  To: Neal Becker; +Cc: egcs

  In message < u9btyypnnm.fsf@neal.ctd.comsat.com >you write:
  > I retried with 971201, same results.  I suppose I could try again
  > explicitly telling configure where to find the target includes, but as 
  > you see from TOOL_INCLUDE_DIR it seems to have found them without
  > help.
Well, as Mike Neuhauser noted in a previous message, there's an
inconsistency in where configure & Makefile expect to put/find the
target include files that we need to resolve.

jeff

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

* Re: m68k-unknown-coff cross failure
  1997-12-05  8:53         ` Jeffrey A Law
@ 1997-12-05 11:48           ` Neal Becker
  0 siblings, 0 replies; 9+ messages in thread
From: Neal Becker @ 1997-12-05 11:48 UTC (permalink / raw)
  To: law; +Cc: egcs

>>>>> "Jeffrey" == Jeffrey A Law <law@hurl.cygnus.com> writes:

    Jeffrey>   In message < u9btyypnnm.fsf@neal.ctd.comsat.com >you write:
    >> I retried with 971201, same results.  I suppose I could try again
    >> explicitly telling configure where to find the target includes, but as 
    >> you see from TOOL_INCLUDE_DIR it seems to have found them without
    >> help.
    Jeffrey> Well, as Mike Neuhauser noted in a previous message, there's an
    Jeffrey> inconsistency in where configure & Makefile expect to put/find the
    Jeffrey> target include files that we need to resolve.

See my recent post that hasn't been sent out to list yet.  I finally
got this working.

The problem was that libgloss.h was included in gcc build, in which we 
have:




/* Don't set the target flags, this is done by the linker script */
#undef LIB_SPEC
#define LIB_SPEC ""


That's why we always failed linking libiberty for the target.  I
simply edited the specs file in the build/gcc directory to say:

*lib:
%{!shared:%{g*:-lg} %{!p:%{!pg:-lc}}%{p:-lc_p}%{pg:-lc_p}}

It's also true that the correct includes were not used, but
fortunately this was harmless in this case.

After making this change to specs the build completed.  I have just
recompiled an example app for the target and loaded it into the
hardware, which is an mpeg2 satellite receiver, and it is working
normally.

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

end of thread, other threads:[~1997-12-05 11:48 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-12-01 12:31 m68k-unknown-coff cross failure Neal Becker
1997-12-01 17:20 ` Jeffrey A Law
1997-12-02  5:52   ` Neal Becker
1997-12-02  9:23     ` Jeffrey A Law
1997-12-03  5:46       ` Neal Becker
1997-12-05  8:53         ` Jeffrey A Law
1997-12-05 11:48           ` Neal Becker
1997-12-01 18:55 ` Robin Kirkham
1997-12-02  9:56   ` 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).