OpenPKG CVS Repository http://cvs.openpkg.org/ ____________________________________________________________________________
Server: cvs.openpkg.org Name: Ralf S. Engelschall Root: /e/openpkg/cvs Email: [EMAIL PROTECTED] Module: openpkg-src Date: 21-Apr-2004 09:56:23 Branch: HEAD Handle: 2004042108562300 Added files: openpkg-src/gcc33 gcc33.patch gcc33.spec Log: new package: gcc33 3.3.3 (GNU Compiler Collection) Summary: Revision Changes Path 1.5 +39 -0 openpkg-src/gcc33/gcc33.patch 1.42 +304 -0 openpkg-src/gcc33/gcc33.spec ____________________________________________________________________________ patch -p0 <<'@@ .' Index: openpkg-src/gcc33/gcc33.patch ============================================================================ $ cvs diff -u -r0 -r1.5 gcc33.patch --- /dev/null 2004-04-21 09:56:23.000000000 +0200 +++ gcc33.patch 2004-04-21 09:56:23.000000000 +0200 @@ -0,0 +1,39 @@ +Index: gcc/config/i386/sol2.h +--- gcc/config/i386/sol2.h.orig 2002-06-20 13:03:34.000000000 +0200 ++++ gcc/config/i386/sol2.h 2003-09-27 14:54:58.000000000 +0200 +@@ -66,3 +66,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 +Index: gcc/version.c +--- gcc/version.c.orig 2003-08-04 14:50:23.000000000 +0200 ++++ gcc/version.c 2003-09-27 15:01:39.000000000 +0200 +@@ -6,7 +6,7 @@ + please modify this string to indicate that, e.g. by putting your + organization's name in parentheses at the end of the string. */ + +-const char version_string[] = "3.3.3"; ++const char version_string[] = "3.3.3 (@l_openpkg_release@)"; + + /* This is the location of the online document giving instructions for + reporting bugs. If you distribute a modified version of GCC, +@@ -15,4 +15,4 @@ + forward us bugs reported to you, if you determine that they are + not bugs in your modifications.) */ + +-const char bug_report_url[] = "<URL:http://gcc.gnu.org/bugs.html>"; ++const char bug_report_url[] = "<URL:http://www.openpkg.org/>"; +Index: config.guess +--- config.guess.orig 2003-01-31 00:25:36.000000000 +0100 ++++ config.guess 2003-09-27 14:54:58.000000000 +0200 +@@ -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: @@ . patch -p0 <<'@@ .' Index: openpkg-src/gcc33/gcc33.spec ============================================================================ $ cvs diff -u -r0 -r1.42 gcc33.spec --- /dev/null 2004-04-21 09:56:23.000000000 +0200 +++ gcc33.spec 2004-04-21 09:56:23.000000000 +0200 @@ -0,0 +1,304 @@ +## +## gcc33.spec -- OpenPKG RPM Specification +## Copyright (c) 2000-2004 The OpenPKG Project <http://www.openpkg.org/> +## Copyright (c) 2000-2004 Ralf S. Engelschall <[EMAIL PROTECTED]> +## Copyright (c) 2000-2004 Cable & Wireless <http://www.cw.com/> +## +## Permission to use, copy, modify, and distribute this software for +## any purpose with or without fee is hereby granted, provided that +## the above copyright notice and this permission notice appear in all +## copies. +## +## THIS SOFTWARE IS PROVIDED ``AS IS'' AND ANY EXPRESSED OR IMPLIED +## WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF +## MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. +## IN NO EVENT SHALL THE AUTHORS AND COPYRIGHT HOLDERS AND THEIR +## CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, +## SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT +## LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF +## USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND +## ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, +## OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT +## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF +## SUCH DAMAGE. +## + +# package version +%define V_full 3.3.3 +%define V_comp 33 +%define V_bounds 3.3.3-1.00 +%define V_ssp 3.3-7 + +# package information +Name: gcc33 +Summary: GNU Compiler Collection +URL: http://gcc.gnu.org/ +Vendor: Free Software Foundation +Packager: The OpenPKG Project +Distribution: OpenPKG +Class: CORE +Group: Compiler +License: GPL +Version: %{V_full} +Release: 20040421 + +# package options +%option with_cxx yes +%option with_objc no +%option with_java no +%option with_f77 no +%option with_optimize yes +%option with_binutils yes +%option with_threads yes +%option with_bounds no +%option with_ssp no +%option with_gcc no + +# options sanity check +%if "%{with_bounds}" == "yes" && "%{with_ssp}" == "yes" + %{error:build-time options 'with_bounds' and 'with_ssp' conflict} +%endif + +# list of sources +Source0: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{version}/gcc-%{version}.tar.bz2 +Patch0: gcc33.patch +Patch1: http://web.inter.nl.net/hcc/Haj.Ten.Brugge/bounds-checking-gcc-%{V_bounds}.patch.bz2 +Patch2: http://www.trl.ibm.com/projects/security/ssp/gcc3_3/protector-%{V_ssp}.tar.gz + +# build information +Prefix: %{l_prefix} +BuildRoot: %{l_buildroot} +BuildPreReq: OpenPKG, openpkg >= 20040130, make +PreReq: OpenPKG, openpkg >= 20040130 +%if "%{with_binutils}" == "yes" +BuildPreReq: binutils >= 2.13 +PreReq: binutils >= 2.13 +%endif +AutoReq: no +AutoReqProv: no +%if "%{with_gcc}" == "yes" +Provides: gcc = %{version}-%{release} +%endif + +%description + The GNU Compiler Collection (GCC) provides a standard conforming and + highly portable ISO C and ISO C++ compiler. + +%track + prog gcc33 = { + version = %{version} + url = ftp://gcc.gnu.org/pub/gcc/releases/ + regex = ((\d+\.)+\d+) + url = ftp://gcc.gnu.org/pub/gcc/releases/gcc-__NEWVER__/ + regex = gcc-(__VER__)\.tar\.bz2 + } + prog gcc33:bounds = { + version = %{V_bounds} + url = http://web.inter.nl.net/hcc/Haj.Ten.Brugge/ + regex = bounds-checking-gcc-(__VER__).patch.bz2 + } + prog gcc33:spp = { + version = %{V_ssp} + url = http://www.trl.ibm.com/projects/security/ssp/ + regex = protector-(__VER__).tar.gz + } + +%prep + %setup -q -n gcc-%{version} + %patch -p0 +%if "%{with_bounds}" == "yes" + %patch -p1 -P 1 +%endif +%if "%{with_ssp}" == "yes" + ( cd gcc + %{l_gzip} -d -c %{PATCH protector-%{V_ssp}.tar.gz} | %{l_tar} xf - + %{l_patch} -p1 <protector.dif ) || exit $? +%endif + %{l_shtool} subst -v -s \ + -e 's;PREFIX_INCLUDE_DIR;PREFIX_INCLUDE_DIR_DISABLED;g' \ + gcc/configure + %{l_shtool} subst -v -s \ + -e 's;@l_openpkg_release@;%{l_openpkg_release -F "OpenPKG-%s"};' \ + gcc/version.c + +%build + # create build sub-directory + mkdir obj + cd obj + + # determine ld(1) and as(1) usage + l_with_gnu_ld_as="" +%if "%{with_binutils}" == "yes" + l_with_gnu_ld_as="${l_with_gnu_ld_as} --with-gnu-ld --with-ld=%{l_prefix}/bin/ld" + l_with_gnu_ld_as="${l_with_gnu_ld_as} --with-gnu-as --with-as=%{l_prefix}/bin/as" +%else + case "%{l_platform -t}" in + *-linux* | *-freebsd* ) + l_with_gnu_ld_as="${l_with_gnu_ld_as} --with-gnu-as --with-gnu-ld" + ;; + esac +%endif + + # determine threads usage +%if "%{with_threads}" == "yes" + l_enable_threads="posix" +%else + l_enable_threads="single" +%endif + + # determine language usage + l_enable_languages="c" +%if "%{with_cxx}" == "yes" + l_enable_languages="${l_enable_languages},c++" +%endif +%if "%{with_objc}" == "yes" + l_enable_languages="${l_enable_languages},objc" +%endif +%if "%{with_java}" == "yes" + l_enable_languages="${l_enable_languages},java" +%endif +%if "%{with_f77}" == "yes" + l_enable_languages="${l_enable_languages},f77" +%endif + + # configure the package + CC="%{l_cc}" \ + CFLAGS="%{l_cflags}" \ + ../configure \ + --prefix=%{l_prefix} \ + --exec-prefix=%{l_prefix} \ + --includedir=%{l_prefix}/include/gcc%{V_comp} \ + --with-gxx-include-dir=%{l_prefix}/include/g++%{V_comp} \ + --with-local-prefix=%{l_prefix}/lib/gcc%{V_comp}-lib \ + --enable-languages="${l_enable_languages}" \ + --enable-threads="${l_enable_threads}" \ + --disable-maintainer-mode \ + --disable-shared \ + --disable-nls \ + ${l_with_gnu_ld_as} + + # explicitly redirect remaining gcc library directories + %{l_shtool} subst -v -s \ + -e "s;/gcc-lib/;/gcc%{V_comp}-lib/;" \ + `find . -name Makefile -type f -print` + + # 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_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" + case "%{l_platform -t}" in + *i?86-* ) l_boot_cflags="$l_boot_cflags -mcpu=pentium3" ;; + *sun4u-* ) l_boot_cflags="$l_boot_cflags -mtune=v9" ;; + esac + 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_libcxxflags="$l_libcxxflags -O0" +%endif + + # build the package + %{l_make} %{l_mflags} \ + MAKE="%{l_make} %{l_mflags}" \ + BOOT_CFLAGS="${l_boot_cflags}" \ + CFLAGS="${l_cflags}" \ + LIBCFLAGS="${l_libcflags}" \ + LIBCXXFLAGS="${l_libcxxflags}" \ + bootstrap-lean + +%install + rm -rf $RPM_BUILD_ROOT + + # fetch GNU platform triple + triple=`./config.guess` + triple=`./config.sub ${triple}` + + # perform the standard installation procedure + ( cd obj + %{l_make} %{l_mflags} install DESTDIR=$RPM_BUILD_ROOT + ) || exit $? + + # cleanup installation tree + mv $RPM_BUILD_ROOT%{l_prefix}/lib/lib*.a \ + $RPM_BUILD_ROOT%{l_prefix}/lib/gcc%{V_comp}-lib/${triple}/%{V_full}/ + for multilib in `$RPM_BUILD_ROOT%{l_prefix}/bin/gcc --print-multi-lib`; do + subdir=`echo "$multilib" | sed -e 's/;.*$//'` + [ ".$subdir" = .. ] && continue + mv $RPM_BUILD_ROOT%{l_prefix}/lib/$subdir/lib*.a \ + $RPM_BUILD_ROOT%{l_prefix}/lib/gcc%{V_comp}-lib/${triple}/%{V_full}/$subdir/ + rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib/$subdir + done + mv $RPM_BUILD_ROOT%{l_prefix}/${triple}/include/* \ + $RPM_BUILD_ROOT%{l_prefix}/lib/gcc%{V_comp}-lib/${triple}/%{V_full}/include/ \ + >/dev/null 2>&1 || true +%if "%{with_java}" == "yes" + mv $RPM_BUILD_ROOT%{l_prefix}/share/java \ + $RPM_BUILD_ROOT%{l_prefix}/share/gcc +%endif + + # strip installation tree + rm -rf $RPM_BUILD_ROOT%{l_prefix}/${triple} + rm -rf $RPM_BUILD_ROOT%{l_prefix}/man/man7 >/dev/null 2>&1 || true + rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/*.la >/dev/null 2>&1 || true + rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/*-gcc* >/dev/null 2>&1 || true +%if "%{with_cxx}" == "yes" + rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/*-c++ >/dev/null 2>&1 || true + rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/*-g++ >/dev/null 2>&1 || true +%endif + strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true + for prog in cc1 cc1plus collect2 cpp; do + strip $RPM_BUILD_ROOT%{l_prefix}/lib/gcc%{V_comp}-lib/${triple}/%{V_full}/${prog} \ + >/dev/null 2>&1 || true + done + + # bump up installation tree + ln $RPM_BUILD_ROOT%{l_prefix}/bin/gcc \ + $RPM_BUILD_ROOT%{l_prefix}/bin/cc + ln $RPM_BUILD_ROOT%{l_prefix}/man/man1/gcc.1 \ + $RPM_BUILD_ROOT%{l_prefix}/man/man1/cc.1 +%if "%{with_cxx}" == "yes" + ln $RPM_BUILD_ROOT%{l_prefix}/man/man1/g++.1 \ + $RPM_BUILD_ROOT%{l_prefix}/man/man1/c++.1 +%endif + + # resolve filename conflicts +%if "%{with_gcc}" != "yes" && "%{V_comp}" != "" + ( cd $RPM_BUILD_ROOT%{l_prefix}/bin + for file in *; do + [ ".$file" = ".*" ] && continue + mv ${file} ${file}%{V_comp} + done + ) || exit $? + ( cd $RPM_BUILD_ROOT%{l_prefix}/info + for file in *; do + [ ".$file" = ".*" ] && continue + mv ${file} `echo ${file} | sed -e 's;^\([^.]*\)\(\..*\)$;\1%{V_comp}\2;'` + done + ) || exit $? + ( cd $RPM_BUILD_ROOT%{l_prefix}/man/man1 + for file in *; do + [ ".$file" = ".*" ] && continue + mv ${file} `echo ${file} | sed -e 's;^\([^.]*\)\(\..*\)$;\1%{V_comp}\2;'` + done + ) || exit $? +%endif + + # determine installation file list + %{l_rpmtool} files -v -ofiles -r$RPM_BUILD_ROOT %{l_files_std} + +%files -f files + +%clean + rm -rf $RPM_BUILD_ROOT + @@ . ______________________________________________________________________ The OpenPKG Project www.openpkg.org CVS Repository Commit List [EMAIL PROTECTED]