public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Building 971008 cross m68k-coff on sparc-sun-solaris2.5.1 -- help!
@ 1997-10-14 22:48 Robin Kirkham
  1997-10-15  7:41 ` Joel Sherrill
                   ` (2 more replies)
  0 siblings, 3 replies; 8+ messages in thread
From: Robin Kirkham @ 1997-10-14 22:48 UTC (permalink / raw)
  To: egcs

Would someone knowledgeable about the egcs cross-build procedure please have a
quick look at this---I can't even work out which bit of the makefile is going
wrong.

The build fails while trying to make the subtarget "stmp-f2c.h" in the Fortran
run-time. It seems to have decided that the xgcc it made does not work, yet it
seemed to build the libgcc libraries OK. I had the same error in building 
egcs-970929.

Is this a reasonable configuration?  Am I doing something else wrong?  I also
tried specifying LANGUAGES="c c++" to make (with a fresh distribution) to avoid 
building f77, but it seemed to make no difference. 

My procedure and results were as follows (the "case 'c proto gcov  c++ f77 objc'
in" line looks a bit strange to me):

% gtar xfz egcs-971008.tar.gz
% cd egcs-971008
% ./configure --target=m68k-coff --with-gnu-as --with-gnu-ld --prefix=/opt/embedded --program-prefix=m68k- -verbose
Configuring for a sparc-sun-solaris2.5.1 host.
... much deleted

% make
... much deleted (builds libgcc ok, apparently)
...
gcc -c -DCROSS_COMPILE -DIN_GCC  -DSVR4  -g -O2  -DHAVE_CONFIG_H     -I. -I. -I./config ./cp/g++spec.c
gcc -DCROSS_COMPILE -DIN_GCC  -DSVR4  -g -O2  -DHAVE_CONFIG_H   -o g++ g++.o g++spec.o version.o \
  choose-temp.o pexecute.o  obstack.o ` case "gcc" in "cc") echo "alloca.o" ;; esac `  
rm -f g++-cross
cp g++ g++-cross
rm -f cxxmain.c
ln -s ./cplus-dem.c cxxmain.c
gcc -c -DMAIN -DCROSS_COMPILE -DIN_GCC  -DSVR4  -g -O2  -DHAVE_CONFIG_H     -I. -I. -I./config \
  -DVERSION=\"egcs-2.90.12\" cxxmain.c
rm -f cxxmain.c
gcc -DCROSS_COMPILE -DIN_GCC  -DSVR4  -g -O2  -DHAVE_CONFIG_H   obstack.o ` case "gcc" in "cc") echo "alloca.o" ;; esac `   -o c++filt \
  cxxmain.o underscore.o getopt.o getopt1.o
case 'c proto gcov  c++ f77 objc' in \
*f77*) \
  gcc -DCROSS_COMPILE -DIN_GCC  -DSVR4  -g -O2  -DHAVE_CONFIG_H  -I. -I. -I./config  \
    -DGCC_NAME=\"`t='-e s,^,m68k-coff-,'; echo gcc | sed $t`\" \
    -o g77-cross ./f/g77.c ./f/version.c obstack.o ` case "gcc" in "cc") echo "alloca.o" ;; esac `   ;; \
esac
rm -f stmp-f2c.h
top=`pwd`; \
src=`cd .; pwd`; \
  cd f/runtime; \
  CC="`case '/opt/embedded/src/egcs-971008/gcc/xgcc -B/opt/embedded/src/egcs-971008/gcc/' in \
     './xgcc -B./') echo ${top}/xgcc -B${top}/;; \
     *) echo '/opt/embedded/src/egcs-971008/gcc/xgcc -B/opt/embedded/src/egcs-971008/gcc/';; esac`" \
G_SITE=/dev/null /bin/sh \
  ${src}/f/runtime/configure --srcdir=${src}/f/runtime
