[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Updated gcc-ss package please?



Is there a chance a newer gcc-ss can be uploaded soon? I working with the
latest CVS right now, which is able to bootstrap sparc64-linux.

Attached are a few patches for sparc/sparc64 against binutils and gcc-ss.
Please apply them to your build trees.

Christopher, for the sparc/sparc64 binutils build, you can remove the hack
in the debian/rules file for the ldscript generation. The enclosed patch
supercedes that for binutils 2.10.

GCC, I have a huge patch set from Jakub (all clumped into one) along with
my own patch. Sorry it's not in dpatch style, but I've been pretty messy
with getting sparc64 bootstrapped so far (almost all of base is done,
getting ready to start fresh and do it right since proof-of-concept is
finished). The gcc-debian patch is against the current gcc-ss debian/
directory. It does some sparc specific changes, and also changes I had to
do to get it to build the latest CVS. The gcc-sparc.diff is my set for
sparc. I suggest only applying it for sparc. You can remove ALL other
sparc specific patches. Also note that gcc/configure needs to be
regenerated after this patch is installed.

Because of the size of the gcc diff, I have uploaded it here:

	http://auric.debian.org/~bcollins/gcc-sparc-sparc64.diff.bz2

Also note, I have taken over the glibc package from Joel, with his
blessing. I will be working on glibc 2.1.91, since it shouldn't be very long
before we have something that will work. So far I only have 3 issues with
upgrading to this. One is the need for a daemon restart just like with
2.0->2.1 upgrades. Also, perl needs to be recompiled. The last has to do
with libdb.so.3 being gone from libc6. Even worse, the version of libdb2
that can be symlinked to to supply this, does not have version information
like the one from glibc did. So some things (notably so far is man-db)
compain about it.

The last issue is, when will we have kernel-source-2.4.0pre's in woody?
This is very important to some of the upcoming ports to even begin
bootstrapping. Herbert, can we expect this soon?

Thanks,
  Ben

-- 
 -----------=======-=-======-=========-----------=====------------=-=------
/  Ben Collins  --  ...on that fantastic voyage...  --  Debian GNU/Linux   \
`  bcollins@debian.org  --  bcollins@openldap.org  --  bcollins@linux.com  '
 `---=========------=======-------------=-=-----=-===-======-------=--=---'
--- ld/emulparams/elf32_sparc.sh~	1999/05/03 07:29:07	1.1.1.1
+++ ld/emulparams/elf32_sparc.sh	2000/07/01 15:30:29
@@ -9,3 +9,37 @@
 TEMPLATE_NAME=elf32
 DATA_PLT=
 GENERATE_SHLIB_SCRIPT=yes
+
+if [ "x${host}" = "x${target}" ]; then
+  case " $EMULATION_LIBPATH " in
+    *" ${EMULATION_NAME} "*)
+      # Native, and default or emulation requesting LIB_PATH.
+
+      # Linux and Solaris modify the default library search path
+      # to first include a 32-bit specific directory.  It's put
+      # in slightly different places on the two systems.
+      case "$target" in
+        sparc64-linux*)
+          suffix=/32 ;;
+        sparc*-solaris*)
+          suffix=/sparcv7 ;;
+      esac
+
+      if [ -n "${suffix}" ]; then
+
+	LIB_PATH=/lib${suffix}:/lib
+	LIB_PATH=${LIB_PATH}:/usr/lib${suffix}:/usr/lib
+	if [ -n "${NATIVE_LIB_DIRS}" ]; then
+	  LIB_PATH=${LIB_PATH}:`echo ${NATIVE_LIB_DIRS} | sed s/:/${suffix}:/g`${suffix}:${NATIVE_LIB_DIRS}
+	fi
+	if [ "${libdir}" != /usr/lib ]; then
+	  LIB_PATH=${LIB_PATH}:${libdir}${suffix}:${libdir}
+	fi
+	if [ "${libdir}" != /usr/local/lib ]; then
+	  LIB_PATH=${LIB_PATH}:/usr/local/lib${suffix}:/usr/local/lib
+	fi
+
+      fi
+    ;;
+  esac
+fi
--- ld/emulparams/elf64_sparc.sh~	1999/07/16 21:43:43	1.2
+++ ld/emulparams/elf64_sparc.sh	2000/07/01 15:30:29
@@ -20,8 +20,8 @@
       # to first include a 64-bit specific directory.  It's put
       # in slightly different places on the two systems.
       case "$target" in
