diff -Naur --exclude='*~' --exclude='*.info*' gcc-3.2.2-original/gcc/config/sparc/#t-sparcbare# gcc-3.2.2/gcc/config/sparc/#t-sparcbare# --- gcc-3.2.2-original/gcc/config/sparc/#t-sparcbare# 1970-01-01 01:00:00.000000000 +0100 +++ gcc-3.2.2/gcc/config/sparc/#t-sparcbare# 2004-06-09 17:46:48.000000000 +0200 @@ -0,0 +1,28 @@ +# configuration file for a bare sparc cpu + +LIB1ASMSRC = sparc/lb1spc.asm +LIB1ASMFUNCS = _mulsi3 _divsi3 _modsi3 + +# We want fine grained libraries, so use the new code to build the +# floating point emulation libraries. +FPBIT = fp-bit.c +DPBIT = dp-bit.c + +dp-bit.c: $(srcdir)/config/fp-bit.c + cat $(srcdir)/config/fp-bit.c > dp-bit.c + +fp-bit.c: $(srcdir)/config/fp-bit.c + echo '#define FLOAT' > fp-bit.c + cat $(srcdir)/config/fp-bit.c >> fp-bit.c + +# MULTILIB_OPTIONS should have msparclite too, but we'd have to make +# gas build... +MULTILIB_OPTIONS = msoft-float mcpu=v8 mopic-none +MULTILIB_DIRNAMES = soft v8 pic-none +MULTILIB_MATCHES = msoft-float=mno-fpu mcpu?v8=mv8 + +# Compile libgcc2.a with no pic. +# TARGET_LIBGCC2_CFLAGS = + +LIBGCC = stmp-multilib +INSTALL_LIBGCC = install-multilib diff -Naur --exclude='*~' --exclude='*.info*' gcc-3.2.2-original/gcc/config/sparc/sparc.h gcc-3.2.2/gcc/config/sparc/sparc.h --- gcc-3.2.2-original/gcc/config/sparc/sparc.h 2002-06-24 18:50:44.000000000 +0200 +++ gcc-3.2.2/gcc/config/sparc/sparc.h 2004-06-09 17:46:48.000000000 +0200 @@ -597,6 +597,8 @@ N_("Optimize tail call instructions in assembler and linker") }, \ {"no-relax", 0, \ N_("Do not optimize tail call instructions in assembler or linker") }, \ + {"pic-none", 0, \ + N_("Dummy switch for multlib to select pic-less libgcc") }, \ SUBTARGET_SWITCHES \ { "", TARGET_DEFAULT, ""}} diff -Naur --exclude='*~' --exclude='*.info*' gcc-3.2.2-original/gcc/config/sparc/t-sparcbare gcc-3.2.2/gcc/config/sparc/t-sparcbare --- gcc-3.2.2-original/gcc/config/sparc/t-sparcbare 2001-05-17 05:16:12.000000000 +0200 +++ gcc-3.2.2/gcc/config/sparc/t-sparcbare 2004-06-09 17:46:48.000000000 +0200 @@ -17,9 +17,12 @@ # MULTILIB_OPTIONS should have msparclite too, but we'd have to make # gas build... -MULTILIB_OPTIONS = msoft-float mcpu=v8 -MULTILIB_DIRNAMES = soft v8 -MULTILIB_MATCHES = msoft-float=mno-fpu mcpu?v8=mv8 +MULTILIB_OPTIONS = msoft-float mcpu=v8 mpic-none +MULTILIB_DIRNAMES = soft v8 pic-none +MULTILIB_MATCHES = msoft-float=mno-fpu mcpu?v8=mv8 + +# Compile libgcc2.a with no pic. +# TARGET_LIBGCC2_CFLAGS = LIBGCC = stmp-multilib INSTALL_LIBGCC = install-multilib diff -Naur --exclude='*~' --exclude='*.info*' gcc-3.2.2-original/gcc/config.gcc gcc-3.2.2/gcc/config.gcc --- gcc-3.2.2-original/gcc/config.gcc 2003-01-30 15:03:42.000000000 +0100 +++ gcc-3.2.2/gcc/config.gcc 2004-06-09 17:46:44.000000000 +0200 @@ -3628,6 +3628,10 @@ .supersparc | .hypersparc | .ultrasparc | .v7 | .v8 | .v9) target_cpu_default2="TARGET_CPU_$with_cpu" ;; + .leon) + tmake_file="${tmake_file} sparc/t-sparcbare" # build lib for softfloat with option -msoft-float + target_cpu_default2=TARGET_CPU_"`echo $machine | sed 's/-.*$//'`" + ;; *) if test x$pass2done = xyes then diff -Naur --exclude='*~' --exclude='*.info*' gcc-3.2.2-original/gcc/config.gcc.rej gcc-3.2.2/gcc/config.gcc.rej --- gcc-3.2.2-original/gcc/config.gcc.rej 1970-01-01 01:00:00.000000000 +0100 +++ gcc-3.2.2/gcc/config.gcc.rej 2004-06-09 17:46:50.000000000 +0200 @@ -0,0 +1,19 @@ +*************** +*** 3628,3633 **** + .supersparc | .hypersparc | .ultrasparc | .v7 | .v8 | .v9) + target_cpu_default2="TARGET_CPU_$with_cpu" + ;; + *) + if test x$pass2done = xyes + then +--- 3628,3637 ---- + .supersparc | .hypersparc | .ultrasparc | .v7 | .v8 | .v9) + target_cpu_default2="TARGET_CPU_$with_cpu" + ;; ++ .leon) ++ tmake_file="${tmake_file} sparc/t-sparcbare" # build lib for softfloat with option -msoft-float ++ target_cpu_default2=TARGET_CPU_"`echo $machine | sed 's/-.*$//'`" ++ ;; + *) + if test x$pass2done = xyes + then diff -Naur --exclude='*~' --exclude='*.info*' gcc-3.2.2-original/gcc/mklibgcc.in gcc-3.2.2/gcc/mklibgcc.in --- gcc-3.2.2-original/gcc/mklibgcc.in 2003-01-28 22:57:40.000000000 +0100 +++ gcc-3.2.2/gcc/mklibgcc.in 2004-06-09 17:46:50.000000000 +0200 @@ -49,7 +49,7 @@ # Build lines. -gcc_compile='$(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES)' +gcc_compile='sh $(srcdir)/stamp.sh $(GCC_FOR_TARGET) $(LIBGCC2_CFLAGS) $(INCLUDES)' make_compile='$(MAKE) GCC_FOR_TARGET="$(GCC_FOR_TARGET)" \ AR_FOR_TARGET="$(AR_FOR_TARGET)" \ AR_CREATE_FOR_TARGET="$(AR_CREATE_FOR_TARGET)" \ diff -Naur --exclude='*~' --exclude='*.info*' gcc-3.2.2-original/gcc/stamp.sh gcc-3.2.2/gcc/stamp.sh --- gcc-3.2.2-original/gcc/stamp.sh 1970-01-01 01:00:00.000000000 +0100 +++ gcc-3.2.2/gcc/stamp.sh 2004-06-09 17:46:50.000000000 +0200 @@ -0,0 +1,36 @@ +#!/bin/sh +# remove -fpic and -fPIC flags if dummy flag -mpic-none is given. +# -mpic-none is uesd for multilib selection of pic less libgcc +# programs linked with pic less libgcc can be converted to flat +# filesystem with elf2flat + +args="" +found_pic_none="" +pic_flags="" + +exe=$1 +shift + +while [ x"$1" != x ]; do + case $1 in + -mpic-none ) + found_pic_none="y" + shift + continue;; + -fPIC | -fpic ) + pic_flags="$pic_flags $1" + shift + continue;; + *) + args="$args $1" + shift + continue;; + esac +done + +if [ x"$found_pic_none" == x ]; then + args="$args $pic_flags" +fi + +echo "execute: $exe $args" +exec $exe $args