#
+# TODO:
+# - http://gcc.gnu.org/PR11203
+# - http://gcc.gnu.org/PR17384
+# - http://gcc.gnu.org/PR17567
+#
# Conditional build:
%bcond_without ada # build without ADA support
%bcond_without java # build without Java support
%bcond_without objc # build without objc support
%bcond_with ssp # build with stack-smashing protector support
#
-%define _snap 20040820
+%define _snap 20041008
#
Summary: GNU Compiler Collection: the C compiler and shared files
Summary(es): Colección de compiladores GNU: el compilador C y ficheros compartidos
Summary(pl): Kolekcja kompilatorów GNU: kompilator C i pliki wspó³dzielone
Summary(pt_BR): Coleção dos compiladores GNU: o compilador C e arquivos compartilhados
Name: gcc
-Version: 3.4.2
+Version: 3.4.3
Release: 0.%{_snap}.1
+#Release: 1
Epoch: 5
License: GPL
Group: Development/Languages
#Source0: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{version}/%{name}-%{version}.tar.bz2
#Source0: ftp://gcc.gnu.org/pub/gcc/prerelease-%{version}-%{_snap}/gcc-%{version}-%{_snap}.tar.bz2
Source0: ftp://gcc.gnu.org/pub/gcc/snapshots/3.4-%{_snap}/gcc-3.4-%{_snap}.tar.bz2
-# Source0-md5: 1ac3d6a9b67ee2e55a5448dc7a1996cc
+# Source0-md5: 9e5a58db111be1b31227b5a1139a740b
Source1: http://ep09.pld-linux.org/~djrzulf/gcc33/%{name}-non-english-man-pages.tar.bz2
# Source1-md5: 4736f3422ddfb808423b745629acc321
Source2: http://www.trl.ibm.com/projects/security/ssp/gcc2_95_3/gcc_stack_protect.m4.gz
Patch6: %{name}-pr15666.patch
Patch7: %{name}-pr16276.patch
Patch8: %{name}-ada-bootstrap.patch
+#
+# -fvisibility={default|internal|hidden|protected}
+#
+# Set the default ELF image symbol visibility to the specified option.
+# All symbols will be marked with this unless overrided within the code.
+# Using this feature can very substantially improve linking and load times
+# of shared object libraries, produce more optimised code, provide near-perfect
+# API export and prevent symbol clashes. It is strongly recommended that you
+# use this in any shared objects you distribute.
+#
+# -fvisibility-inlines-hidden
+#
+# Causes all inlined methods to be marked with __attribute__((visibility("hidden")))
+# so that they do not appear in the export table of a DSO and do not require a PLT
+# indirection when used within the DSO. Enabling this option can have a dramatic
+# effect on load and link times of a DSO as it massively reduces the size
+# of the dynamic export table when the library makes heavy use of templates.
+# While it can cause bloating through duplication of code within each DSO
+# where it is used, often the wastage is less than the considerable space
+# occupied by a long symbol name in the export table which is typical when using
+# templates and namespaces.
+#
+# How to Write Shared Libraries: http://people.redhat.com/drepper/dsohowto.pdf
+#
+Patch9: %{name}-visibility.patch
+#
URL: http://gcc.gnu.org/
BuildRequires: autoconf
BuildRequires: automake
Adzie.
%prep
+# prerelease
+#setup -q -n %{name}-%{version}-%{_snap} -a1
+# snapshot
%setup -q -n %{name}-3.4-%{_snap} -a1
+# final
+#setup -q -n %{name}-%{version} -a1
+
%patch0 -p1
%patch1 -p1
%patch2 -p1
# and even using the same 3.4.x(!) (but not Debian's 3.3.x) on ia64
%patch8 -p2
%endif
+%patch9 -p1
# because we distribute modified version of gcc...
perl -pi -e 's/(version.*)";/$1 %{?with_ssp:SSP }(PLD Linux)";/' gcc/version.c
gccdir=$(echo $RPM_BUILD_ROOT%{_libdir}/gcc/*/*/)
mkdir $gccdir/tmp
# we have to save these however
-mv -f $gccdir/include/{libffi/ffitarget.h,%{?with_objc:objc,}g2c.h,syslimits.h%{?with_java:,gcj}} $gccdir/tmp
+mv -f $gccdir/include/{%{?with_objc:objc,}g2c.h,syslimits.h%{?with_java:,libffi/ffitarget.h,gcj}} $gccdir/tmp
rm -rf $gccdir/include
mv -f $gccdir/tmp $gccdir/include
cp $gccdir/install-tools/include/*.h $gccdir/include