Summary: GNU C Compiler for Alteon's Tigon MIPS processor Name: tigon-gcc Version: 2.95.2 Release: 5 Copyright: GPL Group: Development/Languages URL: http://sourceware.cygnus.com/gcc Source0: ftp:://sourceware.cygnus.com/pub/gcc/releases/gcc-%{version}/gcc-core-%{version}.tar.bz2 Source1: ftp:://sourceware.cygnus.com/pub/gcc/releases/gcc-%{version}/gcc-g++-%{version}.tar.bz2 Patch0: tigon_gcc-2.95.2.patch Buildroot: /var/tmp/tigon-gcc-%{version}-root Requires: tigon-binutils >= 2.9.5.0.29-3 Provides: tigon-gcc Prereq: /sbin/install-info Prereq: tigon-binutils Packager: Jamie Lokier %define _TARGET mips-alteon-elf %description This is a version of the GNU C Compiler for the customised MIPS processors on Alteon's Tigon Gigabit Ethernet chips. You need this to build firmware that runs on the Tigon, but not to build operating system device drivers that communicate with the Tigon. Differences between this compiler and the mips-sgi-irix5.3 MIPS compiler supplied with the Alteon Open Firmware kit are: - These options are set by default: -mips2, -mcpu=r6000 and -G 0. -mno-abicalls and -fno-pic were already set by default, in case you didn't know. Note that the only differences for GCC between r6000 and r4000 are some scheduling decisions for floating point and multiplication -- things that don't affect the Tigon. But r6000 is the required setting for GAS when invoked from GCC. - New -mAPIC flag: the only effect is to cause -APIC to be passed to the assembler. This is *not* set by default. - New -msoft-mul and -msoft-div flags mean to avoid using integer multiplication and division instructions, which the Alteon Tigon doesn't have. The operations are done using simpler instructions, sometimes with a library call. These options are enabled by default. - -msoft-float is enabled by default, and a software floating point library is included in libgcc.a. %package c++ Summary: GNU C++ Compiler for Alteon's Tigon MIPS processor Group: Development/Languages Requires: tigon-gcc = %{version} %description c++ This package adds C++ support to the GNU C compiler for Alteon's Tigon Gigabit Ethernet chips. It includes support for most of the current C++ specification, including templates and exception handling. However, standard C++ libraries and header files are not included. The description of the `tigon-gcc' package lists differences between this compiler and the mips-sgi-irix5.3 compiler supplied with the Alteon Open Firmware kit. %package info Summary: GNU C/C++ Compiler documentation Group: Development/Languages Requires: tigon-gcc = %{version} %description info This is the Info documentation for the GNU C & C++ compilers built for Alteon's Tigon Gigabit Ethernet chips. The documentation describes all GCC targets. As this documentation is likely to be installed already as part of the standard `gcc' or `egcs' packages, it's made available as a separate package here which you may not wish to install. The description of the `tigon-gcc' package lists differences between these compilers and the mips-sgi-irix5.3 compiler supplied with the Alteon Open Firmware kit. %prep %setup -q -T -b 0 -b 1 -n gcc-%{version} %patch -p1 -b .tigon %build # CFLAGS is used by the built GCC to build files for the *target* # which can cause those cross-builds to fail if it's e.g. -mpentiumpro. # So we put the $RPM_OPT_FLAGS into CC instead. CC="gcc $RPM_OPT_FLAGS" CFLAGS="-g" ./configure --prefix=/usr \ --target=%{_TARGET} $RPM_ARCH-redhat-linux # gperf is most likely broken on alpha and sparc (from egcs.spec, 1.1.2). touch gcc/c-gperf.h make all-gcc %install rm -rf ${RPM_BUILD_ROOT} mkdir -p ${RPM_BUILD_ROOT}/usr make prefix=${RPM_BUILD_ROOT}/usr install-gcc-cross cd ${RPM_BUILD_ROOT}/usr strip bin/* strip lib/gcc-lib/%{_TARGET}/*/{cc1,cc1plus,cpp,collect2} gzip -n -q9f info/*.info* for x in %{_TARGET} %{_TARGET}/bin %{_TARGET}/include %{_TARGET}/lib; do test -d $x || mkdir $x done mv bin/gcov bin/%{_TARGET}-gcov mv man/man1/cccp.1 man/man1/%{_TARGET}-cccp.1 ln man/man1/%{_TARGET}-cccp.1 man/man1/%{_TARGET}-cpp.1 ln man/man1/%{_TARGET}-g++.1 man/man1/%{_TARGET}-c++.1 ln bin/%{_TARGET}-gcc %{_TARGET}/bin/gcc rm bin/cpp; cd bin ln -s ../lib/gcc-lib/%{_TARGET}/*/cpp %{_TARGET}-cpp cd ../%{_TARGET}/bin # RPM 2.5.6 won't unpack or install an RPM containing multiple hard # links to a symbolic link -- it thinks the target name is "". # So we must use a duplicate symbolic link. ln -s ../../lib/gcc-lib/%{_TARGET}/*/cpp cpp cd ../.. for x in ar as ld nm ranlib strip; do # RPM 2.5.6 complains that the links in %files do not exist if their # targets do not exist, so make fake targets here. test -f $x || touch %{_TARGET}/bin/$x ( cd lib/gcc-lib/%{_TARGET}/*; ln -s ../../../../%{_TARGET}/bin/$x . ) done %clean rm -rf ${RPM_BUILD_ROOT} %post info /sbin/install-info --info-dir=/usr/info /usr/info/cpp.info.gz /sbin/install-info --info-dir=/usr/info /usr/info/gcc.info.gz %preun info if [ $1 = 0 ] ;then /sbin/install-info --delete --info-dir=/usr/info /usr/info/cpp.info.gz /sbin/install-info --delete --info-dir=/usr/info /usr/info/gcc.info.gz fi %files %defattr(-,root,root) %doc README* COPYING COPYING.LIB %dir /usr/%{_TARGET}/include %dir /usr/%{_TARGET}/lib /usr/bin/%{_TARGET}-cpp /usr/bin/%{_TARGET}-gcov /usr/bin/%{_TARGET}-gcc /usr/bin/%{_TARGET}-protoize /usr/bin/%{_TARGET}-unprotoize /usr/%{_TARGET}/bin/cpp /usr/%{_TARGET}/bin/gcc /usr/man/man1/%{_TARGET}-cpp* /usr/man/man1/%{_TARGET}-cccp* /usr/man/man1/%{_TARGET}-gcc* %dir /usr/lib/gcc-lib/%{_TARGET}/* %dir /usr/lib/gcc-lib/%{_TARGET}/*/include /usr/lib/gcc-lib/%{_TARGET}/*/cc1 /usr/lib/gcc-lib/%{_TARGET}/*/cpp /usr/lib/gcc-lib/%{_TARGET}/*/specs /usr/lib/gcc-lib/%{_TARGET}/*/ar /usr/lib/gcc-lib/%{_TARGET}/*/as /usr/lib/gcc-lib/%{_TARGET}/*/ld /usr/lib/gcc-lib/%{_TARGET}/*/nm /usr/lib/gcc-lib/%{_TARGET}/*/ranlib /usr/lib/gcc-lib/%{_TARGET}/*/strip /usr/lib/gcc-lib/%{_TARGET}/*/libgcc.a /usr/lib/gcc-lib/%{_TARGET}/*/crtbegin.o /usr/lib/gcc-lib/%{_TARGET}/*/crtend.o /usr/lib/gcc-lib/%{_TARGET}/*/el/libgcc.a /usr/lib/gcc-lib/%{_TARGET}/*/el/crtbegin.o /usr/lib/gcc-lib/%{_TARGET}/*/el/crtend.o /usr/lib/gcc-lib/%{_TARGET}/*/include/README /usr/lib/gcc-lib/%{_TARGET}/*/include/float.h /usr/lib/gcc-lib/%{_TARGET}/*/include/iso646.h /usr/lib/gcc-lib/%{_TARGET}/*/include/limits.h /usr/lib/gcc-lib/%{_TARGET}/*/include/proto.h /usr/lib/gcc-lib/%{_TARGET}/*/include/syslimits.h /usr/lib/gcc-lib/%{_TARGET}/*/include/va-*.h /usr/lib/gcc-lib/%{_TARGET}/*/include/varargs.h %files c++ /usr/bin/%{_TARGET}-c++ /usr/bin/%{_TARGET}-g++ #Use the c++filt from binutils instead; it is said to be newer. #/usr/bin/%{_TARGET}-c++filt /usr/man/man1/%{_TARGET}-c++* /usr/man/man1/%{_TARGET}-g++* /usr/lib/gcc-lib/%{_TARGET}/*/cc1plus /usr/lib/gcc-lib/%{_TARGET}/*/include/exception /usr/lib/gcc-lib/%{_TARGET}/*/include/new /usr/lib/gcc-lib/%{_TARGET}/*/include/typeinfo /usr/lib/gcc-lib/%{_TARGET}/*/include/new.h %files info /usr/info/*info* %changelog * Tue May 16 2000 Jamie Lokier - Use -mcpu=r6000 as the default so that GAS sets the object files to use ISA level 2 aka. -mips2; -mcpu=r4000 forces -mips3 in the object file which is incompatible with some other Alteon files. * Fri Apr 21 2000 Jamie Lokier - Mention differences between this and the standard Alteon-supplied compiler. * Thu Apr 20 2000 Jamie Lokier - Separate package for documentation, to avoid conflict with system GCC documentation. * Thu Apr 20 2000 Jamie Lokier - Use .bz2 format source archives. - Don't expect RPM to cope with multiple hard links to a symbolic link.