Subject: pkg/11865: pkg lang/gcc on sparc
To: None <gnats-bugs@gnats.netbsd.org>
From: None <mrauch@fs.tum.de>
List: netbsd-bugs
Date: 01/01/2001 11:10:19
>Number: 11865
>Category: pkg
>Synopsis: pkg lang/gcc should work on sparc now
>Confidential: no
>Severity: non-critical
>Priority: low
>Responsible: pkg-manager
>State: open
>Class: change-request
>Submitter-Id: net
>Arrival-Date: Mon Jan 01 11:10:01 PST 2001
>Closed-Date:
>Last-Modified:
>Originator: Michael Rauch
>Release: 1.5
>Organization:
FS MPI / TUM
>Environment:
System: NetBSD mimas 1.5 NetBSD 1.5 (GENERIC) #1: Wed Nov 29 00:29:52 MET 2000 root@flambard:/usr/src/sys/arch/sparc/compile/GENERIC sparc
>Description:
The package lang/gcc hasn't compiled on sparc so far. With the attached
patches I got it working here on my box just fine.
(The patches need some small additional amount of work to let them do the task
automatically (some editing in the configure-script, where I am lacking
knowledge). I will describe this verbally in the Fix-Section below and hope
someone is able to add the appropiate lines.)
>How-To-Repeat:
Try to make the pkg.
>Fix:
1) Apply the two following patches (They are unified patches for the patches.
If you prefer something else, let me know it and I'll send it to you.):
==========================================================
# This is a shell archive. Save it in a file, remove anything before
# this line, and then unpack it by entering "sh file". Note, it may
# create directories; files and directories will be owned by you and
# have default permissions.
#
# This archive contains:
#
# patch-patch-al
# patch-patch-aq
#
echo x - patch-patch-al
sed 's/^X//' >patch-patch-al << 'END-of-patch-patch-al'
X+++ patch-al Mon Jan 1 19:18:50 2001
X@@ -47,7 +46,7 @@
X /* Write the extra assembler code needed to declare a function properly.
X Some svr4 assemblers need to also have something extra said about the
X function's return value. We allow for that here. */
X-@@ -207,3 +224,54 @@
X+@@ -207,3 +224,56 @@
X putc ('\n', FILE); \
X } \
X } while (0)
X@@ -59,7 +58,9 @@
X +#ifdef NETBSD_ELF
X +
X +/* Start with generic ELF definitions. */
X++#if !defined(__sparc__)
X +#include "elfos.h"
X++#endif
X +
X +#undef DWARF_DEBUGGING_INFO /* XXX */
X +#undef DWARF2_DEBUGGING_INFO /* XXX */
END-of-patch-patch-al
echo x - patch-patch-aq
sed 's/^X//' >patch-patch-aq << 'END-of-patch-patch-aq'
X+++ patch-aq Mon Jan 1 19:18:50 2001
X@@ -23,20 +22,19 @@
X tmake_file=t-netbsd
X use_collect2=yes
X ;;
X-@@ -3021,6 +3032,12 @@
X+@@ -3021,6 +3032,11 @@
X tmake_file=sparc/t-sparcbare
X tm_file="sparc/aout.h libgloss.h"
X ;;
X + sparc-*-netbsd*elf*)
X-+ tm_file=sparc/netbsdelf.h
X++ tm_file=sparc/netbsd-elf.h
X + xm_file=sparc/xm-netbsd.h
X + tmake_file=t-netbsd
X-+ use_collect2=yes
X + ;;
X sparc-*-netbsd*)
X tm_file=sparc/netbsd.h
X tmake_file=t-netbsd
X-@@ -3216,6 +3233,12 @@
X+@@ -3216,6 +3232,12 @@
X extra_parts="crtbegin.o crtbeginS.o crtend.o crtendS.o"
X gnu_ld=yes
X ;;
X@@ -49,7 +47,7 @@
X # This hasn't been upgraded to GCC 2.
X # tahoe-harris-*) # Harris tahoe, using COFF.
X # tm_file=tahoe/harris.h
X-@@ -3556,6 +3579,12 @@
X+@@ -3556,6 +3578,12 @@
X enable_haifa=yes;;
X esac
X fi
END-of-patch-patch-aq
exit
====================================================================
2) edit gcc/configure.in so that in gcc/Makefile.in the variable
TARGET_LIBGCC2_FLAGS = -fPIC
(otherwise we can't link shared libraries with -lgcc)
3) run autoconf on gcc/configure.in and update patch-aq
4) enable the sparc architecture in lang/gcc/Makefile
>Release-Note:
>Audit-Trail:
>Unformatted: