Explorar el Código

finally fix the build flags handling

Ralf S. Engelschall hace 23 años
padre
commit
8e1db1d0df
Se han modificado 3 ficheros con 21 adiciones y 23 borrados
  1. 1 1
      gcc/gcc.patch
  2. 11 12
      gcc/gcc.spec
  3. 9 10
      gcc32/gcc32.spec

+ 1 - 1
gcc/gcc.patch

@@ -25,7 +25,7 @@
  	conftest2.o conftest3.o; then
      gcc_cv_ld_ro_rw_mix=`$gcc_cv_objdump -h conftest1.so \
 -			 | grep -A1 myfoosect`
-+			 | sed -ne '/myfoosect/{N;p}'`
++			 | sed -ne '/myfoosect/{N;p;}'`
      if echo "$gcc_cv_ld_ro_rw_mix" | grep CONTENTS > /dev/null; then
        if echo "$gcc_cv_ld_ro_rw_mix" | grep READONLY > /dev/null; then
  	gcc_cv_ld_ro_rw_mix=read-only

+ 11 - 12
gcc/gcc.spec

@@ -38,7 +38,7 @@ Distribution: OpenPKG [CORE]
 Group:        Language
 License:      GPL
 Version:      %{V_full}
-Release:      20030625
+Release:      20030701
 
 #   package options
 %option       with_cxx       yes
@@ -135,30 +135,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"
-    l_libcflags="$l_libcflags"
-    l_libcxxflags="$l_libcxxflags"
+    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 -O"
-    l_libcxxflags="$l_libcxxflags -O -fno-implicit-templates"
+    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

+ 9 - 10
gcc32/gcc32.spec

@@ -38,7 +38,7 @@ Distribution: OpenPKG [PLUS]
 Group:        Language
 License:      GPL
 Version:      %{V_full}
-Release:      20030630
+Release:      20030701
 
 #   package options
 %option       with_cxx       yes
@@ -135,30 +135,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"
-    l_libcflags="$l_libcflags"
-    l_libcxxflags="$l_libcxxflags"
+    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 -O"
     l_libcxxflags="$l_libcxxflags -O -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