From 820b053dc093d28e7a57a5326d74bfb4858de88c Mon Sep 17 00:00:00 2001 From: "Ralf S. Engelschall" Date: Mon, 30 Dec 2002 17:56:17 +0000 Subject: [PATCH] - switch to %option(s) - upgrade to snapshot 2002-12-23 - activate version tracking again - fix %install procedure - merge in with_threads stuff from gcc package - merge in -O0 stuff from gcc package --- gcc33/gcc.patch | 11 --------- gcc33/gcc.sh | 62 ------------------------------------------------ gcc33/gcc33.spec | 62 ++++++++++++++++++++++-------------------------- 3 files changed, 28 insertions(+), 107 deletions(-) delete mode 100644 gcc33/gcc.patch delete mode 100644 gcc33/gcc.sh diff --git a/gcc33/gcc.patch b/gcc33/gcc.patch deleted file mode 100644 index 25fc2222b7..0000000000 --- a/gcc33/gcc.patch +++ /dev/null @@ -1,11 +0,0 @@ ---- config.guess.orig Tue Apr 16 02:15:59 2002 -+++ config.guess Fri Jun 28 17:19:43 2002 -@@ -166,7 +166,7 @@ - ;; - esac - # The OS release -- release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*/\./'` -+ release=`echo ${UNAME_RELEASE}|sed -e 's/[-_].*$//'` - # Since CPU_TYPE-MANUFACTURER-KERNEL-OPERATING_SYSTEM: - # contains redundant information, the shorter form: - # CPU_TYPE-MANUFACTURER-OPERATING_SYSTEM is used. diff --git a/gcc33/gcc.sh b/gcc33/gcc.sh deleted file mode 100644 index 9db0dc4eca..0000000000 --- a/gcc33/gcc.sh +++ /dev/null @@ -1,62 +0,0 @@ -#!/bin/sh -## -## gcc.sh -- GCC Package Build Utility -## Copyright (c) 2002 Ralf S. Engelschall -## - -check="$1" -shift -case $check in - require-binutils ) - # determine whether GNU gcc requires GNU binutils on this platform - require="no" - target="$1" - shift - case $target in - *-linux* ) - # under Linux the vendor ld is GNU binutils, - # but make sure it is GNU binutils >= 2.12 - if [ -f /etc/debian_version ]; then - v=`/usr/bin/dpkg -l binutils | grep binutils | awk '{ print $3; }'` - elif [ -f /etc/redhat-release ]; then - v=`/bin/rpm -q --qf '%{VERSION}' binutils` - elif [ -f /etc/SuSE-release ]; then - v=`/bin/rpm -q --qf '%{VERSION}' binutils` - else - v=`(/usr/bin/ld --version | grep 'GNU ld' | sed -e 's;^[^0-9]*\([0-9].[0-9.]*\).*;\1;') 2>/dev/null` - fi - case "$v" in - 2.1[2-9] | 2.1[2-9].* ) ;; - * ) require="yes" ;; - esac - ;; - *-freebsd* ) - # under FreeBSD the vendor ld is GNU binutils, - # but make sure it is GNU binutils >= 2.12 - v=`(/usr/bin/ld --version | grep 'GNU ld' | sed -e 's;^[^0-9]*\([0-9].[0-9.]*\).*;\1;') 2>/dev/null` - case "$v" in - 2.1[2-9] | 2.1[2-9].* ) ;; - * ) require="yes" ;; - esac - ;; - * ) - # under other OS the vendor ld is usually not GNU binutils, - # but if it is, make sure it is GNU binutils >= 2.12 - for dir in /bin /usr/bin /usr/ccs/bin /sbin /usr/sbin /usr/ccs/sbin; do - if [ -f "$dir/ld" ]; then - if [ ".`($dir/ld --version) 2>/dev/null | grep 'GNU ld'`" != . ]; then - v=`($dir/ld --version | grep 'GNU ld' | sed -e 's;^[^0-9]*\([0-9].[0-9.]*\).*;\1;') 2>/dev/null` - # require GNU binutils >= 2.12 - case "$v" in - 2.1[2-9] | 2.1[2-9].* ) ;; - * ) require="yes"; break ;; - esac - fi - fi - done - ;; - esac - echo "$require" | awk '{ printf("%s", $1); }' - ;; -esac - diff --git a/gcc33/gcc33.spec b/gcc33/gcc33.spec index 6960ec4f2e..1fd4f908e2 100644 --- a/gcc33/gcc33.spec +++ b/gcc33/gcc33.spec @@ -26,41 +26,35 @@ # package versions %define V_major 3.3 %define V_short 33 -%define V_snap 20021014 +%define V_snap_comp 20021223 +%define V_snap_dash 2002-12-23 # package options -%ifndef with_cxx -%define with_cxx yes -%endif -%ifndef with_optimize -%define with_optimize yes -%endif -%ifndef with_binutils -%define with_binutils %(if [ -f %{SOURCE gcc.sh} ]; then sh %{SOURCE gcc.sh} require-binutils %{l_target}; else echo "no"; fi) -%endif +%option with_cxx yes +%option with_optimize yes +%option with_binutils yes +%option with_threads yes # package information Name: gcc33 -Summary: GNU Compiler Collection (VERSION 3.3 SNAPSHOT) +Summary: GNU Compiler Collection (3.3) URL: http://gcc.gnu.org/ Vendor: Free Software Foundation Packager: The OpenPKG Project Distribution: OpenPKG [CORE] Group: Language License: GPL -Version: %{V_major}s%{V_snap} -Release: 20021018 +Version: %{V_major}s%{V_snap_comp} +Release: 20021230 # list of sources -Source0: gcc-%{V_major}-snapshot-%{V_snap}.tar.bz2 -Source1: gcc.sh -Patch0: gcc.patch +Source0: ftp://gcc.gnu.org/pub/gcc/snapshots/%{V_snap_dash}/gcc-%{V_snap_comp}.tar.bz2 # build information Prefix: %{l_prefix} BuildRoot: %{l_buildroot} -BuildPreReq: OpenPKG, openpkg >= 20020206, make -PreReq: OpenPKG, openpkg >= 20020206 +BuildPreReq: OpenPKG, openpkg >= 20021230, make +PreReq: OpenPKG, openpkg >= 20021230 %if "%{with_binutils}" == "yes" BuildPreReq: binutils >= 2.13 PreReq: binutils >= 2.13 @@ -72,14 +66,10 @@ AutoReqProv: no The GNU Compiler Collection (GCC) provides a standard conforming and highly portable ISO C and ISO C++ compiler. - Options: - --define 'with_cxx %{with_cxx}' - --define 'with_optimize %{with_optimize}' - --define 'with_binutils %{with_binutils}' + %options -p13 %prep - %setup -q -n gcc-%{V_major}-snapshot - %patch -p0 + %setup -q -n gcc-%{V_snap_comp} %{l_shtool} subst -v -s \ -e "s;PREFIX_INCLUDE_DIR;PREFIX_INCLUDE_DIR_DISABLED;g" \ gcc/configure @@ -105,7 +95,11 @@ AutoReqProv: no %else --enable-languages="c" \ %endif - --enable-threads \ +%if "%{with_threads}" == "yes" + --enable-threads=posix \ +%else + --enable-threads=single \ +%endif --disable-maintainer-mode \ --disable-shared \ --disable-nls \ @@ -130,10 +124,10 @@ AutoReqProv: no *-osf* ) l_boot_cflags="-O" ;; esac %else - l_boot_cflags="" + l_boot_cflags="-O0" l_cflags="" - l_libcflags="-g" - l_libcxxflags="-g" + l_libcflags="-g -O0" + l_libcxxflags="-g -O0" %endif %{l_make} %{l_mflags} \ MAKE="%{l_make} %{l_mflags}" \ @@ -202,14 +196,14 @@ AutoReqProv: no done # cleanup tree - rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/gcc-lib + rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib/gcc-lib rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/libiberty.a - rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/gcc%{V_short}-lib/$triple/%{version}/libstdc++.a + rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/gcc%{V_short}-lib/$triple/%{V_major}/libstdc++.a mv $RPM_BUILD_ROOT%{l_prefix}/lib/libstdc++.a* \ - $RPM_BUILD_ROOT%{l_prefix}/lib/gcc%{V_short}-lib/$triple/%{version}/libstdc++.a - rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/gcc%{V_short}-lib/$triple/%{version}/libsupc++.a + $RPM_BUILD_ROOT%{l_prefix}/lib/gcc%{V_short}-lib/$triple/%{V_major}/libstdc++.a + rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/gcc%{V_short}-lib/$triple/%{V_major}/libsupc++.a mv $RPM_BUILD_ROOT%{l_prefix}/lib/libsupc++.a* \ - $RPM_BUILD_ROOT%{l_prefix}/lib/gcc%{V_short}-lib/$triple/%{version}/libsupc++.a + $RPM_BUILD_ROOT%{l_prefix}/lib/gcc%{V_short}-lib/$triple/%{V_major}/libsupc++.a # rename files ( cd $RPM_BUILD_ROOT%{l_prefix}/bin @@ -229,7 +223,7 @@ AutoReqProv: no ) # create file list - %{l_rpmtool} files -v -o$RPM_BUILD_DIR/gcc-%{V_major}-snapshot/files -r$RPM_BUILD_ROOT %{l_files_std} + %{l_rpmtool} files -v -o$RPM_BUILD_DIR/gcc-%{V_snap_comp}/files -r$RPM_BUILD_ROOT %{l_files_std} %files -f files