# # this spec-file requires rpm-3.0 or newer # %define GCC_VERSION 2.95.2 %define STDC_VERSION 2.10.0 %define target_alias %{_target_cpu}-redhat-linux %define OBJDIR $RPM_BUILD_DIR/obj-gcc-$RPM_ARCH Summary: GNU Compiler Collection - Core package including C compiler Name: gcc Version: %{GCC_VERSION} Release: 0hm Copyright: GPL Group: Development/Languages Source0: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{GCC_VERSION}/gcc-%{GCC_VERSION}.tar.gz Source1: gcc-libstdc++-compat.tar.gz Source2: gcc-libstdc++-compat-ppc.tar.gz Patch0: egcs-1.1.2-libf2c.patch Buildroot: /var/tmp/gcc-%{GCC_VERSION}-root Url: http://gcc.gnu.org/ Requires: cpp = %{GCC_VERSION} %ifarch ppc BuildRequires: binutils >= 2.9.5.0.14 Requires: binutils >= 2.9.5.0.14 %else Requires: binutils >= 2.9.1.0.23 %endif Obsoletes: egcs Prereq: /sbin/install-info %description GCC, the GNU Compiler Collection, is a free software project that intends to further the development of GNU compilers using an open development environment. The gcc package contains the GCC C compiler, a compiler aimed at integrating all the optimizations and features necessary for a high-performance and stable development environment. Install gcc if you'd like to use the GNU Compiler Collection C compiler, you will also need to install the cpp package. %package -n cpp Summary: GNU Compiler Collection - The C Preprocessor. Group: Development/Languages Prereq: /sbin/install-info %description -n cpp The C preprocessor is a 'macro processor' which is used automatically by the C compiler to transform your program before actual compilation. It is called a macro processor because it allows you to define 'macros', which are abbreviations for longer constructs. The C preprocessor provides four separate facilities that you can use as you see fit: * Inclusion of header files. These are files of declarations that can be substituted into your program. * Macro expansion. You can define 'macros', which are abbreviations for arbitrary fragments of C code, and then the C preprocessor will replace the macros with their definitions throughout the program. * Conditional compilation. Using special preprocessing directives, you can include or exclude parts of the program according to various conditions. * Line control. If you use a program to combine or rearrange source files into an intermediate file which is then compiled, you can use line control to inform the compiler about where each source line originated. You should install this package if you are a programmer who is searching for such a macro processor. %package c++ Summary: C++ support for the GNU Compiler Collection. Group: Development/Languages Requires: cpp = %{GCC_VERSION} Requires: gcc = %{GCC_VERSION} Requires: libstdc++ = %{STDC_VERSION} Obsoletes: egcs-c++ Obsoletes: libstdc++-devel Obsoletes: libg++-devel %description c++ This package adds C++ support to the GNU compiler collection. It includes support for most of the current C++ specification, including templates and exception handling. It does include the static standard C++ library and C++ header files; the library for dynamically linking programs is available separately. %package objc Summary: Objective C support for the GNU Compiler Collection. Group: Development/Languages Requires: cpp = %{GCC_VERSION} Requires: gcc = %{GCC_VERSION} Requires: gcc-c++ = %{GCC_VERSION} Obsoletes: egcs-objc %description objc Objective C is an object-oriented derivative of the C language, much like C++ but with more dynamic capabilities than this. This package adds Objective-C support to the GNU Compiler Collection. It includes the Objective-C compiler and runtime that is needed for running Objective-C programs. Install gcc-objc if you are going to do Objective C development and you would like to use the GNU Compiler Collection. You will also need to install the gcc package. %package g77 Summary: Fortran 77 support for the GNU Compiler Collection. Group: Development/Languages Requires: cpp = %{GCC_VERSION} Requires: gcc = %{GCC_VERSION} Obsoletes: egcs-g77 Prereq: /sbin/install-info %description g77 The gcc-g77 package provides support for compiling Fortran 77 programs with the GNU Compiler Collection. You should install gcc-g77 if you are going to do Fortran development and you would like to use the GNU Compiler Collection. You will also need to install the gcc package. %package java Summary: Java support for the GNU Compiler Collection. Group: Development/Languages Requires: cpp = %{GCC_VERSION} Requires: gcc = %{GCC_VERSION} Requires: libgcj Prereq: /sbin/install-info %description java The gcc-java package provides support for compiling Java programs with the GNU Compiler Collection. You should install gcc-java if you are going to do Java development and you would like to use the GNU Compiler Collection. You will also need to install the gcc package and the libgcj package. %package chill Summary: Chill support for the GNU Compiler Collection. Group: Development/Languages Requires: cpp = %{GCC_VERSION} Requires: gcc = %{GCC_VERSION} Prereq: /sbin/install-info %description chill The gcc-chill package provides support for compiling Chill programs with the GNU Compiler Collection. Chill is the "CCITT High-Level Language", where CCITT is the old name for what is now ITU, the International Telecommunications Union. It is is language in the Modula2 family, and targets many of the same applications as Ada (especially large embedded systems). Chill was never used much in the United States, but is still being used in Europe, Brazil, Korea, and other places. You will also need to install the gcc package. %package -n libstdc++ Summary: c++ library for the GNU Compiler Collection. Group: System Environment/Libraries Obsoletes: libg++ Version: %{STDC_VERSION} %description -n libstdc++ GNU C++ runtime libraries %prep %setup -q %ifarch ppc %patch -p1 %endif mkdir compat tar xzf %{SOURCE1} -C compat tar xzf %{SOURCE2} -C compat # we don't need to build texinfo on a current Linux installation rm -rf texinfo %build SRCDIR="$PWD" rm -rf %{OBJDIR} mkdir %{OBJDIR} cd %{OBJDIR} $SRCDIR/configure \ --prefix=/usr \ --enable-shared \ --enable-threads \ --with-cpp-install-dir=../lib \ %{target_alias} 2>&1 | tee $SRCDIR/build.log export PATH=$PATH:/sbin:/usr/sbin make bootstrap-lean 2>&1 | tee -a $SRCDIR/build.log # workaround a bug in the handling of MAKEINFO in gcc-2.95 find -name "*.info"|xargs rm -f find -name "*.info-[1-9]*"|xargs rm -f make info MAKEINFO="makeinfo --no-split" | tee -a $SRCDIR/build.log if [ -x /usr/bin/runtest ]; then make -k check 2>&1 | tee -a $SRCDIR/build.log else echo "Dejagnu not installed, no selftests have been run." >$SRCDIR/build.log fi $SRCDIR/contrib/warn_summary <$SRCDIR/build.log >$SRCDIR/warn.summary $SRCDIR/contrib/test_summary -i $SRCDIR/warn.summary \ > $SRCDIR/check.summary %install SRCDIR="$PWD" rm -rf $RPM_BUILD_ROOT cd %{OBJDIR} export PATH=$PATH:/sbin:/usr/sbin make install \ prefix=$RPM_BUILD_ROOT/usr \ MAKEINFO="makeinfo --no-split" ln -sf gcc $RPM_BUILD_ROOT/usr/bin/cc ln -sf gcc $RPM_BUILD_ROOT/usr/bin/egcs ln -sf g77 $RPM_BUILD_ROOT/usr/bin/f77 ln -sf g77.1 $RPM_BUILD_ROOT/usr/man/man1/f77.1 ln -sf cccp.1 $RPM_BUILD_ROOT/usr/man/man1/cpp.1 gzip -n -9f $RPM_BUILD_ROOT/usr/info/*.info* #install the compatibility libstdc++ library [ -d $SRCDIR/compat/$RPM_ARCH ] && install -m 755 $SRCDIR/compat/$RPM_ARCH/* $RPM_BUILD_ROOT/usr/lib/ %clean rm -rf $RPM_BUILD_ROOT %post /sbin/install-info --info-dir=/usr/info /usr/info/gcc.info.gz %post -n cpp /sbin/install-info --info-dir=/usr/info /usr/info/cpp.info.gz %post g77 /sbin/install-info --info-dir=/usr/info /usr/info/g77.info.gz %preun if [ $1 = 0 ]; then /sbin/install-info --delete --info-dir=/usr/info /usr/info/gcc.info.gz fi %preun -n cpp if [ $1 = 0 ]; then /sbin/install-info --delete --info-dir=/usr/info /usr/info/cpp.info.gz fi %preun g77 if [ $1 = 0 ]; then /sbin/install-info --delete --info-dir=/usr/info /usr/info/g77.info.gz fi %post -n libstdc++ -p /sbin/ldconfig %postun -n libstdc++ -p /sbin/ldconfig %files %defattr(-,root,root) %doc README* COPYING COPYING.LIB check.summary warn.summary build.log %dir /usr/lib/gcc-lib %dir /usr/lib/gcc-lib/%{target_alias} %dir /usr/lib/gcc-lib/%{target_alias}/* %dir /usr/lib/gcc-lib/%{target_alias}/*/include %ifarch alpha %dir /usr/lib/gcc-lib/%{target_alias}/*/ieee %endif %ifarch ppc %dir /usr/lib/gcc-lib/%{target_alias}/*/nof %endif /usr/bin/%{target_alias}-gcc /usr/bin/gcov /usr/bin/protoize /usr/bin/unprotoize /usr/bin/gcc /usr/bin/cc /usr/bin/egcs /usr/info/gcc* /usr/man/man1/gcc.1 /usr/%{target_alias} /usr/lib/gcc-lib/%{target_alias}/*/SYSCALLS.c.X /usr/lib/gcc-lib/%{target_alias}/*/cc1 /usr/lib/gcc-lib/%{target_alias}/*/collect2 /usr/lib/gcc-lib/%{target_alias}/*/libgcc.a %ifarch alpha ppc /usr/lib/gcc-lib/%{target_alias}/*/*/libgcc.a %endif %ifnarch alpha /usr/lib/gcc-lib/%{target_alias}/*/*crt*.o %endif /usr/lib/gcc-lib/%{target_alias}/*/include/README /usr/lib/gcc-lib/%{target_alias}/*/include/float.h /usr/lib/gcc-lib/%{target_alias}/*/include/iso646.h /usr/lib/gcc-lib/%{target_alias}/*/include/limits.h /usr/lib/gcc-lib/%{target_alias}/*/include/proto.h /usr/lib/gcc-lib/%{target_alias}/*/include/stdarg.h /usr/lib/gcc-lib/%{target_alias}/*/include/stdbool.h /usr/lib/gcc-lib/%{target_alias}/*/include/stddef.h /usr/lib/gcc-lib/%{target_alias}/*/include/syslimits.h /usr/lib/gcc-lib/%{target_alias}/*/include/va-*.h /usr/lib/gcc-lib/%{target_alias}/*/include/varargs.h %ifarch ppc /usr/lib/gcc-lib/%{target_alias}/*/include/*-asm.h %endif %files -n cpp %defattr(-,root,root) %dir /usr/lib/gcc-lib %dir /usr/lib/gcc-lib/%{target_alias} %dir /usr/lib/gcc-lib/%{target_alias}/* %dir /usr/lib/gcc-lib/%{target_alias}/*/include %ifarch alpha %dir /usr/lib/gcc-lib/%{target_alias}/*/ieee %endif %ifarch ppc %dir /usr/lib/gcc-lib/%{target_alias}/*/nof %endif /lib/cpp /usr/bin/cpp /usr/info/cpp* /usr/man/man1/cpp.1 /usr/man/man1/cccp.1 /usr/lib/gcc-lib/%{target_alias}/*/cpp /usr/lib/gcc-lib/%{target_alias}/*/specs %files c++ %defattr(-,root,root) %dir /usr/lib/gcc-lib %dir /usr/lib/gcc-lib/%{target_alias} %dir /usr/lib/gcc-lib/%{target_alias}/* %dir /usr/lib/gcc-lib/%{target_alias}/*/include %ifarch alpha %dir /usr/lib/gcc-lib/%{target_alias}/*/ieee %endif %ifarch ppc %dir /usr/lib/gcc-lib/%{target_alias}/*/nof %endif /usr/bin/g++ /usr/bin/c++ /usr/bin/c++filt /usr/man/man1/g++.1 /usr/include/g++* /usr/lib/libstdc++*.a /usr/lib/libstdc++*.a.* %ifarch alpha ppc /usr/lib/*/libstdc++*.a /usr/lib/*/libstdc++*.a.* %endif /usr/lib/gcc-lib/%{target_alias}/*/cc1plus /usr/lib/gcc-lib/%{target_alias}/*/libstdc* %ifarch alpha ppc /usr/lib/gcc-lib/%{target_alias}/*/*/libstdc* %endif /usr/lib/gcc-lib/%{target_alias}/*/include/exception /usr/lib/gcc-lib/%{target_alias}/*/include/new /usr/lib/gcc-lib/%{target_alias}/*/include/typeinfo /usr/lib/gcc-lib/%{target_alias}/*/include/new.h %files objc %defattr(-,root,root) %dir /usr/lib/gcc-lib %dir /usr/lib/gcc-lib/%{target_alias} %dir /usr/lib/gcc-lib/%{target_alias}/* %dir /usr/lib/gcc-lib/%{target_alias}/*/include %ifarch alpha %dir /usr/lib/gcc-lib/%{target_alias}/*/ieee %endif %ifarch ppc %dir /usr/lib/gcc-lib/%{target_alias}/*/nof %endif /usr/lib/gcc-lib/%{target_alias}/*/cc1obj /usr/lib/gcc-lib/%{target_alias}/*/libobjc.a /usr/lib/gcc-lib/%{target_alias}/*/include/objc %files g77 %defattr(-,root,root) %dir /usr/lib/gcc-lib %dir /usr/lib/gcc-lib/%{target_alias} %dir /usr/lib/gcc-lib/%{target_alias}/* %dir /usr/lib/gcc-lib/%{target_alias}/*/include %ifarch alpha %dir /usr/lib/gcc-lib/%{target_alias}/*/ieee %endif %ifarch ppc %dir /usr/lib/gcc-lib/%{target_alias}/*/nof %endif /usr/bin/g77 /usr/bin/f77 /usr/info/g77* /usr/man/man1/g77.1 /usr/man/man1/f77.1 /usr/lib/gcc-lib/%{target_alias}/*/f771 /usr/lib/gcc-lib/%{target_alias}/*/libg2c.a %ifarch alpha ppc /usr/lib/gcc-lib/%{target_alias}/*/*/libg2c.a %endif /usr/lib/gcc-lib/%{target_alias}/*/include/g2c.h %files chill %defattr(-,root,root) %dir /usr/lib/gcc-lib %dir /usr/lib/gcc-lib/%{target_alias} %dir /usr/lib/gcc-lib/%{target_alias}/* %dir /usr/lib/gcc-lib/%{target_alias}/*/include %ifarch alpha %dir /usr/lib/gcc-lib/%{target_alias}/*/ieee %endif %ifarch ppc %dir /usr/lib/gcc-lib/%{target_alias}/*/nof %endif /usr/bin/chill /usr/lib/gcc-lib/%{target_alias}/*/cc1chill /usr/lib/gcc-lib/%{target_alias}/*/chillrt0.o /usr/lib/gcc-lib/%{target_alias}/*/libchill.a %ifarch alpha ppc /usr/lib/gcc-lib/%{target_alias}/*/*/chillrt0.o /usr/lib/gcc-lib/%{target_alias}/*/*/libchill.a %endif %files java %defattr(-,root,root) %dir /usr/lib/gcc-lib %dir /usr/lib/gcc-lib/%{target_alias} %dir /usr/lib/gcc-lib/%{target_alias}/* %dir /usr/lib/gcc-lib/%{target_alias}/*/include %ifarch alpha %dir /usr/lib/gcc-lib/%{target_alias}/*/ieee %endif %ifarch ppc %dir /usr/lib/gcc-lib/%{target_alias}/*/nof %endif /usr/bin/gcj /usr/bin/gcjh /usr/bin/jcf-dump /usr/bin/jv-scan /usr/lib/gcc-lib/%{target_alias}/*/jc1 /usr/lib/gcc-lib/%{target_alias}/*/jvgenmain %files -n libstdc++ %defattr(-,root,root) %ifarch alpha %dir /usr/lib/ieee %endif %ifarch ppc %dir /usr/lib/nof %endif /usr/lib/libstdc++*.so /usr/lib/libstdc++*.so.* %ifarch alpha ppc /usr/lib/*/libstdc++*.so /usr/lib/*/libstdc++*.so.* %endif %changelog * Sat Oct 30 1999 Keisuke Fujii - rebuild libg2c with -fPIC (release 0hm) * Fri Jul 16 1999 Franz Sirl - overhauled the RH-6.0 spec (done by Cristian Gafton ) to fit gcc-2.95