loading site script /dev/null
creating cache ./config.cache
checking for gcc... /opt/embedded/src/egcs-971008/gcc/xgcc -B/opt/embedded/src/egcs-971008/gcc/
checking whether the C compiler (/opt/embedded/src/egcs-971008/gcc/xgcc -B/opt/embedded/src/egcs-971008/gcc/ -g -O2 ) works... no
configure: error: installation or configuration problem: C compiler cannot create executables.
gmake[1]: *** [stmp-f2c.h] Error 1
gmake[1]: Leaving directory `/opt/embedded/src/egcs-971008/gcc'
gmake: *** [all-gcc] Error 2


Thanks,

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] 8+ messages in thread

* Re: Building 971008 cross m68k-coff on sparc-sun-solaris2.5.1 -- help!
  1997-10-14 22:48 Building 971008 cross m68k-coff on sparc-sun-solaris2.5.1 -- help! Robin Kirkham
@ 1997-10-15  7:41 ` Joel Sherrill
  1997-10-15  8:25 ` Paul Koning
  1997-10-15  8:53 ` Jeffrey A Law
  2 siblings, 0 replies; 8+ messages in thread
From: Joel Sherrill @ 1997-10-15  7:41 UTC (permalink / raw)
  To: Robin Kirkham; +Cc: egcs

On Wed, 15 Oct 1997, Robin Kirkham wrote:

> Would someone knowledgeable about the egcs cross-build procedure please have a
> quick look at this---I can't even work out which bit of the makefile is going
> wrong.
> 
> The build fails while trying to make the subtarget "stmp-f2c.h" in the Fortran
> run-time. It seems to have decided that the xgcc it made does not work, yet it
> seemed to build the libgcc libraries OK. I had the same error in building 
> egcs-970929.

I do something very tacky locally to avoid fortrans and Objective-C in
cross configurations.

I either remove the fortran and objective c subdirectories or move the
config-lang.in file to another name.  I know this avoids building the
languages but it does seem to work.

--joel


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

* Re: Building 971008 cross m68k-coff on sparc-sun-solaris2.5.1 -- help!
  1997-10-14 22:48 Building 971008 cross m68k-coff on sparc-sun-solaris2.5.1 -- help! Robin Kirkham
  1997-10-15  7:41 ` Joel Sherrill
@ 1997-10-15  8:25 ` Paul Koning
  1997-10-15 11:12   ` Robin Kirkham
  1997-10-16  1:07   ` Jeffrey A Law
  1997-10-15  8:53 ` Jeffrey A Law
  2 siblings, 2 replies; 8+ messages in thread
From: Paul Koning @ 1997-10-15  8:25 UTC (permalink / raw)
  To: Robin.Kirkham; +Cc: egcs

>>>>> "Robin" == Robin Kirkham <Robin.Kirkham@mlb.dmt.csiro.au> writes:

 Robin> Would someone knowledgeable about the egcs cross-build
 Robin> procedure please have a quick look at this---I can't even work
 Robin> out which bit of the makefile is going wrong.

 Robin> The build fails while trying to make the subtarget
 Robin> "stmp-f2c.h" in the Fortran run-time. It seems to have decided
 Robin> that the xgcc it made does not work, yet it seemed to build
 Robin> the libgcc libraries OK. I had the same error in building
 Robin> egcs-970929.

 Robin> Is this a reasonable configuration?  Am I doing something else
 Robin> wrong?  I also tried specifying LANGUAGES="c c++" to make
 Robin> (with a fresh distribution) to avoid building f77, but it
 Robin> seemed to make no difference.
>...

I ran into this some time ago and proposed a patch (that was for the
0922 snapshot, but the relevant file is the same in the current
snapshot).  Give it a try...  This is to gcc/f/Make-lang.in.

	paul

--- Make-lang.in.orig	Thu Sep 18 18:06:05 1997
+++ Make-lang.in	Mon Sep 29 12:23:05 1997
@@ -278,22 +278,26 @@
   $(GCC_PARTS)
 # The make "stage?" in compiler spec. is fully qualified as above
 	rm -f stmp-f2c.h
-	top=`pwd`; \
+	case "$(LANGUAGES)" in \
+	*f77*) top=`pwd`; \
 	src=`cd $(srcdir); pwd`; \
 	  cd f/runtime; \
 	  CC="`case '$(GCC_FOR_TARGET)' in \
 	     './xgcc -B./') echo $${top}/xgcc -B$${top}/;; \
 	     *) echo '$(GCC_FOR_TARGET)';; esac`" \
 	  $(F77_FLAGS_TO_PASS) CONFIG_SITE=/dev/null $(SHELL) \
-	  $${src}/f/runtime/configure --srcdir=$${src}/f/runtime
-	top=`pwd`; \
+	  $${src}/f/runtime/configure --srcdir=$${src}/f/runtime ;; \
+	esac
+	case "$(LANGUAGES)" in \
+	*f77*) top=`pwd`; \
 	src=`cd $(srcdir); pwd`; \
 	  cd f/runtime/libU77; \
 	  CC="`case '$(GCC_FOR_TARGET)' in \
 	     './xgcc -B./') echo $${top}/xgcc -B$${top}/;; \
 	     *) echo '$(GCC_FOR_TARGET)';; esac`" \
 	  $(F77_FLAGS_TO_PASS) CONFIG_SITE=/dev/null $(SHELL) \
-	  $${src}/f/runtime/libU77/configure --srcdir=$${src}/f/runtime/libU77
+	  $${src}/f/runtime/libU77/configure --srcdir=$${src}/f/runtime/libU77 ;; \
+	esac
 	touch stmp-f2c.h
 
 # Support parallel build.

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

* Re: Building 971008 cross m68k-coff on sparc-sun-solaris2.5.1 -- help!
  1997-10-14 22:48 Building 971008 cross m68k-coff on sparc-sun-solaris2.5.1 -- help! Robin Kirkham
  1997-10-15  7:41 ` Joel Sherrill
  1997-10-15  8:25 ` Paul Koning
@ 1997-10-15  8:53 ` Jeffrey A Law
  2 siblings, 0 replies; 8+ messages in thread
