[openmamba-devel-it] gcc
gil
puntogil a libero.it
Dom 27 Mar 2011 16:36:37 CEST
ciao
si potrebbe modificare lo spec file cosi?
usando eclipse-ecj dal repo devel-java....
grazie gil
Name: gcc
Version: 4.6.0
Release: 1mamba
Summary: GNU Compiler Collection (C, C++, Fortran, Java, Ada)
Group: Applications/Development
Vendor: openmamba
Distribution: openmamba
Packager: Silvan Calarco <silvan.calarco a mambasoft.it>
URL: http://gcc.gnu.org/
Source:
ftp://ftp.gnu.org/gnu/gcc/gcc-%{version}/gcc-%{version}%{?gcc_extraver}.tar.bz2
#Source1: ftp://sourceware.org/pub/java/ecj-latest.jar
Source2: gcc-4.3.2-ecj1-wrapper
Patch2: gcc4-java-nomulti.patch
Patch0: %{name}-4.5.0-no_fixincludes.patch
Patch1: %{name}-4.0.2-zextract.patch
Patch3: %{name}-4.0.2-BufferStrategy.patch
Patch4: %{name}-4.0.2-failure_with_compound_literals.patch
Patch5: %{name}-4.1.1-arm-t-linux.patch
Patch6: %{name}-4.1.1-libgcc-softfloat-fix.patch
Patch7: %{name}-shared-openmp.patch
Patch8: %{name}-4.4.0-pr39543.patch
Patch9: %{name}-4.4.3-cross_build_fix.patch
Patch11: %{name}-4.5.1-psignal_fix_bootstrap_build.patch
License: GPL
#%if "%{cross_target_cpu}" != ""
#BuildRequires: cross-%{cross_target_cpu}-binutils >= 2.16.1
#%else
BuildRequires: binutils >= 2.16.1
#%endif
BuildRequires: libz-devel
BuildRequires: gettext
BuildRequires: flex
BuildRequires: bison
BuildRequires: diffutils
BuildRequires: texinfo >= 4.6
BuildRequires: libmpc-devel
BuildRequires: libmpfr-devel >= 2.1.2
%if "%{_target_platform}" == "%{_build}"
BuildRequires: glibc-devel >= 2.5
%if "%{?stage2}" != "1"
BuildRequires: tetex >= 3.0
BuildRequires: libgtk-devel >= 2.8.17
BuildRequires: libalsa-devel >= 1.0.11
%if "%{?disable_jack}" != "1"
BuildRequires: dssi-devel >= 0.9
BuildRequires: libjack-devel >= 0.101.1
%endif
%if "%{?disable_gjdoc}" != "1"
BuildRequires: antlr
%endif
BuildRequires: libcairo-devel >= 1.4.10
BuildRequires: libxcb-util-devel >= 0.2
%endif
#% else
# BuildRequires: cross-%{target_cpu}-glibc%{?glibc_require_append} >= 2.5
%endif
BuildRequires: systemtap-sdt-devel
Requires(post):%{__install_info}
Requires: %{name}-cpp = %{version}-%{release}
Requires: libgcc >= %{version}-%{release}
Requires: binutils >= 2.16.1
BuildRoot: %{_tmppath}/%{name}-%{version}-root
%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, Objective C and Java.
#
# Java Compiler
#
%package java
Summary: Java support for gcc
Group: Applications/Development
Requires: %{libgcj_name} >= %{version}
Requires: %{libgcj_name}-devel >= %{version}
Requires: /usr/share/java/eclipse-ecj.jar
Provides: gjdoc
Obsoletes: gjdoc
Obsoletes: %{name}-java-tools
%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
libgcj4 package.
%package -n libquadmath
Summary: GCC __float128 shared support library
Group: System/Libraries
Requires(post):%{__install_info}
%description -n libquadmath
This package contains GCC shared support library which is needed
for __float128 math support and for Fortran REAL*16 support.
%package -n libquadmath-devel
Summary: GCC __float128 support
Group: Development/Libraries
Requires: libquadmath = %{version}-%{release}
Requires: gcc = %{version}-%{release}
%description -n libquadmath-devel
This package contains headers for building Fortran programs using
REAL*16 and programs using __float128 math.
%package -n libquadmath-static
Summary: Static libraries for __float128 support
Group: Development/Libraries
Requires: libquadmath-devel = %{version}-%{release}
%description -n libquadmath-static
This package contains static libraries for building Fortran programs
using REAL*16 and programs using __float128 math.
%prep
%setup -n gcc-%{version}%{?gcc_extraver} -q
%patch2 -p0
sed -i -e 's/libjawt/libgcjawt/g' libjava/Makefile.{am,in}
%patch0 -p1
#%patch1 -p1
#%patch3 -p1
#%patch4 -p1
#%patch5 -p1
%patch6 -p1
#%patch7 -p1
#%patch8 -p0
%if "%{_target_platform}" != "%{_build}"
%patch9 -p1
%endif
# psignal_fix_bootstrap_build
%patch11 -p1
%build
rm -rf ../%{name}-build
mkdir ../%{name}-build &&
cd ../%{name}-build
slibdir=/%{_lib}
case %{_target_platform} in
i386-*|i486-*|i586-*|i686-*|athlon-*)
ADDITIONAL_OPTS="--with-arch=i686"
;;
ppc-* | powerpc-*)
ADDITIONAL_OPTS=""
;;
arm-*)
ADDITIONAL_OPTS=""
#"--enable-multilib"
;;
x86_64-*)
%if "%{_target_platform}" != "%{_host}"
ADDITIONAL_OPTS="--with-slibdir=/usr/%{_target_platform}/lib64"
%else
ADDITIONAL_OPTS="--with-slibdir=/lib64"
%endif
# FIXME: multilib disabled but should be enabled for 32bit
compatibility
ADDITIONAL_OPTS="$ADDITIONAL_OPTS --disable-multilib"
;;
*)
echo "Error: target not supported."
exit 1
;;
esac
%if "%{?stage1}" == "1"
../gcc-%{version}%{?gcc_extraver}/configure \
--host=%{_host} \
--build=%{_build} \
--target=%{_target_platform} \
--prefix=%{_prefix} \
--libdir=%{_libdir} \
--infodir=%{_infodir} \
--mandir=%{_mandir} \
--disable-nls \
--disable-shared \
--disable-threads \
--enable-languages=c,objc,fortran \
--with-newlib \
--without-headers \
--disable-libmudflap \
--disable-libssp \
--disable-libgomp \
%if "%{_target_platform}" != "%{_host}"
--with-local-prefix=/usr/%{_target_platform} \
%endif
$ADDITIONAL_OPTS
make %{?_smp_mflags}
# all-gcc
%else
BUILD_LANGUAGES=c,objc,lto
# FIXME: other languages: lto, obj-c++
%if "%{disable_cpp}" != "1"
# Fortran won't build cross platform (?)
BUILD_LANGUAGES="${BUILD_LANGUAGES},c++,obj-c++"
%endif
%if "%{disable_fortran}" != "1"
# Fortran won't build cross platform (?)
BUILD_LANGUAGES="${BUILD_LANGUAGES},fortran"
%endif
%if "%{disable_java}" != "1"
# Java depends on gdk
BUILD_LANGUAGES="${BUILD_LANGUAGES},java"
%endif
CROSS_SYSTEM_HEADER_DIR=/usr/%{_target_platform}/include \
../gcc-%{version}%{?gcc_extraver}/configure \
--prefix=%{_prefix} \
--libdir=%{_libdir} \
--infodir=%{_infodir} \
--mandir=%{_mandir} \
--host=%{_host} \
--build=%{_build} \
--target=%{_target_platform} \
--enable-shared \
--enable-languages=$BUILD_LANGUAGES \
--enable-threads=posix \
--enable-__cxa_atexit \
--enable-clocale=gnu \
--x-includes=%{_includedir} \
--x-libraries=%{_libdir} \
--enable-java-awt=gtk \
--with-java-home=%{java_home} \
--enable-libgcj-multifile \
--enable-java-maintainer-mode \
--with-system-zlib \
--with-ecj-jar=/usr/share/java/eclipse-ecj.jar \
%if "%{_target_platform}" != "%{_host}"
--enable-symvers=gnu \
--disable-libssp \
--with-local-prefix=/usr/%{_target_platform} \
%else
--with-slibdir=$slibdir \
%endif
$ADDITIONAL_OPTS
# --with-headers=yes \
# --with-headers=/usr/%{_target_platform}/include \
%if "%{_target_platform}" != "%{_build}"
make %{?_smp_mflags} CFLAGS='' LIBCFLAGS='-g -O2' \
LIBCXXFLAGS='-g -O2 -fno-implicit-templates' all
%else
make %{?_smp_mflags} CFLAGS='-O -I/usr/include/freetype2'
LIBCFLAGS='-g -O2' \
LIBCXXFLAGS='-g -O2 -fno-implicit-templates' bootstrap
%endif
%if "%{disable_doc}" != "1"
make pdf
%endif
%endif # stage1 = 1
%install
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
cd ../%{name}-build
make DESTDIR=%{buildroot} install
%if "%{_target_platform}" == "%{_host}"
# create symlinks
mkdir -p %{buildroot}/%{_lib}
ln -s ../usr/bin/cpp %{buildroot}/%{_lib}/cpp
ln -s ../bin/cpp %{buildroot}%{_libdir}
ln -s gcc %{buildroot}/usr/bin/cc
#
# Documentation
#
%if "%{disable_java}" != "1"
mkdir -p ../gcc-%{version}%{?gcc_extraver}/rpm.doc/boehm-gc
mkdir -p ../gcc-%{version}%{?gcc_extraver}/rpm.doc/libjava
#(cd ../gcc-%{version}%{?gcc_extraver}/boehm-gc; for i in ChangeLog*; do
# cp -p $i ../rpm.doc/boehm-gc/$i.gc
#done)
(cd ../gcc-%{version}%{?gcc_extraver}/libjava; for i in README THANKS
COPYING ChangeLog; do
cp -p $i ../rpm.doc/libjava/$i.libjava
done)
(cd ../gcc-%{version}%{?gcc_extraver}/libjava;
cp -p LIBGCJ_LICENSE ../rpm.doc/libjava/LICENSE.libjava)
make DESTDIR=%{buildroot} -C %{_target_platform}/libjava install-src.zip
# FIXME: install precompiled ecj library (should come from Eclipse that is
# currently missing in the distribution
##install -m0755 %{SOURCE1} %{buildroot}%{_datadir}/java/ecj.jar
install -m0755 %{SOURCE2} %{buildroot}%{_bindir}/ecj1
%endif
#
# PDF gfortran documentation
#
#(cd ../gcc-%{version}%{?gcc_extraver}/gcc/fortran;
# texi2dvi -p -t @afourpaper -t @finalout -I ../doc/include -I
../../../gcc-build/gcc gfortran.texi)
#
# copy PDF gcc documentation to builddir for use with %doc
#
%if "%{disable_doc}" != "1"
cp gcc/doc/*.pdf %{_builddir}/gcc-%{version}%{?gcc_extraver}/gcc/doc/
%endif
# FIXME: since 4.5.0 this file causes an annoying warning with ldconfig
if installed in /usr/lib
mkdir -p %{buildroot}%{_datadir}/gdb/python/auto-load/
mv %{buildroot}%{_libdir}/libstdc++.so.6.0.15-gdb.py
%{buildroot}%{_datadir}/gdb/python/auto-load/libstdc++.so.6.0.15
(cd ../gcc-%{version}%{?gcc_extraver}
%find_lang gcc
%find_lang cpplib
%find_lang libstdc++
)
#(cd ../gcc-%{version}%{?gcc_extraver}/gcc/doc;
# for file in gcc.texi cpp.texi cppinternals.texi; do
# texi2dvi -p -t @afourpaper -t @finalout -I ./include -I
../../../gcc-build/gcc $file
#done)
# fix permissions
chmod 755 %{buildroot}/%{_lib}/libgcc_s.so.1
#cp gcc/doc/*.pdf ../gcc-%{version}%{?gcc_extraver}/gcc/doc/
%else # target_platform != host
rm -rf %{buildroot}%{_infodir}/*
rm -rf %{buildroot}%{_mandir}/man7/{fsf-funding.*,gfdl.*,gpl.*}
rm -rf %{buildroot}%{_datadir}/locale/*
%endif
# remove ffi provided by external package
rm -f %{buildroot}%{_libdir}/libffi*
rm -f %{buildroot}%{_libdir}/nof/libffi*
rm -f %{buildroot}%{_mandir}/man3/ffi*.3*
# remove libiberty (we use the one from binutils)
rm -f %{buildroot}%{_libdir}/libiberty.a
rm -f %{buildroot}%{_libdir}/nof/libiberty.a
mkdir -p %{buildroot}%{_prefix}/share/java/gcj-endorsed \
%{buildroot}%{_prefix}/%{_lib}/gcj-%{version}/classmap.db.d
chmod 755 %{buildroot}%{_prefix}/share/java/gcj-endorsed \
%{buildroot}%{_prefix}/%{_lib}/gcj-%{version} \
%{buildroot}%{_prefix}/%{_lib}/gcj-%{version}/classmap.db.d
touch %{buildroot}%{_prefix}/%{_lib}/gcj-%{version}/classmap.db
%clean
[ "%{buildroot}" != / ] && rm -rf "%{buildroot}"
%post -n libquadmath -p /sbin/ldconfig
%postun -n libquadmath -p /sbin/ldconfig
:
#
# C Language and base tools and libraries
#
%files -f gcc.lang
%defattr(-,root,root)
%{_bindir}/cc
%{_bindir}/gcc
#%{_bindir}/gccbug
%{_bindir}/gcov
%{_bindir}/%{_target_platform}-gcc-%{version}
%{_bindir}/%{_target_platform}-gcc
#%{_datadir}/locale/*
%{_libdir}/cpp
%dir %{_libdir}/gcc
%{_libdir}/gcc/*
%dir %{_prefix}/libexec/gcc/%{_target_platform}/%{version}
%{_prefix}/libexec/gcc/%{_target_platform}/%{version}/*
%{_datadir}/gcc-%{version}/python/libstdcxx/__init__.py
%{_datadir}/gcc-%{version}/python/libstdcxx/v6/__init__.py
%{_datadir}/gcc-%{version}/python/libstdcxx/v6/printers.py
%{_mandir}/man1/gcc.1.*
%{_mandir}/man1/gcov.1.*
%{_mandir}/man7/fsf-funding.7.*
%{_mandir}/man7/gfdl.7.*
%{_mandir}/man7/gpl.7.*
%doc gcc/{README*,*ChangeLog*}
%exclude %{_libdir}/gcc/%{_target_platform}/%{version}/include/quadmath.h
%exclude
%{_libdir}/gcc/%{_target_platform}/%{version}/include/quadmath_weak.h
%exclude %{_libdir}/gcc/%{_target_platform}/%{version}/include/objc
%exclude %{_libdir}/gcc/%{_target_platform}/%{version}/include/ssp
%if "%{_target_platform}" == "%{_build}"
%exclude
%{_libdir}/gcc/%{_target_platform}/%{version}/include/gcj/libgcj-config.h
%exclude %{_libdir}/gcc/%{_target_platform}/%{version}/include/jawt.h
%exclude %{_libdir}/gcc/%{_target_platform}/%{version}/include/jawt_md.h
%exclude %{_libdir}/gcc/%{_target_platform}/%{version}/include/jni.h
%exclude %{_libdir}/gcc/%{_target_platform}/%{version}/include/jvmpi.h
%endif
%files -n libquadmath
%defattr(-,root,root)
%{_libdir}/libquadmath.so.*
%{_infodir}/libquadmath.info.gz
%doc libquadmath/COPYING* libquadmath/ChangeLog
%files -n libquadmath-devel
%defattr(-,root,root)
%{_libdir}/gcc/%{_target_platform}/%{version}/include/quadmath.h
%{_libdir}/gcc/%{_target_platform}/%{version}/include/quadmath_weak.h
%{_libdir}/libquadmath.so
%files -n libquadmath-static
%defattr(-,root,root)
%{_libdir}/libquadmath.*a
%if "%{disable_java}" != "1"
#
# Java language
#
%files java
%defattr(-,root,root)
#%{_bindir}/addr2name.awk
%{_bindir}/aot-compile
%{_bindir}/ecj1
%{_bindir}/gcj
%{_bindir}/gcjh
%{_bindir}/jcf-dump
#%{_bindir}/jv-scan
#%{_bindir}/%{_target_platform}-gcjh
%{_bindir}/%{_target_platform}-gcj
%{_bindir}/gij
%{_bindir}/gc-analyze
%{_bindir}/gcj-dbtool
%{_bindir}/gappletviewer
%{_bindir}/gjar
%{_bindir}/gjavah
%if "%{disable_gjdoc}" != "1"
%{_bindir}/gjdoc
%endif
%{_bindir}/gnative2ascii
%{_bindir}/gorbd
%{_bindir}/gjarsigner
%{_bindir}/gkeytool
%{_bindir}/grmic
%{_bindir}/grmid
%{_bindir}/grmiregistry
%{_bindir}/gserialver
%{_bindir}/gtnameserv
%{_bindir}/rebuild-gcj-db
#%{_datadir}/java/ecj.jar
#%{_datadir}/python/aotcompile.py
#%{_datadir}/python/classfile.py
#%{_datadir}/gcc-%{version}/python/libjava/aotcompile.py
#%{_datadir}/gcc-%{version}/python/libjava/classfile.py
%{_mandir}/man1/aot-compile.1.*
%{_mandir}/man1/gcj.1.*
%{_mandir}/man1/gcjh.1.*
#%{_mandir}/man1/gjnih.1.*
%{_mandir}/man1/jcf-dump.1.*
#%{_mandir}/man1/jv-scan.1.*
%{_mandir}/man1/gij.1.*
%{_mandir}/man1/gcj-dbtool.1.*
%{_mandir}/man1/gappletviewer.1.*
%{_mandir}/man1/gc-analyze.1.*
%{_mandir}/man1/gjar.1.*
%{_mandir}/man1/gjarsigner.1.*
%{_mandir}/man1/gjavah.1.*
%{_mandir}/man1/gjdoc.1.*
%{_mandir}/man1/gkeytool.1.*
%{_mandir}/man1/gnative2ascii.1.*
%{_mandir}/man1/gorbd.1.*
%{_mandir}/man1/grmid.1.*
%{_mandir}/man1/gserialver.1.*
%{_mandir}/man1/gtnameserv.1.*
%{_mandir}/man1/rebuild-gcj-db.1.*
%files -n %{libgcj_name}
%defattr(-,root,root)
%{_mandir}/man1/grmic.1.*
%{_mandir}/man1/grmiregistry.1.*
%dir %{_datadir}/java/
%{_datadir}/java/libgcj-%{version}.jar
%{_libdir}/logging.properties
%{_libdir}/libgcj.so.*
%{_libdir}/libgcj-tools.so.*
%{_libdir}/libgcj_bc.so.*
%{_libdir}/libgij.so.*
%ifarch ppc
%{_libdir}/nof/logging.properties
%{_libdir}/nof/libgcj.so.*
%{_libdir}/nof/libgcj-tools.so.*
%{_libdir}/nof/libgcj_bc.so.*
%{_libdir}/nof/libgij.so.*
%endif
%dir %{_libdir}/gcj-%{version}/classmap.db.d
%attr(0644,root,root) %verify(not md5 size mtime) %ghost
%config(missingok,noreplace) %{_libdir}/gcj-%{version}*/classmap.db
%{_libdir}/gcj-%{version}*/libjavamath.la
%{_libdir}/gcj-%{version}*/libjavamath.so
%{_libdir}/gcj-%{version}*/libjawt.la
%{_libdir}/gcj-%{version}*/libjawt.so
%if "%{disable_jack}" != "1"
%{_libdir}/gcj-%{version}*/libgjsmdssi.la
%{_libdir}/gcj-%{version}*/libgjsmdssi.so
%endif
%{_libdir}/gcj-%{version}*/libgjsmalsa.la
%{_libdir}/gcj-%{version}*/libgjsmalsa.so
%{_libdir}/gcj-%{version}*/libgtkpeer.la
%{_libdir}/gcj-%{version}*/libgtkpeer.so
%{_libdir}/gcj-%{version}*/libjvm.a
%{_libdir}/gcj-%{version}*/libjvm.la
%{_libdir}/gcj-%{version}*/libjvm.so
%ifarch ppc
%{_libdir}/nof/gcj-%{version}*/libjavamath.la
%{_libdir}/nof/gcj-%{version}*/libjavamath.so
%{_libdir}/nof/gcj-%{version}*/classmap.db
%{_libdir}/nof/gcj-%{version}*/libgjsmalsa.la
%{_libdir}/nof/gcj-%{version}*/libgjsmalsa.so
%{_libdir}/nof/gcj-%{version}*/libjvm.a
%{_libdir}/nof/gcj-%{version}*/libjvm.la
%{_libdir}/nof/gcj-%{version}*/libjvm.so
%endif
%dir %{_datadir}/java/gcj-endorsed
%{_datadir}/java/libgcj-tools-%{version}.jar
%config(noreplace) %{_libdir}/security/classpath.security
%ifarch ppc
%config(noreplace) %{_libdir}/nof/security/classpath.security
%endif
#%config(noreplace) %{_libdir}/security/libgcj.security
%doc libjava/{ChangeLog,COPYING,LIBGCJ_LICENSE,README,THANKS}
%files -n %{libgcj_name}-devel
%defattr(-,root,root)
%{_bindir}/jv-convert
%{_libdir}/libgcj.spec
%{_libdir}/libgcj.a
%{_libdir}/libgcj.la
%{_libdir}/libgcj.so
%{_libdir}/libgcj_bc.so
%{_libdir}/libgij.a
%{_libdir}/libgij.la
%{_libdir}/libgij.so
%{_libdir}/libgcj-tools.a
%{_libdir}/libgcj-tools.la
%{_libdir}/libgcj-tools.so
%{_libdir}/libgcj_bc.a
%ifarch ppc
%{_libdir}/nof/libgcj.a
%{_libdir}/nof/libgcj.la
%{_libdir}/nof/libgcj.so
%{_libdir}/nof/libgcj_bc.so
%{_libdir}/nof/libgij.a
%{_libdir}/nof/libgij.la
%{_libdir}/nof/libgij.so
%{_libdir}/nof/libgcj-tools.a
%{_libdir}/nof/libgcj-tools.la
%{_libdir}/nof/libgcj-tools.so
%{_libdir}/nof/libgcj_bc.a
%endif
#%{_libdir}/lib-gnu-java-awt-peer-gtk.a
#%{_libdir}/lib-gnu-java-awt-peer-gtk.la
#%{_libdir}/lib-gnu-java-awt-peer-gtk.so
%{_datadir}/java/src-%{version}.zip
%{_libdir}/pkgconfig/libgcj-%{majver}.pc
%{_mandir}/man1/jv-convert.1.*
#%doc rpm.doc/boehm-gc/*
#%doc rpm.doc/libjava/*
%{_includedir}/c++/%{version}/gcj/*
%{_includedir}/c++/%{version}/gnu/awt/*
%{_includedir}/c++/%{version}/gnu/classpath
%{_includedir}/c++/%{version}/gnu/gcj/*
%{_includedir}/c++/%{version}/gnu/java/*
#%{_includedir}/c++/%{version}/gnu/regexp/*
%{_includedir}/c++/%{version}/java/*
%{_includedir}/c++/%{version}/javax/*
%{_libdir}/gcc/%{_target_platform}/%{version}/include/gcj/libgcj-config.h
%{_libdir}/gcc/%{_target_platform}/%{version}/include/jawt.h
%{_libdir}/gcc/%{_target_platform}/%{version}/include/jawt_md.h
%{_libdir}/gcc/%{_target_platform}/%{version}/include/jni.h
%{_libdir}/gcc/%{_target_platform}/%{version}/include/jvmpi.h
%endif # disable_java != 1
Maggiori informazioni sulla lista
openmamba-devel-it