]> git.pld-linux.org Git - packages/gcc.git/blobdiff - gcc.spec
- fix target bug on ppc (and kernel build too).
[packages/gcc.git] / gcc.spec
index e81f41c2cf44ec1ea4c847bc6efdaff7b4eb8e2a..a8f42a2c9339febeea7d5c9aa66aef44fcbf46fd 100644 (file)
--- a/gcc.spec
+++ b/gcc.spec
@@ -1,22 +1,31 @@
 #
 # TODO:
-#              - http://gcc.gnu.org/PR11203 (inline-asm)
-#              - http://gcc.gnu.org/PR17640 (empty loop not removed after optimization)
-#              - http://gcc.gnu.org/PR19317 (removing a temporary return value when we cannot)
-#              - http://gcc.gnu.org/PR20128 (ice with mudflap + profile generate)
-#              - http://gcc.gnu.org/PR22019 (do_structure_copy ice on ada gnatlib)
+#      checking for XTestQueryExtension in -lXtst... no
+#      configure: error: libXtst not found, required by java.awt.Robot
+#      make[2]: *** [configure-target-libjava] Error 1
 #
 # Conditional build:
 %bcond_without ada             # build without ADA support
+%bcond_without cxx             # build without C++ support
 %bcond_without fortran         # build without Fortran support
 %bcond_without java            # build without Java support
 %bcond_without objc            # build without Objective-C support
 %bcond_without objcxx          # build without Objective-C++ support
 %bcond_with    multilib        # build with multilib support (it needs glibc[32&64]-devel)
-%bcond_without profiling       # build without profiling
+%bcond_with    profiling       # build with profiling
 %bcond_without bootstrap       # omit 3-stage bootstrap
 %bcond_with    tests           # torture gcc
 
+%if %{with multilib}
+# the latest chrpath(64) can't handle 32-bit binaries :/
+%define                _noautochrpath  .*/lib/.*\\.so.*
+%endif
+
+%if %{without cxx}
+%undefine      with_java
+%undefine      with_objcxx
+%endif
+
 %if %{without objc}
 %undefine      with_objcxx
 %endif
@@ -35,15 +44,15 @@ Summary(pl):        Kolekcja kompilator
 Summary(pt_BR):        Coleção dos compiladores GNU: o compilador C e arquivos compartilhados
 Name:          gcc
 Version:       4.1.0
-%define                _snap   20050616_1440
-Release:       0.%{_snap}.1
+%define                _snap   20051126r107546
+Release:       0.%{_snap}.2
 Epoch:         5
 License:       GPL v2+
 Group:         Development/Languages
 #Source0:      ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{version}/%{name}-%{version}.tar.bz2
 #Source0:      ftp://gcc.gnu.org/pub/gcc/snapshots/4.1-%{_snap}/gcc-4.1-%{_snap}.tar.bz2
 Source0:       gcc-4.1-%{_snap}.tar.bz2
-# Source0-md5: 8cc0f906131ba1b6aa83757c8a324caa
+# Source0-md5: 75028aa85a2c604505a8706c6c813c94
 Source1:       %{name}-optimize-la.pl
 Patch0:                %{name}-info.patch
 Patch1:                %{name}-nolocalefiles.patch
@@ -51,20 +60,33 @@ Patch2:             %{name}-nodebug.patch
 Patch3:                %{name}-ada-link-new-libgnat.patch
 Patch4:                %{name}-ada-link.patch
 Patch5:                %{name}-alpha-ada_fix.patch
-Patch6:                %{name}-ada-fwrapv.patch
+# -fvisibility fixes...
+Patch6:                %{name}-pr19664_gnu_internal.patch
+Patch7:                %{name}-pr19664_libstdc++.patch
+
+#Patch9:               %{name}-enable-java-awt-qt.patch        NEEDS UPDATE
 # PRs