-        sparc*-linux*)
-          suffix=64 ;;
+        sparc-*linux*)
+          suffix=/64 ;;
         sparc*-solaris*)
           suffix=/sparcv9 ;;
       esac
diff -ruN debian.orig/gcc.postinst debian/gcc.postinst
--- debian.orig/gcc.postinst	Thu Apr 27 22:23:21 2000
+++ debian/gcc.postinst	Tue Jun  6 15:06:48 2000
@@ -6,8 +6,11 @@
 
 if [ "`dpkg --print-installation-architecture`" = sparc ]; then
     # Remove the old incorrect alternative
-    update-alternatives --remove sparc64-linux-gcc /usr/bin/gcc || true
     update-alternatives --remove sparc64-linux-gcc /usr/bin/sparc64-linux-gcc-wrapper || true
+
+    # Good one
+#    update-alternatives --install /usr/bin/sparc64-linux-gcc sparc64-linux-gcc \
+#    	/usr/bin/gcc 40
 fi
 
 #DEBHELPER#
diff -ruN debian.orig/gcc.prerm debian/gcc.prerm
--- debian.orig/gcc.prerm	Thu Apr 27 22:23:21 2000
+++ debian/gcc.prerm	Tue Jun  6 15:06:59 2000
@@ -2,6 +2,9 @@
 
 if [ $1 != "upgrade" ]; then
     update-alternatives --remove cc /usr/bin/gcc
+    if [ "`dpkg --print-installation-architecture`" = sparc ]; then
+#	update-alternatives --remove sparc64-linux-gcc /usr/bin/gcc
+    fi
 fi
 
 #DEBHELPER#
diff -ruN debian.orig/rules.conf debian/rules.conf
--- debian.orig/rules.conf	Thu Apr 27 22:23:22 2000
+++ debian/rules.conf	Mon May  1 01:14:52 2000
@@ -52,7 +52,7 @@
 if_config 	:= $(shell cd $(srcdir); \
 			topsrcdir=$(srcdir); \
 			target_os=$(DEB_HOST_GNU_SYSTEM)-gnu; \
-			target=$(DEB_HOST_GNU_TYPE); . config.if; \
+			target=$(DEB_HOST_GNU_TYPE); . config.if >/dev/null 2>&1; \
 			echo $$libstdcxx_interface $$cxx_interface $$libc_interface)
 LIBSTDCXX_IF	:= $(word 1, $(if_config))
 CXX_IF		:= $(word 2, $(if_config))
diff -ruN debian.orig/rules2 debian/rules2
--- debian.orig/rules2	Thu Apr 27 22:23:21 2000
+++ debian/rules2	Sat Jul  1 14:58:19 2000
@@ -84,19 +84,21 @@
   CONFARGS += --with-cpp-install-dir=bin
 endif
 ifeq ($(with_objc_gc),yes)
+ifneq ($(DEB_HOST_ARCH),sparc)
     CONFARGS += --enable-objc-gc
 endif
+endif
 # MULTILIBS is one or more of "gcc g++ stdc++ chill objc g77"
 # MULTIDIRS is in the format "32" or "{m68000,m68020,m68040}"
 ifeq ($(DEB_HOST_GNU_TYPE),sparc64-linux)
-    CONFARGS += --with-cpu=ultrasparc
-    MULTIDIRS := 32
+    CONFARGS += --with-cpu=sparc
+    MULTIDIRS := {32,alt}
     MULTILIBS := gcc g++ stdc++ chill objc g77
 endif
-ifeq ($(DEB_HOST_GNU_TYPE),sparc-linux-no)
-    CONFARGS += --with-cpu=v7
-    MULTIDIRS := 64
-    MULTILIBS := gcc
+ifeq ($(DEB_HOST_GNU_TYPE),sparc-linux)
+    CONFARGS += --with-cpu=ultrasparc
+    MULTIDIRS := {64,64/alt}
+    MULTILIBS := gcc g++ stdc++ chill objc g77
 endif
 CONFARGS += $(DEB_HOST_GNU_TYPE)
 
@@ -366,9 +363,6 @@
     dirs_gcc += $(gcc_lib_dir)/$(MULTIDIRS)
     files_gcc += $(gcc_lib_dir)/$(MULTIDIRS)/{libgcc.a,*.o}
 endif
-ifeq ($(DEB_HOST_GNU_TYPE),sparc-linux-no)
-    files_gcc += $(PF)/bin/sparc64-linux-gcc-wrapper
-endif
 
 ifeq ($(DEB_HOST_ARCH),powerpc)
   dirs_nof = \