From: Jeffrey A Law @ 1997-10-15  8:53 UTC (permalink / raw)
  To: Robin Kirkham; +Cc: egcs

  In message < 19971015054737.24914.qmail@ragnarok.mlb.dmt.csiro.au >you write:
  > Would someone knowledgeable about the egcs cross-build procedure please
  > have a quick look at this---I can't even work out which bit of the
  > makefile is going wrong.
The problem (I think) is we always configure the fortran runtime, which is
problematical for cross targets.

Others have tripped on the same prblem, but I've been away too much lately
to look into it more closely.


jeff

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

* Re: Building 971008 cross m68k-coff on sparc-sun-solaris2.5.1 -- help!
  1997-10-15  8:25 ` Paul Koning
@ 1997-10-15 11:12   ` Robin Kirkham
  1997-10-15 14:33     ` Jim Wilson
  1997-10-16  1:07   ` Jeffrey A Law
  1 sibling, 1 reply; 8+ messages in thread
From: Robin Kirkham @ 1997-10-15 11:12 UTC (permalink / raw)
  To: egcs

On Wed, 15 Oct 1997, Paul Koning wrote:

>  Robin> Would someone knowledgeable about the egcs cross-build
>  Robin> procedure please have a quick look at this---I can't even work
>  Robin> out which bit of the makefile is going wrong.
> 
>  Robin> The build fails while trying to make the subtarget
>  Robin> "stmp-f2c.h" in the Fortran run-time. It seems to have decided
>  Robin> that the xgcc it made does not work, yet it seemed to build
>  Robin> the libgcc libraries OK. I had the same error in building
>  Robin> egcs-970929.
> 
>  Robin> Is this a reasonable configuration?  Am I doing something else
>  Robin> wrong?  I also tried specifying LANGUAGES="c c++" to make
>  Robin> (with a fresh distribution) to avoid building f77, but it
>  Robin> seemed to make no difference.
> >...
> 
> I ran into this some time ago and proposed a patch (that was for the
> 0922 snapshot, but the relevant file is the same in the current
> snapshot).  Give it a try...  This is to gcc/f/Make-lang.in.
> ..

