Sfoglia il codice sorgente

finally fix the build flags handling; add partial patch from gcc package

Ralf S. Engelschall 23 anni fa
parent
commit
f3a48e8c29
2 ha cambiato i file con 29 aggiunte e 8 eliminazioni
  1. 20 0
      gcc33/gcc33.patch
  2. 9 8
      gcc33/gcc33.spec

+ 20 - 0
gcc33/gcc33.patch

@@ -0,0 +1,20 @@
+--- config.guess.orig	Thu Jan 30 23:32:36 2003
++++ config.guess	Wed Feb  5 09:54:43 2003
+@@ -188,7 +188,7 @@
+ 		release='-gnu'
+ 		;;
+ 	    *)
+-		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'`
++		release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*//'`
+ 		;;
+ 	esac
+ 	# Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM:
+--- gcc/config/i386/sol2.h.dist Thu Feb 27 15:00:54 2003
++++ gcc/config/i386/sol2.h      Thu Feb 27 14:20:50 2003
+@@ -160,3 +160,5 @@
+ 
+ /* The Solaris assembler does not support .quad.  Do not use it.  */
+ #undef ASM_QUAD
++#undef DEFAULT_PCC_STRUCT_RETURN
++#define DEFAULT_PCC_STRUCT_RETURN 1
+

+ 9 - 8
gcc33/gcc33.spec

@@ -39,7 +39,7 @@ Distribution: OpenPKG [EVAL]
 Group:        Language
 License:      GPL
 Version:      %{V_full}s%{V_snap_comp}
-Release:      20030630
+Release:      20030701
 
 #   package options
 %option       with_cxx       yes
@@ -50,6 +50,7 @@ Release:      20030630
 
 #   list of sources
 Source0:      ftp://gcc.gnu.org/pub/gcc/snapshots/%{V_snap_dash}/gcc-%{V_snap_comp}.tar.bz2
+Patch0:       gcc33.patch
 
 #   build information
 Prefix:       %{l_prefix}
@@ -72,6 +73,7 @@ Provides:     gcc = %{version}-%{release}
 
 %prep
     %setup -q -n gcc-%{V_snap_comp}
+    %patch -p0
     %{l_shtool} subst -v -s \
         -e "s;PREFIX_INCLUDE_DIR;PREFIX_INCLUDE_DIR_DISABLED;g" \
         gcc/configure
@@ -129,30 +131,29 @@ Provides:     gcc = %{version}-%{release}
         `find . -name Makefile -type f -print`
 
     #   determine build flags
-    l_cflags=""
     l_boot_cflags=""
+    l_cflags=""
     l_libcflags="-g"
     l_libcxxflags="-g"
 %if "%{with_binutils}" == "yes"
     #   at least GNU as from GNU binutils supports -pipe always
-    l_boot_cflags="$l_boot_cflags -pipe"
+    l_cflags="$l_cflags -pipe"
     l_libcflags="$l_libcflags -pipe"
     l_libcxxflags="$l_libcxxflags -pipe"
 %endif
 %if "%{with_optimize}" == "yes"
     #   conservatively optimize the generated program code
     #   (also _tune_ for particular CPUs, but _without_ requiring these CPUs!)
-    l_cflags="$l_cflags -O"
-    l_boot_cflags="$l_boot_cflags -O2 -fomit-frame-pointer -funroll-loops"
+    l_cflags="$l_cflags -O2 -fomit-frame-pointer -funroll-loops"
     case "%{l_target}" in
-        *x86-*     ) l_boot_cflags="$l_boot_cflags -mcpu=pentium3" ;;
-        *sparc64-* ) l_boot_cflags="$l_boot_cflags -mtune=v9"      ;;
+        *x86-*     ) l_cflags="$l_cflags -mcpu=pentium3" ;;
+        *sparc64-* ) l_cflags="$l_cflags -mtune=v9"      ;;
     esac
     l_libcflags="$l_libcflags -O2"
     l_libcxxflags="$l_libcxxflags -O2 -fno-implicit-templates"
 %else
     #   else do no optimizations at all to reduce problems to minimum in advance
-    l_boot_cflags="$l_boot_cflags -O0"
+    l_cflags="$l_cflags -O0"
     l_libcflags="$l_libcflags -O0"
     l_libcxxflags="$l_libcxxflags -O0"
 %endif