%define gcc_target_platform %{_target_platform} %define gcc_branch 3.3 %define gcc_version %{version} %define libstdcxx_name libstdc++5 %define libgcj_name libgcj4 Name: gcc33 Version: 3.3.6 Release: 1mamba Summary: GNU Compiler Collection (C, C++, Fortran, Java, Ada) Group: Applications/Development Vendor: openmamba Distribution: openmamba Packager: Silvan Calarco URL: http://gcc.gnu.org/ Source: ftp://ftp.gnu.org/gnu/gcc/gcc-%{version}/gcc-%{version}.tar.bz2 Patch1: http://www.linuxfromscratch.org/patches/lfs/5.0/gcc-3.3.1-suppress-libiberty.patch License: GPL BuildRequires: zlib-devel, gettext, flex, bison, texinfo >= 4.6 Requires: %{name}-cpp = %{version}-%{release} Requires: libgcc >= %{version}-%{release} ## AUTOBUILDREQ-BEGIN BuildRequires: glibc-devel BuildRequires: libgcc ## AUTOBUILDREQ-END BuildRoot: %{_tmppath}/%{name}-%{version}-build %description A compiler aimed at integrating all the optimizations and features necessary for a high-performance and stable development environment. This package is required for all other GCC compilers, namely C++, Fortran 77, Objective C and Java. If you have multiple versions of GCC installed on your system, it is preferred to type "gcc-$(gcc%{gcc_branch}-version)" (without double quotes) in order to use the GNU C compiler version %{version} # # GCC Library # %package -n libgcc Summary: GNU C Library Group: System/Libraries %description -n libgcc The libgcc package contains GCC shared libraries for gcc %{gcc_branch} # # Preprocessor # %package cpp Summary: The C Preprocessor Group: Development/Libraries %description 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. If you have multiple versions of GCC installed on your system, you will have to type "cpp -V%{version}" or "cpp-%{version}" (without double quotes) in order to use the GNU C Preprocessor version %{version}. # # C++ Compiler # %package c++ Summary: C++ support for gcc Group: Applications/Development Requires: %{name} = %{version}-%{release} Requires: %{libstdcxx_name} = %{version} Requires: %{libstdcxx_name}-devel = %{version} %description c++ This package adds C++ support to the GNU C compiler. 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. If you have multiple versions of GCC installed on your system, it is preferred to type "g++-$(gcc%{gcc_branch}-version)" (without double quotes) in order to use the GNU C++ compiler version %{version}. # # C++ Library # %package -n %{libstdcxx_name} Summary: GNU C++ library Group: System/Libraries %description -n %{libstdcxx_name} This package contains the GCC Standard C++ Library v3, an ongoing project to implement the ISO/IEC 14882:1998 Standard C++ library. %package -n %{libstdcxx_name}-devel Summary: GNU C++ library Group: Development/Libraries Requires: %{libstdcxx_name} = %{version}-%{release} %description -n %{libstdcxx_name}-devel This is the GNU implementation of the standard C++ libraries. This package includes the headers files and libraries needed for C++ development. # # Java Compiler # %package java Summary: Java support for gcc Group: Applications/Development Requires: %{name} = %{version}-%{release} Requires: %{name}-java-tools = %{version}-%{release} Requires: %{libgcj_name} >= %{version} Requires: %{libgcj_name}-devel >= %{version} %description java This package adds experimental support for compiling Java(tm) programs and bytecode into native code. To use this you will also need the libgcj3 package. If you have multiple versions of GCC installed on your system, it is preferred to type "gcj-$(gcc%{gcc_branch}-version)" (without double quotes) in order to use the GNU Java compiler version %{version}. # # Java Tools # %package java-tools Summary: Java related tools from gcc %{version} Group: Applications/Development Requires: %{libgcj_name} >= %{version} Requires: %{libgcj_name}-devel >= %{version} %description java-tools This package includes Java related tools built from gcc %{version}: * gij: a Java ByteCode Interpreter * gcj-jar: a fast .jar archiver * gcjh: generating C++ header files corresponding to ``.class'' files * jcf-dump: printing out useful information from a ``.class'' file * jv-scan: printing some useful information from a ``.java'' file If you have multiple versions of GCC installed on your system, the above-mentioned tools are called as follows: "-$(gcc%{gcc_branch}-version)" (without double quotes). # # Java Libraries # %package -n %{libgcj_name} Summary: GNU Java runtime libraries Group: System/Libraries %description -n %{libgcj_name} Runtime libraries for the GNU Java Compiler. The %{libgcj_name} includes parts of the Java Class Libraries, plus glue to connect the libraries to the compiler and the underlying OS. %package -n %{libgcj_name}-devel Summary: Header files and libraries for Java development Group: Development/Libraries Requires: %{libgcj_name} = %{version}-%{release} %description -n %{libgcj_name}-devel Development headers and libraries for the GNU Java Compiler. The %{libgcj_name} includes parts of the Java Class Libraries, plus glue to connect the libraries to the compiler and the underlying OS. # # FFI headers and libraries # %package -n libffi-devel Summary: Development headers and static library for FFI Group: Development/Libraries %description -n libffi-devel This package contains the development headers and the static library for libffi. The libffi library provides a portable, high level programming interface to various calling conventions. This allows a programmer to call any function specified by a call interface description at run time. # # Documentation # %package doc Group: Documentation Summary: GCC documentation %description doc GCC is a compiler suite aimed at integrating all the optimizations and features necessary for a high-performance and stable development environment. This package contains the compiler documentation in INFO pages. %prep %setup -q -n gcc-%{version} %patch1 -p1 %build rm -rf ../gcc-build mkdir ../gcc-build && cd ../gcc-build ../gcc-%{version}/configure \ --prefix=%{_prefix} \ --libdir=%{_libdir} \ --infodir=%{_infodir} \ --mandir=%{_mandir} \ --with-slibdir=%{_lib} \ --enable-shared \ --enable-languages=c,c++ \ --enable-threads=posix \ --enable-__cxa_atexit \ --enable-clocale=gnu \ --program-suffix=33 \ --host=%{gcc_target_platform} make %{?_smp_mflags} CFLAGS='-O' LIBCFLAGS='-g -O2' \ LIBCXXFLAGS='-g -O2 -fno-implicit-templates' bootstrap %install [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" cd %{_builddir}/gcc-build make install \ DESTDIR=%{buildroot}/ \ slibdir=%{_lib} \ mandir=%{_mandir} # create symlinks ln -s ../usr/bin/cpp %{buildroot}/lib/cpp ln -s ../bin/cpp %{buildroot}/usr/lib ln -s gcc %{buildroot}/usr/bin/cc # # Documentation # mkdir -p ../gcc-%{version}/rpm.doc/boehm-gc (cd ../gcc-%{version}/boehm-gc; for i in ChangeLog*; do cp -p $i ../rpm.doc/boehm-gc/$i.gc done) # # PDF documentation # (cd ../gcc-%{version}/gcc/doc; for file in gcc.texi cpp.texi cppinternals.texi; do texi2dvi -p -t @afourpaper -t @finalout -I ./include $file done) (cd ../gcc-%{version}/gcc/f; texi2dvi -p -t @afourpaper -t @finalout -I ../doc/include g77.texi) # # fix conflicts with non-compatibility version of gcc # rm -rf %{buildroot}%{_datadir}/locale/* mv %{buildroot}%{_mandir}/man1/gcov.1 %{buildroot}%{_mandir}/man1/gcov33.1 mv %{buildroot}%{_mandir}/man1/cpp.1 %{buildroot}%{_mandir}/man1/cpp33.1 rm %{buildroot}%{_mandir}/man7/fsf-funding.* rm %{buildroot}%{_mandir}/man7/gpl.* rm %{buildroot}%{_mandir}/man7/gfdl.* # fix wrong permission chmod 755 %{buildroot}/lib/libgcc_s.so.1 %clean [ "%{buildroot}" != / ] && rm -rf "%{buildroot}" flist="libgcc libffi-devel" for f in $flist; do find %{_rpmdir}/ -name $f-%{version}-%{release}.* -exec rm -f {} \; done %post -n libgcc -p /sbin/ldconfig %postun -n libgcc -p /sbin/ldconfig %post -n %{libstdcxx_name} -p /sbin/ldconfig %postun -n %{libstdcxx_name} -p /sbin/ldconfig %post -n %{libgcj_name} -p /sbin/ldconfig %postun -n %{libgcj_name} -p /sbin/ldconfig %files %defattr(-,root,root) %{_bindir}/cc %{_bindir}/gcc33 %{_bindir}/gccbug33 %{_bindir}/gcov33 %{_bindir}/%{_target_platform}-gcc-%{version} %{_libdir}/cpp %dir %{_libdir}/gcc-lib %{_libdir}/gcc-lib/* %{_mandir}/man1/gcc33.1.* %{_mandir}/man1/gcov33.1.* %doc gcc/{README*,*ChangeLog*} #%files -n libgcc #%defattr(-,root,root) %exclude /lib/libgcc* %files cpp %defattr(-,root,root) /lib/cpp %{_bindir}/cpp33 %{_mandir}/man1/cpp33.1* %files c++ %defattr(-,root,root) %{_bindir}/c++33 %{_bindir}/g++33 %{_bindir}/%{_target_platform}-gcc33 %{_bindir}/%{_target_platform}-c++33 %{_bindir}/%{_target_platform}-g++33 %{_mandir}/man1/g++33.1.* %doc gcc/cp/ChangeLog* %files -n %{libstdcxx_name} %defattr(-,root,root) %{_libdir}/libstdc++.so.* %files -n %{libstdcxx_name}-devel %defattr(-,root,root) %{_libdir}/libstdc++.*a %{_libdir}/libstdc++.so %{_libdir}/libsupc++.*a %dir %{_includedir}/c++ %{_includedir}/c++/* %doc libstdc++-v3/{ChangeLog*,README*,docs/html/} %files doc %defattr(-,root,root) %{_infodir}/* %doc gcc/doc/gcc.pdf %doc gcc/doc/cpp.pdf %doc gcc/doc/cppinternals.pdf %changelog * Sat Jul 12 2008 Silvan Calarco 3.3.6-1mamba - update to 3.3.6 - disabled java build - kept libstdc++5 for compatibility with binaries * Wed May 04 2005 Silvan Calarco 3.3.5-3qilnx - readded libgcj package to solve a dependecy error in gcc33-java-tools * Thu Apr 07 2005 Davide Madrisan 3.3.5-2qilnx - %%clean: remove unneeded library packages * Wed Apr 06 2005 Davide Madrisan 3.3.5-1qilnx - first build for 3.3.5 - this release exports symbols _ZN10__cxxabiv1*', _ZNK10__cxxabiv1*, and _ZNSt9basic_iosI[cw]St11char_traitsI[cw]EE11_M_setstateESt12_Ios_Iostate required by LSB 2.0 tool lsblibchk - fixed package group - added missing symlinks * Sat Sep 18 2004 Silvan Calarco 3.3.3-3qilnx - rebuild after renaming to gcc33 for cohexistence with gcc 3.4 - fortran language removed * Mon Jun 28 2004 Silvan Calarco 3.3.3-2qilnx - rebuilt without libiberty (added patch) which is from binutils * Wed Apr 07 2004 Davide Madrisan 3.3.3-1qilnx - first build for 3.3.3 - added cpp and g77, libf2c packages - added documentation in text and pdf formats * Mon Jun 16 2003 Silvan Calarco 3.2.3-1qilnx - first build for 3.2.3 * Fri May 16 2003 Silvan Calarco 3.2.2-7qilnx - added libstdc++.so symlink in devel package * Mon Apr 24 2003 Silvan Calarco 3.2.2-6qilnx - added symlinks /usr/lib/cpp and /usr/bin/cc * Mon Apr 24 2003 Silvan Calarco 3.2.2-5qilnx - added symlink /lib/cpp * Mon Apr 17 2003 Silvan Calarco 3.2.2-4qilnx - fixed install problems by using make install DESTDIR=xxxx * Mon Apr 16 2003 Silvan Calarco 3.2.2-3qilnx - changed %dir reference to system dirs with more specific file lists - added -doc package * Mon Apr 14 2003 Silvan Calarco 3.2.2-2qilnx - changed all .bz2 occurences with * * Tue Apr 09 2003 Silvan Calarco 3.2.2-1qilnx - first build for 3.2.2