Просмотр исходного кода

upgrade to latest snapshot and merge in flag stuff from gcc package

Ralf S. Engelschall 23 лет назад
Родитель
Сommit
df1480715e
1 измененных файлов с 28 добавлено и 12 удалено
  1. 28 12
      gcc33/gcc33.spec

+ 28 - 12
gcc33/gcc33.spec

@@ -26,8 +26,8 @@
 #   package versions
 %define       V_major_dot    3.3
 %define       V_major_comp   33
-%define       V_snap_dash    2003-03-03
-%define       V_snap_comp    20030303
+%define       V_snap_dash    2003-03-10
+%define       V_snap_comp    20030310
 
 #   package information
 Name:         gcc33
@@ -39,7 +39,7 @@ Distribution: OpenPKG [EVAL]
 Group:        Language
 License:      GPL
 Version:      %{V_major_dot}s%{V_snap_comp}
-Release:      20030304
+Release:      20030310
 
 #   package options
 %option       with_cxx       yes
@@ -126,17 +126,33 @@ AutoReqProv:  no
         -e "s;/gcc-lib/;/gcc%{V_major_comp}-lib/;" \
         `find . -name Makefile -type f -print`
 
-    #   determine build parameters
+    #   determine build flags
+    l_cflags=""
+    l_boot_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_libcflags="$l_libcflags -pipe"
+    l_libcxxflags="$l_libcxxflags -pipe"
+%endif
 %if "%{with_optimize}" == "yes"
-    l_boot_cflags="-O2"
-    l_cflags="-O"
-    l_libcflags="-g -O2"
-    l_libcxxflags="-g -O2 -fno-implicit-templates"
+    #   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"
+    case "%{l_target}" in
+        *x86-*     ) l_boot_cflags="$l_boot_cflags -mcpu=pentium3" ;;
+        *sparc64-* ) l_boot_cflags="$l_boot_cflags -mtune=v9"      ;;
+    esac
+    l_libcflags="$l_libcflags -O2"
+    l_libcxxflags="$l_libcxxflags -O2 -fno-implicit-templates"
 %else
-    l_boot_cflags="-O0"
-    l_cflags=""
-    l_libcflags="-g -O0"
-    l_libcxxflags="-g -O0"
+    #   else do no optimizations at all to reduce problems to minimum in advance
+    l_boot_cflags="$l_boot_cflags -O0"
+    l_libcflags="$l_libcflags -O0"
+    l_libcxxflags="$l_libcxxflags -O0"
 %endif
 
     #   build the package