-Patch11:       %{name}-pr20218.patch
-Patch12:       %{name}-pr20297.patch
-Patch14:       %{name}-push-pop-visibility.patch
-Patch15:       %{name}-pr21704.patch
-Patch16:       %{name}-pr22019.patch
+Patch10:       %{name}-pr7776.patch
+Patch11:       %{name}-pr20297.patch
+Patch12:       %{name}-pr22533.patch
+
+#Patch14:      %{name}-x87-mmx-switch.patch    NEEDS UPDATE
+#Patch15:      %{name}-x87-mmx-eh.patch        NEEDS UPDATE
+Patch16:       %{name}-pr23948.patch
+Patch17:       %{name}-pr19505.patch
+Patch18:       %{name}-pr24419.patch
+Patch19:       %{name}-pr24669.patch
+Patch20:       %{name}-pr17390.patch
 URL:           http://gcc.gnu.org/
+#{?with_java:BuildRequires:    QtGui-devel >= 4.0.1}
+%{?with_java:BuildRequires:    alsa-lib-devel}
 BuildRequires: autoconf
 %{?with_tests:BuildRequires:   autogen}
 BuildRequires: automake
 BuildRequires: binutils >= 2:2.15.94.0.1
 BuildRequires: bison
-%{?with_java:BuildRequires:    cairo-devel}
+%{?with_java:BuildRequires:    cairo-devel >= 0.5.0}
+%{?with_java:BuildRequires:    dssi}
 %{?with_tests:BuildRequires:   dejagnu}
 BuildRequires: fileutils >= 4.0.41
 BuildRequires: flex
@@ -73,9 +95,29 @@ BuildRequires:       gcc(ada)
 BuildRequires: gcc-ada
 %endif
 BuildRequires: gettext-devel
-BuildRequires: glibc-devel >= %{!?with_multilib:2.2.5-20}%{?with_multilib:6:2.3.4-1.5}
+%if %{with multilib}
+BuildRequires: glibc-devel >= 6:2.3.4-1.5
+%ifarch %{x8664}
+BuildRequires: glibc-devel(i686)
+%endif
+%ifarch ppc64
+BuildRequires: glibc-devel(ppc)
+%endif
+%ifarch s390x
+BuildRequires: glibc-devel(s390)
+%endif
+%ifarch sparc64
+BuildRequires: glibc-devel(sparc)
+%endif
+%else
+BuildRequires: glibc-devel >= 2.2.5-20
+%endif
+#{?with_java:BuildRequires:    gtk+2-devel >= 2.4.0}
+%if %{with fortran}
 BuildRequires: gmp-devel
 BuildRequires: libmpfr-devel
+%endif
+%{?with_java:BuildRequires:    libxslt-devel}
 %{?with_java:BuildRequires:    pango-devel}
 BuildRequires: perl-devel
 %{?with_java:BuildRequires:    pkgconfig}
@@ -106,9 +148,6 @@ BuildRoot:  %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
 %define                _libdir32       /usr/lib
 %endif
 
-# disable -mtune=pentium4 due to p4 related regression.
-%define                specflags_i686  -mtune=i686
-
 %description
 A compiler aimed at integrating all the optimizations and features
 necessary for a high-performance and stable development environment.
@@ -709,22 +748,34 @@ Statyczne biblioteki Obiektowego C.
 
 %prep
 #setup -q -n gcc-%{version}
-%setup -q -n gcc-4.1-%{_snap}
+%setup -q -n gcc-4_1-branch
 
 %patch0 -p1
 %patch1 -p1
-%{!?debug:%patch2 -p1}
+%patch2 -p1
 %patch3 -p1
 %patch4 -p1
 %patch5 -p1
+
+# -fvisbility fixes...
 %patch6 -p1
+%patch7 -p1
 
+#patch9 -p1    NEEDS UPDATE
 # PRs
-%patch11 -p0
+%patch10 -p1
+%patch11 -p1
 %patch12 -p1
-%patch14 -p0
-%patch15 -p1
+
+%ifarch %{ix86} %{x8664}
+#patch14 -p1
+#patch15 -p1
+%endif
 %patch16 -p1
+%patch17 -p1
+%patch18 -p1
+%patch19 -p1
+%patch20 -p1
 
 # because we distribute modified version of gcc...
 perl -pi -e 's/(version.*)";/$1 (PLD Linux)";/' gcc/version.c
@@ -736,6 +787,9 @@ mv ChangeLog ChangeLog.general
 cd gcc
 %{__autoconf}
 cd ..
