Subject: Re: gcc-2.8.1
To: Torsten \(mac\) Buecheler <mac@cs.uni-sb.de>
From: Jerome Lovy <jlovy@multimania.com>
List: port-amiga
Date: 04/19/1999 15:02:09
--Pd0ReVV5GZGQvF3a
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename=mutt00551a

Quoting Torsten (mac) Buecheler (mac@cs.uni-sb.de):
> Hi folks,
> 
> does anybody manage to compile gcc in version 2.8.1?
I do.

> If so, what must I do?
You didn't give any precision about your configuration.
In case you own a 68060 accelerated Amiga (as I do), and want to
make use of the `-m68060' option, I suggest attached patch (which
sort of upgrades gcc-2.8.1 to egcs-1.1.1, as far as 68060 is
concerned...)
	cd ..
	patch <gcc-2.8.1-netbsd-m68k.diff

I also suggest using a specific directory for the installation of header files,
with a `configure' command-line such as :
	./configure \
		--prefix=/usr/local \
		--exec-prefix=/usr/local \
		--libdir=/usr/local/lib/custom-gcc
If you already have installed special libraries under /usr/local/lib, this
`libdir' ensures that you still can use the "NetBSD-native" `gcc' with a
`-L/usr/local/lib' option without risking confusion regarding the gcc
libraries.

Last thing: if needed, you'll have to install `c++filt' (useful for unmangling
compiled C++ symbols) manually. It doesn't seem to get installed automatically
at the `make install' stage...

Other than those issues, following the instructions given in the INSTALL file
went OK for me.

Hope it helps,
JL
-- 
Jerome Lovy - jlovy at multimania dot com
http://www dot multimania dot com/jlovy/

--Pd0ReVV5GZGQvF3a
Content-Type: text/plain; charset=us-ascii
Content-Disposition: attachment; filename="gcc-2.8.1-netbsd-m68k.00551b.diff"

This patch file upgrades
	gcc-2.8.1/config/m68k/m68k.c
	gcc-2.8.1/config/m68k/netbsd.h
from gcc-2.8.1 to (sort of) egcs-1.1.1, so that they are 68060 conscious.

*** gcc-2.8.1/config/m68k/m68k.c.orig	Fri Nov 21 11:53:07 1997
--- gcc-2.8.1/config/m68k/m68k.c	Thu Jan 14 11:30:40 CET 1999
***************
*** 1,5 ****
  /* Subroutines for insn-output.c for Motorola 68000 family.
!    Copyright (C) 1987, 93, 94, 95, 96, 1997 Free Software Foundation, Inc.
  
  This file is part of GNU CC.
  
--- 1,5 ----
  /* Subroutines for insn-output.c for Motorola 68000 family.
!    Copyright (C) 1987, 93, 94, 95, 96, 97, 1998 Free Software Foundation, Inc.
  
  This file is part of GNU CC.
  
***************
*** 2401,2414 ****
  {
    REAL_VALUE_TYPE r;
    int i;
-   enum machine_mode mode;
  
  #ifdef NO_ASM_FMOVECR
    return 0;
  #endif
  
!   /* fmovecr must be emulated on the 68040, so it shouldn't be used at all. */
!   if (TARGET_68040)
      return 0;
  
  #ifndef REAL_ARITHMETIC
--- 2433,2446 ----
  {
    REAL_VALUE_TYPE r;
    int i;
  
  #ifdef NO_ASM_FMOVECR
    return 0;
  #endif
  
!   /* fmovecr must be emulated on the 68040 and 68060, so it shouldn't be
!      used at all on those chips. */
!   if (TARGET_68040 || TARGET_68060)
      return 0;
  
  #ifndef REAL_ARITHMETIC
*** gcc-2.8.1/config/m68k/netbsd.h.orig	Sat Jun  8 20:14:12 1996
--- gcc-2.8.1/config/m68k/netbsd.h	Sun Aug  2 01:44:37 1998
***************
*** 13,19 ****
  #define CPP_SPEC "%{!msoft-float:-D__HAVE_68881__ -D__HAVE_FPU__} %{posix:-D_POSIX_SOURCE}"
  
  #undef ASM_SPEC
! #define ASM_SPEC " %| %{m68030} %{m68040} %{fpic:-k} %{fPIC:-k -K}"
  
  /* Names to predefine in the preprocessor for this target machine.  */
  
--- 13,19 ----
  #define CPP_SPEC "%{!msoft-float:-D__HAVE_68881__ -D__HAVE_FPU__} %{posix:-D_POSIX_SOURCE}"
  
  #undef ASM_SPEC
! #define ASM_SPEC " %| %{m68030} %{m68040} %{m68060} %{fpic:-k} %{fPIC:-k -K}"
  
  /* Names to predefine in the preprocessor for this target machine.  */
  
***************
*** 56,58 ****
--- 56,63 ----
  /* Don't default to pcc-struct-return, because gcc is the only compiler, and
     we want to retain compatibility with older gcc versions.  */
  #define DEFAULT_PCC_STRUCT_RETURN 0
+ 
+ /* Until they use ELF or something that handles dwarf2 unwinds
+    and initialization stuff better.  */
+ #define DWARF2_UNWIND_INFO 0
+ 

--Pd0ReVV5GZGQvF3a--