%define PREFIX /opt/egcs %define EGCS_VERSION 1.1.2 %define EGCS_RELEASE 1a %define FULLVER egcs-2.91.66 %define SOURCEURL egcs-%{EGCS_VERSION}.tar.bz2 %define LIBSTDCPP_MAJVER 2.9 %define LIBSTDCPP_MINVER 0 %define LIBSTDCPP_VERSION %{LIBSTDCPP_MAJVER}.%{LIBSTDCPP_MINVER} %define LIBSTDCPP_RELEASE 1d # EGCS-1.0.2 compatibility %define FULLVER2 egcs-2.90.25 Summary: Experimental GNU Compiler System Name: egcs Version: %{EGCS_VERSION} Release: %{EGCS_RELEASE} Copyright: GPL Group: Development/Languages Source: %{SOURCEURL} Patch0: egcs-1.1-ppc_config_no_update.patch Patch1: egcs-1.1-ppc_readme.patch Patch2: egcs-1.1-ppc_mcount.patch Patch3: egcs-1.1-ppc_varargs.patch Patch4: egcs-1.1-ppc_stack_align.patch Patch5: egcs-1.1-ppc_not_glibc1.patch Patch6: egcs-1.1-ppc_no-vtable-thunks.patch Patch7: egcs-1.1-reload.patch BuildRoot: /tmp/egcs-root URL: http://www.cygnus.com/egcs/ Requires: binutils %description A compiler aimed at integrating all the optimizations and features necessary for a high-performance and stable development environment. %package as-gcc Summary: Wrappers which allow EGCS to replace GCC. Group: Development/Languages Requires: egcs %description as-gcc Wrappers which allow EGCS to replace GCC. EGCS is installed in a benign fashion and can operate along side of GCC. These wrappers allow the EGCS suite to completely replace GCC. In order to use them, you should remove all vestiges of GCC before installing since this package overlaps the GCC packages. %package c++ Summary: C++ support for gcc Group: Development/Languages #Requires: egcs = %{EGCS_VERSION} Requires: egcs %description c++ C++ support for gcc %package objc Summary: Objective C support for gcc Group: Development/Languages #Requires: egcs = %{EGCS_VERSION} Requires: egcs %description objc Objective C support for gcc %package g77 Summary: Fortran 77 support for gcc Group: Development/Languages #Requires: egcs = %{EGCS_VERSION} Requires: egcs %description g77 Fortran 77 support for gcc %package libstdc++ Summary: GNU c++ library Group: Libraries Version: %{LIBSTDCPP_VERSION} Release: %{LIBSTDCPP_RELEASE} %description libstdc++ This is the GNU implementation of the standard C++ libraries, along with additional GNU tools. This package includes the shared libraries necessary to run C++ applications. %package libstdc++-devel Summary: Header files and libraries for C++ development Group: Development/Libraries Version: %{LIBSTDCPP_VERSION} Release: %{LIBSTDCPP_RELEASE} %description libstdc++-devel This is the GNU implementation of the standard C++ libraries. This package includes the header files and libraries needed for C++ development. #-- # Prep #-- %prep # Notes: # the nof %setup -q -c -n egcs-%{EGCS_VERSION} -T cd ../ bzip2 -dc $RPM_SOURCE_DIR/%{SOURCEURL} | tar -xvf - cd $RPM_BUILD_DIR/egcs-%{EGCS_VERSION} %patch0 -p1 %patch1 -p1 %patch2 -p1 %patch3 -p1 %patch4 -p1 %patch5 -p1 %patch6 -p1 %patch7 -p0 #-- # Build #-- %build %ifarch i386 %define GCCARCH i386 %define GCCDIR %{GCCARCH}-linux %endif %ifarch axp %define GCCARCH alpha %define GCCDIR %{GCCARCH}-linux %endif %ifarch sparc %define GCCARCH sparc %define GCCDIR %{GCCARCH}-linux %endif %ifarch ppc %define GCCARCH ppc %define GCCDIR powerpc-unknown-linux-gnulibc1 %endif %ifarch ppc # I want some different options CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" \ ./configure --host=%{GCCDIR} \ --prefix=%{PREFIX} \ --enable-shared --enable-haifa %else CFLAGS="$RPM_OPT_FLAGS" CXXFLAGS="$RPM_OPT_FLAGS" ./configure \ --enable-threads=posix \ --prefix=%{PREFIX} \ --with-gxx-include-dir=%{PREFIX}/include/g++ \ --enable-shared \ %{GCCDIR} %endif make #-- # Install #-- %install rm -rf $RPM_BUILD_ROOT mkdir -p $RPM_BUILD_ROOT/usr/bin mkdir -p $RPM_BUILD_ROOT/usr/include mkdir -p $RPM_BUILD_ROOT%{PREFIX}/info $RPM_BUILD_ROOT/lib PATH=$PATH:/sbin:/usr/sbin make prefix=$RPM_BUILD_ROOT%{PREFIX} install strip $RPM_BUILD_ROOT%{PREFIX}/bin/* gzip -n -9f $RPM_BUILD_ROOT%{PREFIX}/info/*.info* ln -sf cccp.1 $RPM_BUILD_ROOT%{PREFIX}/man/man1/cpp.1 ln -sf gcc $RPM_BUILD_ROOT%{PREFIX}/bin/cc ln -sf g77 $RPM_BUILD_ROOT%{PREFIX}/bin/f77 ln -sf ..%{PREFIX}/lib/gcc-lib/%{GCCDIR}/%{FULLVER}/cpp $RPM_BUILD_ROOT/lib/cpp ln -sf ../..%{PREFIX}/bin/gcc ${RPM_BUILD_ROOT}/usr/bin/cc ln -sf ../..%{PREFIX}/bin/gcc ${RPM_BUILD_ROOT}/usr/bin/gcc ln -sf ../..%{PREFIX}/bin/c++ ${RPM_BUILD_ROOT}/usr/bin/c++ ln -sf ../..%{PREFIX}/bin/g++ ${RPM_BUILD_ROOT}/usr/bin/g++ ln -sf ../..%{PREFIX}/bin/g77 ${RPM_BUILD_ROOT}/usr/bin/f77 ln -sf ../..%{PREFIX}/bin/g77 ${RPM_BUILD_ROOT}/usr/bin/g77 ln -sf ../..%{PREFIX}/include/g++ ${RPM_BUILD_ROOT}/usr/include strip \ ${RPM_BUILD_ROOT}%{PREFIX}/lib/gcc-lib/%{GCCDIR}/%{FULLVER}/{cc1,cc1obj,cc1plus,cpp,f771,collect2} ln -sf %{FULLVER} ${RPM_BUILD_ROOT}%{PREFIX}/lib/gcc-lib/%{GCCDIR}/%{FULLVER2} #-- # Create the list of files for the base package. #-- cat > rpm-files << EOF %defattr(-,root,root) %doc README* COPYING COPYING.LIB %dir %{PREFIX}/lib/gcc-lib %dir %{PREFIX}/lib/gcc-lib/%{GCCDIR} %dir %{PREFIX}/lib/gcc-lib/%{GCCDIR}/%{FULLVER} %dir %{PREFIX}/lib/gcc-lib/%{GCCDIR}/%{FULLVER}/include %{PREFIX}/bin/%{GCCDIR}-gcc %{PREFIX}/bin/gcc %{PREFIX}/bin/cc %{PREFIX}/bin/gcov %{PREFIX}/bin/protoize %{PREFIX}/bin/unprotoize %{PREFIX}/man/man1/cpp.1 %{PREFIX}/man/man1/cccp.1 %{PREFIX}/man/man1/gcc.1 %{PREFIX}/info/cpp.info*.gz %{PREFIX}/info/gcc.info*.gz %{PREFIX}/lib/gcc-lib/%{GCCDIR}/%{FULLVER2} %{PREFIX}/lib/gcc-lib/%{GCCDIR}/%{FULLVER}/SYSCALLS.c.X %{PREFIX}/lib/gcc-lib/%{GCCDIR}/%{FULLVER}/cc1 %{PREFIX}/lib/gcc-lib/%{GCCDIR}/%{FULLVER}/cpp %{PREFIX}/lib/gcc-lib/%{GCCDIR}/%{FULLVER}/collect2 %{PREFIX}/lib/gcc-lib/%{GCCDIR}/%{FULLVER}/specs %{PREFIX}/lib/gcc-lib/%{GCCDIR}/%{FULLVER}/libgcc.a %{PREFIX}/lib/gcc-lib/%{GCCDIR}/%{FULLVER}/crtbegin.o %{PREFIX}/lib/gcc-lib/%{GCCDIR}/%{FULLVER}/crtbeginS.o %{PREFIX}/lib/gcc-lib/%{GCCDIR}/%{FULLVER}/crtend.o %{PREFIX}/lib/gcc-lib/%{GCCDIR}/%{FULLVER}/crtendS.o %ifarch ppc %{PREFIX}/lib/gcc-lib/%{GCCDIR}/%{FULLVER}/nof %{PREFIX}/lib/gcc-lib/%{GCCDIR}/%{FULLVER}/ecrti.o %{PREFIX}/lib/gcc-lib/%{GCCDIR}/%{FULLVER}/ecrtn.o %{PREFIX}/lib/gcc-lib/%{GCCDIR}/%{FULLVER}/scrt0.o %{PREFIX}/lib/gcc-lib/%{GCCDIR}/%{FULLVER}/scrti.o %{PREFIX}/lib/gcc-lib/%{GCCDIR}/%{FULLVER}/scrtn.o %endif EOF DIR="${RPM_BUILD_ROOT}%{PREFIX}/lib/gcc-lib/%{GCCDIR}/%{FULLVER}/include" ls -d $DIR/* | sed -e "s;^$RPM_BUILD_ROOT;;" | \ grep -v exception | grep -v new | grep -v typeinfo | \ grep -v objc | grep -v g2c.h \ >> rpm-files #-- # Clean #-- %clean rm -rf ${RPM_BUILD_ROOT} #-- # Post installation/uninstallation #-- %post libstdc++ if [ x`grep -c %{PREFIX}/lib /etc/ld.so.conf` = x0 ]; then echo "%{PREFIX}/lib" >>/etc/ld.so.conf fi /sbin/ldconfig %postun libstdc++ if [ x`grep -c %{PREFIX}/lib /etc/ld.so.conf` != x0 ]; then grep -v "%{PREFIX}/lib" /etc/ld.so.conf >/etc/EGCS_ld.so.conf mv /etc/EGCS_ld.so.conf /etc/ld.so.conf fi /sbin/ldconfig #-- # Files #-- %files -f rpm-files %files c++ %defattr(-,root,root) %{PREFIX}/man/man1/g++.1 %{PREFIX}/bin/g++ %{PREFIX}/bin/c++ %{PREFIX}/lib/gcc-lib/%{GCCDIR}/%{FULLVER}/cc1plus %{PREFIX}/lib/gcc-lib/%{GCCDIR}/%{FULLVER}/include/exception %{PREFIX}/lib/gcc-lib/%{GCCDIR}/%{FULLVER}/include/new %{PREFIX}/lib/gcc-lib/%{GCCDIR}/%{FULLVER}/include/typeinfo %{PREFIX}/lib/gcc-lib/%{GCCDIR}/%{FULLVER}/include/new.h %{PREFIX}/include %files objc %defattr(-,root,root) %{PREFIX}/lib/gcc-lib/%{GCCDIR}/%{FULLVER}/cc1obj %{PREFIX}/lib/gcc-lib/%{GCCDIR}/%{FULLVER}/libobjc.a %{PREFIX}/lib/gcc-lib/%{GCCDIR}/%{FULLVER}/include/objc %files g77 %defattr(-,root,root) %{PREFIX}/bin/g77 %{PREFIX}/bin/f77 %{PREFIX}/info/g77.info*.gz %{PREFIX}/lib/gcc-lib/%{GCCDIR}/%{FULLVER}/f771 %{PREFIX}/lib/gcc-lib/%{GCCDIR}/%{FULLVER}/libg2c.a %{PREFIX}/lib/gcc-lib/%{GCCDIR}/%{FULLVER}/include/g2c.h %{PREFIX}/man/man1/g77.1 %files libstdc++-devel %defattr(-,root,root) %{PREFIX}/include/g++/* /usr/include/g++ %{PREFIX}/lib/libstdc++.a %{PREFIX}/lib/libstdc++.so %ifarch ppc %defattr(-,root,root) %{PREFIX}/lib/nof/libstdc++.a %{PREFIX}/lib/nof/libstdc++.so %endif %files libstdc++ %defattr(-,root,root) %{PREFIX}/lib/libstdc++.so.%{LIBSTDCPP_MAJVER} %{PREFIX}/lib/libstdc++.so.%{LIBSTDCPP_VERSION} %ifarch ppc %{PREFIX}/lib/nof/libstdc++.so.%{LIBSTDCPP_MAJVER} %{PREFIX}/lib/nof/libstdc++.so.%{LIBSTDCPP_VERSION} %endif %files as-gcc %defattr(-,root,root) /lib/cpp /usr/bin/cc /usr/bin/gcc /usr/bin/c++ /usr/bin/g++ /usr/bin/f77 /usr/bin/g77 #-- # Change Log #-- %changelog * Tue Mar 16 1999 Keisuke Fujii - Updated to egcs-1.1.2 * Sat Feb 5 1999 Keisuke Fujii - Added some more patches from Gary. * Sat Dec 5 1998 Keisuke Fujii - Updated to egcs-1.1.1 release * Mon Nov 12 1998 Keisuke Fujii - Added some of Gary's patches stolen from 1.0-2e package - Removed symlinks for libstdc++ backward compatibility * Mon Nov 11 1998 Kaoru Fukui - Version up to egcs-1.1.1prerelease * Mon Oct 19 1998 Kaoru Fukui - Add tricking symlink libstdc++.so.2.8 and egcs-2.90.25 - Use bzip2 for Source0 * Thu Oct 8 1998 Kaoru Fukui - Update for egcs-1.1branch from cvs - Update for libstdc++2.9.0 - Add patch egcs-1.1-reload.patch written Geof Keating * Tue Mar 31 1998 Gary Thomas - Add "no update" as default mode. This avoids generating 'stwu' instructions which are potentially slower on the newer CPUs. * Thu Mar 26 1998 Gary Thomas - Add missing "include" links for C++ * Sun Mar 22 1998 Gary Thomas - Rebuilt to use "/opt/egcs" - Move libstdc++ to separate package * Sat Mar 14 1998 Gary Thomas - Update to CVS repository on 3/12/98 (even if the version says 3/2/98) - Still trying to fix problems with 'varargs' functions. * Tue Mar 3 1998 Gary Thomas - Built from EGCS-1.0.2pre tree