+cd libjava/classpath
+%{__autoconf}
+cd ../..
 cp -f /usr/share/automake/config.sub .
 
 rm -rf obj-%{_target_platform}
@@ -751,10 +805,11 @@ TEXCONFIG=false \
        --libexecdir=%{_libdir} \
        --infodir=%{_infodir} \
        --mandir=%{_mandir} \
+       --x-libraries=/usr/X11R6/%{_lib} \
        --enable-shared \
        --enable-threads=posix \
        --enable-__cxa_atexit \
-       --enable-languages="c,c++%{?with_fortran:,f95}%{?with_objc:,objc}%{?with_objcxx:,obj-c++}%{?with_ada:,ada}%{?with_java:,java}" \
+       --enable-languages="c%{?with_cxx:,c++}%{?with_fortran:,f95}%{?with_objc:,objc}%{?with_objcxx:,obj-c++}%{?with_ada:,ada}%{?with_java:,java}" \
        --enable-c99 \
        --enable-long-long \
        --%{?with_multilib:en}%{!?with_multilib:dis}able-multilib \
@@ -766,15 +821,26 @@ TEXCONFIG=false \
        --with-system-zlib \
        --with-slibdir=%{_slibdir} \
        --without-x \
-       --enable-cmath \
+       %{?with_fortran:--enable-cmath} \
 %if %{with java}
        --enable-libgcj \
        --enable-libgcj-multifile \
        --enable-libgcj-database \
+       --enable-gtk-peer \
        --enable-gtk-cairo \
+       --enable-jni \
+       --enable-xmlj \
+       --enable-alsa \
+       --enable-dssi \
 %endif
        %{_target_platform}
 
+# not finished yet
+#      --enable-java-awt=gtk \
+
+# horrible compile time hog with perfect tree checking
+#      --enable-checking=all \
+
 cd ..
 
 %{__make} -C obj-%{_target_platform} \
@@ -782,11 +848,12 @@ cd ..
        GCJFLAGS="%{rpmcflags}" \
        BOOT_CFLAGS="%{rpmcflags}" \
        STAGE1_CFLAGS="%{rpmcflags} -O0" \
+       GNATLIBCFLAGS="%{rpmcflags}" \
        LDFLAGS_FOR_TARGET="%{rpmldflags}" \
        mandir=%{_mandir} \
        infodir=%{_infodir}
 
-%{?with_tests:%{__make} -k -C obj-%{_target_platform} check}
+%{?with_tests:%{__make} -k -C obj-%{_target_platform} check 2>&1 ||:}
 
 %install
 rm -rf $RPM_BUILD_ROOT
@@ -810,6 +877,15 @@ ln -sf %{_bindir}/cpp $RPM_BUILD_ROOT/lib/cpp
 ln -sf gcc $RPM_BUILD_ROOT%{_bindir}/cc
 echo ".so gcc.1" > $RPM_BUILD_ROOT%{_mandir}/man1/cc.1
 
+libssp=$(cd $RPM_BUILD_ROOT%{_libdir}; echo libssp.so.*.*.*)
+mv $RPM_BUILD_ROOT{%{_libdir}/$libssp,%{_slibdir}}
+ln -sf %{_slibdir}/$libssp $RPM_BUILD_ROOT%{_libdir}/libssp.so
+%if %{with multilib}
+libssp=$($RPM_BUILD_ROOT%{_libdir32}; echo libssp.so.*.*.*`)
+mv $RPM_BUILD_ROOT{%{_libdir32}/$libssp,%{_slibdir32}}
+ln -sf %{_slibdir32}/$libssp $RPM_BUILD_ROOT%{_libdir32}/libssp.so
+%endif
+
 %if %{with fortran}
 ln -sf gfortran $RPM_BUILD_ROOT%{_bindir}/g95
 echo ".so gfortran.1" > $RPM_BUILD_ROOT%{_mandir}/man1/g95.1
@@ -820,11 +896,11 @@ echo ".so gfortran.1" > $RPM_BUILD_ROOT%{_mandir}/man1/g95.1
 mv -f  $RPM_BUILD_ROOT%{_libdir}/gcc/*/*/adalib/*.so.1 \
        $RPM_BUILD_ROOT%{_libdir}
 # check if symlink to be made is valid
-test -f        $RPM_BUILD_ROOT%{_libdir}/libgnat-4.0.so.1
-ln -sf libgnat-4.0.so.1 $RPM_BUILD_ROOT%{_libdir}/libgnat-4.0.so
-ln -sf libgnarl-4.0.so.1 $RPM_BUILD_ROOT%{_libdir}/libgnarl-4.0.so
-ln -sf libgnat-4.0.so $RPM_BUILD_ROOT%{_libdir}/libgnat.so
-ln -sf libgnarl-4.0.so $RPM_BUILD_ROOT%{_libdir}/libgnarl.so
+test -f        $RPM_BUILD_ROOT%{_libdir}/libgnat-4.1.so.1
+ln -sf libgnat-4.1.so.1 $RPM_BUILD_ROOT%{_libdir}/libgnat-4.1.so
+ln -sf libgnarl-4.1.so.1 $RPM_BUILD_ROOT%{_libdir}/libgnarl-4.1.so
+ln -sf libgnat-4.1.so $RPM_BUILD_ROOT%{_libdir}/libgnat.so
+ln -sf libgnarl-4.1.so $RPM_BUILD_ROOT%{_libdir}/libgnarl.so
 %endif
 
 cd ..
@@ -843,7 +919,8 @@ cp -f       libobjc/README gcc/objc/README.libobjc
 
 # avoid -L poisoning in *.la - there should be only -L%{_libdir}/gcc/*/%{version}
 # normalize libdir, to avoid propagation of unnecessary RPATHs by libtool
-for f in libmudflap.la libmudflapth.la libstdc++.la libsupc++.la \
+for f in libmudflap.la libmudflapth.la libssp.la \
+       %{?with_cxx:libstdc++.la libsupc++.la} \
        %{?with_fortran:libgfortran.la libgfortranbegin.la} \
        %{?with_java:libgcj.la libffi.la} \
        %{?with_objc:libobjc.la};
@@ -860,23 +937,24 @@ done
 # by fixincludes, we don't want former
 gccdir=$(echo $RPM_BUILD_ROOT%{_libdir}/gcc/*/*/)
 mkdir  $gccdir/tmp
+
 # we have to save these however
-%{?with_java:mv -f $gccdir/include/{gcj,libffi/ffitarget.h,jawt.h,jawt_md.h,jni.h,jvmpi.h} $gccdir/tmp}
-%{?with_objc:mv -f $gccdir/include/objc        $gccdir/tmp}
-mv -f  $gccdir/include/syslimits.h $gccdir/tmp
-rm -rf $gccdir/include
-mv -f  $gccdir/tmp $gccdir/include
-cp -f  $gccdir/install-tools/include/*.h $gccdir/include
+%{?with_java:mv $gccdir/include/{gcj,libffi/ffitarget.h,jawt.h,jawt_md.h,jni.h,jni_md.h,jvmpi.h} $gccdir/tmp}
+%{?with_objc:mv $gccdir/include/objc $gccdir/tmp}
+mv $gccdir/include/syslimits.h $gccdir/tmp
+rm -rf $gccdir/include
+mv $gccdir/tmp $gccdir/include
+cp $gccdir/install-tools/include/*.h $gccdir/include
 # but we don't want anything more from install-tools
-rm -rf $gccdir/install-tools
+rm -rf $gccdir/install-tools
 
 %if %{with multilib}
-ln -sf %{_slibdir32}/libgcc_s.so.1     $gccdir/32/libgcc_s.so
+ln -sf %{_slibdir32}/libgcc_s.so.1     $gccdir/32/libgcc_s.so
 %endif
-ln -sf %{_slibdir}/libgcc_s.so.1       $gccdir/libgcc_s.so
+ln -sf %{_slibdir}/libgcc_s.so.1       $gccdir/libgcc_s.so
 
 %find_lang gcc
-%find_lang libstdc\+\+
+%{?with_cxx:%find_lang libstdc\+\+}
 
 # cvs snap doesn't contain (release does) below files,
 # so let's create dummy entries to satisfy %%files.
@@ -945,6 +1023,8 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) %{_bindir}/cc
 %attr(755,root,root) %{_bindir}/cpp
 
+%{_includedir}/ssp
+
 %{_mandir}/man1/cc.1*
 %{_mandir}/man1/cpp.1*
 %{_mandir}/man1/gcc.1*
@@ -956,12 +1036,22 @@ rm -rf $RPM_BUILD_ROOT
 %attr(755,root,root) /lib/cpp
 
 %attr(755,root,root) %{_slibdir}/lib*.so
+%{_libdir}/libssp.la
+%attr(755,root,root) %{_libdir}/libssp.a
+%attr(755,root,root) %{_libdir}/libssp.so
+%{_libdir}/libssp_nonshared.a
+%{_libdir}/libssp_nonshared.la
 %if %{with multilib}
 %dir %{_libdir}/gcc/*/*/32
 %{_libdir}/gcc/*/*/32/libgcov.a
 %{_libdir}/gcc/*/*/32/libgcc.a
 %{_libdir}/gcc/*/*/32/libgcc_eh.a
 %{_libdir}/gcc/*/*/32/libgcc_s.so
+%{_libdir32}/libssp.la
+%attr(755,root,root) %{_libdir32}/libssp.a
+%attr(755,root,root) %{_libdir32}/libssp.so
+%{_libdir32}/libssp_nonshared.a
+%{_libdir32}/libssp_nonshared.la
 %endif
 %{_libdir}/gcc/*/*/libgcov.a
 %{_libdir}/gcc/*/*/libgcc.a
@@ -1038,6 +1128,7 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir}/gcc/*/*/adalib/libgnat.a
 %endif
 
+%if %{with cxx}
 %files c++
 %defattr(644,root,root,755)
 %doc gcc/cp/{ChangeLog,NEWS}
@@ -1089,6 +1180,7 @@ rm -rf $RPM_BUILD_ROOT
 %{_libdir32}/libstdc++.a
 %endif
 %{_libdir}/libstdc++.a
+%endif
 
 %if %{with fortran}
 %files fortran
@@ -1096,6 +1188,7 @@ rm -rf $RPM_BUILD_ROOT
 %doc gcc/fortran/ChangeLog
 %attr(755,root,root) %{_bindir}/g95
 %attr(755,root,root) %{_bindir}/gfortran
+%attr(755,root,root) %{_bindir}/*-gfortran
 %{_infodir}/gfortran*
 %attr(755,root,root) %{_libdir}/gcc/*/*/f951
 %if %{with multilib}
@@ -1156,6 +1249,9 @@ rm -rf $RPM_BUILD_ROOT
 %doc libjava/{ChangeLog,LIBGCJ_LICENSE,NEWS,README,THANKS}
 %attr(755,root,root) %{_bindir}/addr2name.awk
 %attr(755,root,root) %{_bindir}/gij
+%dir %{_libdir}/classpath
+%attr(755,root,root) %{_libdir}/classpath/libgjsmalsa.so.*.*.*
+%attr(755,root,root) %{_libdir}/classpath/libgjsmdssi.so.*.*.*
 %dir %{_libdir}/gcj-%{version}
 %{_libdir}/gcj-%{version}/classmap.db
 %attr(755,root,root) %{_libdir}/lib*cj*.so.*.*.*
@@ -1170,6 +1266,10 @@ rm -rf $RPM_BUILD_ROOT
 %{_includedir}/c++/%{version}/javax
 %{_includedir}/c++/%{version}/gcj
 %{_includedir}/c++/%{version}/gnu
+%{_libdir}/classpath/libgjsmalsa.la
+%attr(755,root,root) %{_libdir}/classpath/libgjsmalsa.so
+%{_libdir}/classpath/libgjsmdssi.la
+%attr(755,root,root) %{_libdir}/classpath/libgjsmdssi.so
 %{_libdir}/gcc/*/*/include/gcj
 %{_libdir}/gcc/*/*/include/jawt.h
 %{_libdir}/gcc/*/*/include/jawt_md.h
This page took 0.132778 seconds and 4 git commands to generate.