I applied Paul's patch and it solves the problem whereby LANGUAGES is not
honoured, at least in this configuration. So if I type make LANGUAGES="c c++"
the build completes sucessfully (by skipping f77 and objc) and the resulting
c compiler seems to work (at least on a quick test, not a proper testsuite).
So I think this patch should be accepted (and thanks, Paul).

However, if you don't skip f77, the build still fails in the same spot. 
It looks as if gcc/f/runtime/configure still believes the compiler does not
work (or invokes it incorrectly) and gives up. Is the f77 runtime actually
supported in m68k-coff configuration? (I don't actually need it).

There is a minor installation bug: it seems --program-prefix is not honoured,
and the compiler is installed as m68k-coff-g++ and so on (I asked for m68k-g++).
Further, gcc is not installed at all.

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] 8+ messages in thread

* Re: Building 971008 cross m68k-coff on sparc-sun-solaris2.5.1 -- help!
  1997-10-15 11:12   ` Robin Kirkham
@ 1997-10-15 14:33     ` Jim Wilson
  1997-10-15 20:16       ` Robin Kirkham
  0 siblings, 1 reply; 8+ messages in thread
From: Jim Wilson @ 1997-10-15 14:33 UTC (permalink / raw)
  To: Robin Kirkham; +Cc: egcs

	However, if you don't skip f77, the build still fails in the same spot. 
	It looks as if gcc/f/runtime/configure still believes the compiler does not
	work (or invokes it incorrectly) and gives up. Is the f77 runtime actually
	supported in m68k-coff configuration? (I don't actually need it).

The f77 and Objective C runtimes are not yet supported for cross builds.
This is why we recommend not building those languages.

The plan is to fix them by moving them to a top level directory.  This
is how the C++ runtime is already handled, and this works fine for cross
builds.

Jim

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

* Re: Building 971008 cross m68k-coff on sparc-sun-solaris2.5.1 -- help!
  1997-10-15 14:33     ` Jim Wilson
@ 1997-10-15 20:16       ` Robin Kirkham
  0 siblings, 0 replies; 8+ messages in thread
From: Robin Kirkham @ 1997-10-15 20:16 UTC (permalink / raw)
  To: egcs; +Cc: Jim Wilson

On Wed, 15 Oct 1997, Jim Wilson wrote:

> The f77 and Objective C runtimes are not yet supported for cross builds.
> This is why we recommend not building those languages.

OK -- I obviously missed that recommendation somewhere. That being the case,
the mechanism for excluding f77 and objc, which I understand to be the
LANGUAGES variable, needs to work in these configurations. Paul Koning's patch
(posted earlier) seemed to do that...

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] 8+ messages in thread

* Re: Building 971008 cross m68k-coff on sparc-sun-solaris2.5.1 -- help!
  1997-10-15  8:25 ` Paul Koning
  1997-10-15 11:12   ` Robin Kirkham
@ 1997-10-16  1:07   ` Jeffrey A Law
  1 sibling, 0 replies; 8+ messages in thread
From: Jeffrey A Law @ 1997-10-16  1:07 UTC (permalink / raw)
  To: Paul Koning; +Cc: Robin.Kirkham, egcs

  In message < 9710151322.AA24749@kona. >you write:
  > I ran into this some time ago and proposed a patch (that was for the
  > 0922 snapshot, but the relevant file is the same in the current
  > snapshot).  Give it a try...  This is to gcc/f/Make-lang.in.
Sorry for the delay...

I've installed this patch.

In the future, don't forget ChangeLog entries for your patches.

Thanks,
Jeff

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

end of thread, other threads:[~1997-10-16  1:07 UTC | newest]

Thread overview: 8+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1997-10-14 22:48 Building 971008 cross m68k-coff on sparc-sun-solaris2.5.1 -- help! Robin Kirkham
1997-10-15  7:41 ` Joel Sherrill
1997-10-15  8:25 ` Paul Koning
1997-10-15 11:12   ` Robin Kirkham
1997-10-15 14:33     ` Jim Wilson
1997-10-15 20:16       ` Robin Kirkham
1997-10-16  1:07   ` Jeffrey A Law
1997-10-15  8:53 ` 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).