@@ -637,7 +631,6 @@
 	: # Adjust installation such that we can begin moving things around:
 	$(IS) debian/c89 $(d)/$(PF)/bin/
 	$(IR) debian/c89.1 $(d)/$(PF)/share/man/man1/
-	mv $(d)/$(PF)/share/man/man1/cccp.1 $(d)/$(PF)/share/man/man1/cpp.1
 	: # - Remove files, which are not part of any package
 	rm -f $(d)/$(PF)/bin/$(DEB_HOST_GNU_TYPE)-gcc
 	rm -f $(d)/$(PF)/bin/{c++,c++filt}
@@ -764,11 +757,6 @@
 endif
 	dh_movefiles -p$(p_gpp) $(files_gpp)
 # gcc must be moved after g77 and g++
-ifeq ($(DEB_HOST_GNU_TYPE),sparc-linux-no)
-	: # compile the wrapper
-	$(CC) $(CFLAGS) -o debian/tmp/usr/bin/sparc64-linux-gcc-wrapper \
-		debian/sparc64-linux-gcc-wrapper.c
-endif
 	dh_movefiles -p$(p_gcc) $(files_gcc)
 
 	touch first-move-stamp
@@ -852,6 +840,7 @@
 
 	: # in the snapshot package the man pages aren't compressed by default.
 	dh_compress -a
+ifeq ($(with_libgpp),yes)
 	for i in $(usr_doc_files); do \
 	  b=`basename $$i`; \
 	  if [ -e $(d_lib)/$(docdir)/$(p_lib)/$$b ]; then \
@@ -860,6 +849,7 @@
 	    ln -sf ../$(p_lib)/$$b.gz $(d_lgp)/$(docdir)/$(p_lgp)/$$b.gz; \
 	  fi; \
 	done
+endif
 	dh_fixperms -a
 
 # when dh_installdeb is called from the snapshot package, the postinst/prerm
@@ -883,7 +873,7 @@
 		> debian/$(p_lgp).shlibs
   endif
 endif
-
+ifeq ($(with_libgpp),yes)
 	b=libg++; v=$(LGP_PKG_SONAME); \
 	for ext in preinst postinst prerm postrm; do \
 	  for t in '' -dev -dbg; do \
@@ -892,6 +882,7 @@
 	    fi; \
 	  done; \
 	done
+endif
 	b=libstdc++; v=$(PKG_SONAME); \
 	for ext in preinst postinst prerm postrm; do \
 	  for t in '' -dev -dbg; do \
diff -ruN debian.orig/sparc64-linux-gcc-wrapper.c debian/sparc64-linux-gcc-wrapper.c
--- debian.orig/sparc64-linux-gcc-wrapper.c	Thu Apr 27 22:23:22 2000
+++ debian/sparc64-linux-gcc-wrapper.c	Thu Jan  1 00:00:00 1970
@@ -1,42 +0,0 @@
-/* sparc64-linux-gcc-wrapper.c: a wrapper to set -m64 options for gcc
- *
- * Copyright (c) 1999 by Ben Collins <bcollins@debian.org>
- *
- * Licensed under the GNU GPL version 2 or later
- */
-
-#include <stdio.h>
-#include <stdlib.h>
-#include <unistd.h>
-
-#define GCC_SPARC_LINUX "/usr/bin/gcc"
-
-int main (int argc, char *argv[], char *envp[])
-{
-    int i;
-    char **newargs;
-
-    newargs = (char **) calloc ((size_t) (argc + 3), sizeof(char *));
-    if (newargs == NULL) {
-	fprintf (stderr, "%s: error mallocing space for args\n", argv[0]);
-	fprintf (stderr, "(note, this is not a gcc bug)\n");
-	exit(1);
-    }
-    newargs[0] = argv[0];
-    newargs[1] = "-m64";
-
-    for ( i = 1 ; i < argc ; i++ ) {
-	if (strcmp(argv[i], "-mmedlow") == 0)
-	    newargs[i+1] = "-mcmodel=medlow";
-	else
-	    newargs[i+1] = argv[i];
-    }
-
-    newargs[i+1] = NULL;
-
-    execve (GCC_SPARC_LINUX, newargs, envp);
-
-    fprintf (stderr, "%s: error executing %s\n", argv[0], GCC_SPARC_LINUX);
-    fprintf (stderr, "(note, this is not a gcc bug)\n");
-    exit(1);
-}

Reply to: