public inbox for gcc@gcc.gnu.org
 help / color / mirror / Atom feed
* Problems building a cross-compiler
@ 1998-04-10  4:52 SXTHREE
  1998-04-16 13:53 ` Jim Wilson
  0 siblings, 1 reply; 5+ messages in thread
From: SXTHREE @ 1998-04-10  4:52 UTC (permalink / raw)
  To: egcs

OK, version 980406 compiles (and seems to work fine) on Solaris, when
applied the patch concerning the texinfo build failure.

But I still cannot build a cross compiler for powerpc-wrs-vxworks5.3
because of a missing define (-D_RELOCATABLE) when using -mrelocatable-lib.

I added manually a %{mrelocatable-lib: -D_RELOCATABLE} directive in the
cpp section of the specs. I think this should be automatically added but I know
nothing about the process of generating the specs file.

Can someone help ?


FM


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

* Re: Problems building a cross-compiler
  1998-04-10  4:52 Problems building a cross-compiler SXTHREE
@ 1998-04-16 13:53 ` Jim Wilson
  1998-04-17 16:36   ` Jim Wilson
  0 siblings, 1 reply; 5+ messages in thread
From: Jim Wilson @ 1998-04-16 13:53 UTC (permalink / raw)
  To: SXTHREE; +Cc: egcs

The sysv4.h file has in CPP_SYSV_SPEC "%{mrelocatable*: -D_RELOCATABLE}",
and includes CPP_SYSV_SPEC in CPP_SPEC.

The vxppc.h file includes the sysv4.h file, and then redefines CPP_SPEC
without the CPP_SYSV_SPEC (and other) stuff, which means that you never get
the -D_RELOCATABLE option.   I don't know if the vxppc.h file definition
of CPP_SPEC is right.  The easiest solution would be to add the above string
to the CPP_SPEC definition in the vxppc.h file.  There may be other problems
though.

If this works, let me know, and I will make this change.

Jim

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

* Re: Problems building a cross-compiler
  1998-04-16 13:53 ` Jim Wilson
@ 1998-04-17 16:36   ` Jim Wilson
  0 siblings, 0 replies; 5+ messages in thread
From: Jim Wilson @ 1998-04-17 16:36 UTC (permalink / raw)
  To: SXTHREE; +Cc: egcs

I checked in this patch.

Fri Apr 17 14:29:04 1998  Jim Wilson  <wilson@cygnus.com>

	* rs6000/vxppc.h (CPP_SPEC): Add support for mrelocatable*.

Index: vxppc.h
===================================================================
RCS file: /egcs/carton/cvsfiles/egcs/gcc/config/rs6000/vxppc.h,v
retrieving revision 1.1.1.1
diff -p -r1.1.1.1 vxppc.h
*** vxppc.h	1997/08/11 15:57:23	1.1.1.1
--- vxppc.h	1998/04/17 21:28:54
*************** Boston, MA 02111-1307, USA.  */
*** 22,30 ****
--- 22,36 ----
  
  #include "rs6000/sysv4.h"
  
+ /* ??? This file redefines CPP_SPEC which is wrong.  It should instead define
+    one of the extra specs that gets included in CPP_SPEC.  For instance,
+    CPP_OS_DEFAULT_SPEC.  The mrelocatable line was copied from CPP_SYSV_SPEC.
+    There is probably other stuff missing.  */
+ 
  #undef CPP_SPEC
  #define CPP_SPEC "\
  %{posix: -D_POSIX_SOURCE} \
+ %{mrelocatable*: -D_RELOCATABLE} \
  %{!mcpu*: \
    %{mpowerpc*: -D_ARCH_PPC -DCPU=PPC603} \
    %{!mno-powerpc: -D_ARCH_PPC -DCPU=PPC603}} \

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

* Re: Problems building a cross-compiler
  1998-04-17  6:19 SXTHREE
@ 1998-04-17 14:42 ` David Edelsohn
  0 siblings, 0 replies; 5+ messages in thread
From: David Edelsohn @ 1998-04-17 14:42 UTC (permalink / raw)
  To: SXTHREE; +Cc: wilson, egcs

>>>>> SXTHREE  writes:

SXTHREE> Fine, thanx. The first problem seems to be solved
SXTHREE> Now eabi compilation is OK, but I have an internal
SXTHREE> error while compiling tinfo.cc (just a few lines later)

SXTHREE> Note I'm using version egcs-980411
SXTHREE> gcc version egcs-2.91.22 980404 (gcc2 ss-980401 experimental)

	The latest EGCS snapshots/CVS are broken on PowerPC SVR4/eABI.  My
understanding is that this is a G++ bug, not a bug in the PowerPC port.  I
am not sure about the status of getting this resolved.

David


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

* Re: Problems building a cross-compiler
@ 1998-04-17  6:19 SXTHREE
  1998-04-17 14:42 ` David Edelsohn
  0 siblings, 1 reply; 5+ messages in thread
From: SXTHREE @ 1998-04-17  6:19 UTC (permalink / raw)
  To: wilson; +Cc: egcs

Fim Wilson wrote:
>The sysv4.h file has in CPP_SYSV_SPEC "%{mrelocatable*: -D_RELOCATABLE}",
>and includes CPP_SYSV_SPEC in CPP_SPEC.

>The vxppc.h file includes the sysv4.h file, and then redefines CPP_SPEC
>without the CPP_SYSV_SPEC (and other) stuff, which means that you never get
>the -D_RELOCATABLE option.   I don't know if the vxppc.h file definition
>of CPP_SPEC is right.  The easiest solution would be to add the above string
>to the CPP_SPEC definition in the vxppc.h file.  There may be other problems
>though.

Fine, thanx. The first problem seems to be solved
Now eabi compilation is OK, but I have an internal
error while compiling tinfo.cc (just a few lines later)
-->
make[4]: Entering directory `/thesee00/gnu/sources/obj/gcc'
/thesee00/gnu/sources/obj/gcc/xgcc -B/thesee00/gnu/sources/obj/gcc/ -O2  -DCROSS_COMPILE 
-DIN_GCC  -DSVR4  -g -O2 -I./include   -g1 -DHAVE_GTHR_DEFAULT -DIN_LIBGCC2 
-D__GCC_FLOAT_NOT_NEEDED -fexceptions    -mrelocatable-lib -mno-eabi -mstrict-align -I. 
-I../../egcs-980411/gcc -I../../egcs-980411/gcc/config \
  -c ../../egcs-980411/gcc/cp/tinfo.cc
include/typeinfo:64: Internal compiler error.
include/typeinfo:64: Please submit a full bug report to `egcs-bugs@cygnus.com'.
make[4]: *** [tinfo.o] Error 1
make[4]: Leaving directory `/thesee00/gnu/sources/obj/gcc'
make[3]: *** [libgcc2.a] Error 1
make[3]: Leaving directory `/thesee00/gnu/sources/obj/gcc'
make[2]: *** [stmp-multilib-sub] Error 2
make[2]: Leaving directory `/thesee00/gnu/sources/obj/gcc'
make[1]: *** [stmp-multilib] Error 1
make[1]: Leaving directory `/thesee00/gnu/sources/obj/gcc'
make: *** [cross] Error 2


Note I'm using version egcs-980411
Native info:
config.guess  => sparc-sun-solaris2.5.1
g++ -v =>
Reading specs from /thesee00/gnu/lib/gcc-lib/sparc-sun-solaris2.5.1/egcs-2.91.22/specs
gcc version egcs-2.91.22 980404 (gcc2 ss-980401 experimental)

I'll try to re-check the maillist to get info about this.

later...
FM

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

end of thread, other threads:[~1998-04-17 16:36 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1998-04-10  4:52 Problems building a cross-compiler SXTHREE
1998-04-16 13:53 ` Jim Wilson
1998-04-17 16:36   ` Jim Wilson
1998-04-17  6:19 SXTHREE
1998-04-17 14:42 ` David Edelsohn

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