]>
Commit | Line | Data |
---|---|---|
5ef6cd3f | 1 | # |
5e218b3c PS |
2 | # nothing to debug. 3_4-branch is closed. |
3 | %define _enable_debug_packages 0 | |
5ef6cd3f AM |
4 | # |
5 | Summary: GNU Compiler Collection: the C compiler and shared files | |
a8c2a1e0 | 6 | Summary(pl.UTF-8): Kolekcja kompilatorów GNU: kompilator C i pliki współdzielone |
5ef6cd3f | 7 | Name: compat-gcc-34 |
5e218b3c | 8 | Version: 3.4.6 |
e0d5f8f1 | 9 | Release: 1 |
5ef6cd3f AM |
10 | License: GPL |
11 | Group: Development/Languages | |
12 | Source0: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{version}/gcc-%{version}.tar.bz2 | |
5e218b3c | 13 | # Source0-md5: 4a21ac777d4b5617283ce488b808da7b |
5ef6cd3f AM |
14 | Patch0: %{name}-info.patch |
15 | Patch1: %{name}-nolocalefiles.patch | |
5e218b3c PS |
16 | Patch2: %{name}-nodebug.patch |
17 | Patch3: %{name}-pr16276.patch | |
18 | Patch4: %{name}-cxxabi.patch | |
19 | Patch5: %{name}-pr-rh.patch | |
5ef6cd3f AM |
20 | URL: http://gcc.gnu.org/ |
21 | BuildRequires: autoconf | |
22 | BuildRequires: automake | |
23 | BuildRequires: binutils >= 2:2.15.91.0.2 | |
24 | BuildRequires: bison | |
25 | BuildRequires: fileutils >= 4.0.41 | |
26 | BuildRequires: flex | |
5ef6cd3f AM |
27 | BuildRequires: gettext-devel |
28 | BuildRequires: glibc-devel >= 2.2.5-20 | |
29 | BuildRequires: perl-devel | |
30 | BuildRequires: texinfo >= 4.1 | |
31 | BuildRequires: zlib-devel | |
32 | Requires: binutils >= 2:2.15.91.0.2 | |
33 | Requires: gcc-dirs >= 1.0-3 | |
5ef6cd3f | 34 | Provides: cpp = %{epoch}:%{version}-%{release} |
5e218b3c | 35 | Obsoletes: compat-gcc-34-libgcc |
5ef6cd3f AM |
36 | Conflicts: glibc-devel < 2.2.5-20 |
37 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) | |
38 | ||
5ef6cd3f AM |
39 | %ifarch sparc64 |
40 | %define rpmcflags -O2 -mtune=ultrasparc | |
41 | %endif | |
42 | ||
43 | %description | |
44 | A compiler aimed at integrating all the optimizations and features | |
45 | necessary for a high-performance and stable development environment. | |
46 | ||
47 | This package contains the C compiler and some files shared by various | |
48 | parts of the GNU Compiler Collection. In order to use another GCC | |
49 | compiler you will need to install the appropriate subpackage. | |
50 | ||
a8c2a1e0 | 51 | %description -l pl.UTF-8 |
52 | Kompilator, posiadający duże możliwości optymalizacyjne niezbędne do | |
5ef6cd3f AM |
53 | wyprodukowania szybkiego i stabilnego kodu wynikowego. |
54 | ||
a8c2a1e0 | 55 | Ten pakiet zawiera kompilator C i pliki współdzielone przez różne |
56 | części kolekcji kompilatorów GNU (GCC). Żeby używać innego kompilatora | |
57 | z GCC, trzeba zainstalować odpowiedni podpakiet. | |
5ef6cd3f | 58 | |
5ef6cd3f AM |
59 | %package c++ |
60 | Summary: C++ support for gcc | |
a8c2a1e0 | 61 | Summary(pl.UTF-8): Obsługa C++ dla gcc |
5ef6cd3f | 62 | Group: Development/Languages |
5e218b3c PS |
63 | Obsoletes: compat-gcc-34-libstdc++ |
64 | Obsoletes: compat-gcc-34-libstdc++-devel | |
65 | Obsoletes: compat-gcc-34-libstdc++-static | |
5ef6cd3f | 66 | Requires: %{name} = %{epoch}:%{version}-%{release} |
5ef6cd3f AM |
67 | |
68 | %description c++ | |
69 | This package adds C++ support to the GNU Compiler Collection. It | |
70 | includes support for most of the current C++ specification, including | |
5e218b3c | 71 | templates and exception handling. |
5ef6cd3f | 72 | |
a8c2a1e0 | 73 | %description c++ -l pl.UTF-8 |
74 | Ten pakiet dodaje obsługę C++ do kompilatora gcc. Ma wsparcie dla | |
75 | dużej ilości obecnych specyfikacji C++. | |
5ef6cd3f AM |
76 | |
77 | %prep | |
d78bccd5 | 78 | %setup -q -n gcc-%{version} |
5ef6cd3f AM |
79 | %patch0 -p1 |
80 | %patch1 -p1 | |
81 | %patch2 -p1 | |
5e218b3c PS |
82 | %patch3 -p0 |
83 | %patch4 -p0 | |
84 | %patch5 -p0 | |
5ef6cd3f AM |
85 | |
86 | # because we distribute modified version of gcc... | |
5e218b3c | 87 | perl -pi -e 's/(version.*)";/$1 (PLD Linux)";/' gcc/version.c |
5ef6cd3f AM |
88 | perl -pi -e 's@(bug_report_url.*<URL:).*";@$1http://bugs.pld-linux.org/>";@' gcc/version.c |
89 | ||
90 | mv ChangeLog ChangeLog.general | |
91 | ||
92 | %build | |
93 | # because pr16276 patch modifies configure.ac | |
94 | cd gcc | |
95 | %{__autoconf} | |
96 | cd .. | |
97 | cp -f /usr/share/automake/config.sub . | |
98 | ||
99 | rm -rf obj-%{_target_platform} && install -d obj-%{_target_platform} && cd obj-%{_target_platform} | |
100 | ||
5e218b3c | 101 | CC="%{__cc}" \ |
5ef6cd3f AM |
102 | CFLAGS="%{rpmcflags}" \ |
103 | CXXFLAGS="%{rpmcflags}" \ | |
5ef6cd3f AM |
104 | TEXCONFIG=false \ |
105 | ../configure \ | |
106 | --prefix=%{_prefix} \ | |
107 | --libdir=%{_libdir} \ | |
108 | --libexecdir=%{_libdir} \ | |
109 | --infodir=%{_infodir} \ | |
110 | --mandir=%{_mandir} \ | |
d78bccd5 AM |
111 | --program-suffix="-3.4" \ |
112 | --enable-version-specific-runtime-libs \ | |
5ef6cd3f AM |
113 | --enable-shared \ |
114 | --enable-threads=posix \ | |
115 | --enable-__cxa_atexit \ | |
5e218b3c | 116 | --enable-languages="c,c++" \ |
5ef6cd3f AM |
117 | --enable-c99 \ |
118 | --enable-long-long \ | |
5ef6cd3f | 119 | --disable-multilib \ |
5e218b3c | 120 | --disable-libstdcxx-pch \ |
5ef6cd3f AM |
121 | --enable-nls \ |
122 | --with-gnu-as \ | |
123 | --with-gnu-ld \ | |
5e218b3c | 124 | --with-slibdir=/%{_lib} \ |
5ef6cd3f AM |
125 | %{_target_platform} |
126 | ||
127 | PATH=$PATH:/sbin:%{_sbindir} | |
128 | ||
129 | cd .. | |
5ef6cd3f | 130 | %{__make} -C obj-%{_target_platform} \ |
5ef6cd3f | 131 | BOOT_CFLAGS="%{rpmcflags}" \ |
5ef6cd3f AM |
132 | LDFLAGS_FOR_TARGET="%{rpmldflags}" \ |
133 | mandir=%{_mandir} \ | |
134 | infodir=%{_infodir} | |
135 | ||
5ef6cd3f AM |
136 | %install |
137 | rm -rf $RPM_BUILD_ROOT | |
5e218b3c | 138 | install -d $RPM_BUILD_ROOT{%{_aclocaldir},%{_datadir},%{_infodir}} |
5ef6cd3f AM |
139 | |
140 | cd obj-%{_target_platform} | |
141 | PATH=$PATH:/sbin:%{_sbindir} | |
142 | ||
143 | %{__make} -j1 install \ | |
144 | mandir=%{_mandir} \ | |
145 | infodir=%{_infodir} \ | |
146 | DESTDIR=$RPM_BUILD_ROOT | |
147 | ||
148 | %ifarch sparc64 | |
149 | ln -f $RPM_BUILD_ROOT%{_bindir}/sparc64-pld-linux-gcc \ | |
150 | $RPM_BUILD_ROOT%{_bindir}/sparc-pld-linux-gcc | |
151 | %endif | |
152 | ||
d78bccd5 AM |
153 | ln -sf gcc-3.4 $RPM_BUILD_ROOT%{_bindir}/cc-3.4 |
154 | echo ".so gcc-3.4.1" > $RPM_BUILD_ROOT%{_mandir}/man1/cc-3.4.1 | |
5ef6cd3f | 155 | |
5ef6cd3f AM |
156 | cd .. |
157 | ||
5ef6cd3f AM |
158 | # include/ contains install-tools/include/* and headers that were fixed up |
159 | # by fixincludes, we don't want former | |
160 | gccdir=$(echo $RPM_BUILD_ROOT%{_libdir}/gcc/*/*/) | |
161 | mkdir $gccdir/tmp | |
162 | # we have to save these however | |
5e218b3c PS |
163 | mv $gccdir/include/syslimits.h $gccdir/tmp |
164 | mv $gccdir/include/c++ $gccdir/tmp | |
165 | rm -r $gccdir/include | |
166 | mv $gccdir/tmp $gccdir/include | |
5ef6cd3f AM |
167 | cp $gccdir/install-tools/include/*.h $gccdir/include |
168 | # but we don't want anything more from install-tools | |
5e218b3c | 169 | rm -r $gccdir/install-tools |
5ef6cd3f AM |
170 | |
171 | %clean | |
172 | rm -rf $RPM_BUILD_ROOT | |
173 | ||
174 | %post | |
175 | [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1 | |
176 | ||
177 | %postun | |
178 | [ ! -x /usr/sbin/fix-info-dir ] || /usr/sbin/fix-info-dir -c %{_infodir} >/dev/null 2>&1 | |
179 | ||
d78bccd5 | 180 | %files |
5ef6cd3f AM |
181 | %defattr(644,root,root,755) |
182 | %doc ChangeLog.general MAINTAINERS NEWS bugs.html faq.html | |
183 | %doc gcc/{ChangeLog,ONEWS,README.Portability} | |
184 | %dir %{_libdir}/gcc/*/* | |
185 | %dir %{_libdir}/gcc/*/*/include | |
5ef6cd3f | 186 | %attr(755,root,root) %{_bindir}/*-gcc* |
d78bccd5 | 187 | %attr(755,root,root) %{_bindir}/gcc-* |
d78bccd5 AM |
188 | %attr(755,root,root) %{_bindir}/gcov-* |
189 | %attr(755,root,root) %{_bindir}/cc-* | |
190 | %attr(755,root,root) %{_bindir}/cpp-* | |
d78bccd5 AM |
191 | %{_mandir}/man1/cc-*.1* |
192 | %{_mandir}/man1/cpp-*.1* | |
193 | %{_mandir}/man1/gcc-*.1* | |
194 | %{_mandir}/man1/gcov-*.1* | |
5ef6cd3f AM |
195 | %{_libdir}/gcc/*/*/libgcov.a |
196 | %{_libdir}/gcc/*/*/libgcc.a | |
197 | %{_libdir}/gcc/*/*/libgcc_eh.a | |
198 | %{_libdir}/gcc/*/*/specs | |
199 | %{_libdir}/gcc/*/*/crt*.o | |
5ef6cd3f AM |
200 | %attr(755,root,root) %{_libdir}/gcc/*/*/cc1 |
201 | %attr(755,root,root) %{_libdir}/gcc/*/*/collect2 | |
5ef6cd3f | 202 | %{_libdir}/gcc/*/*/include/*.h |
5ef6cd3f | 203 | |
5ef6cd3f AM |
204 | %files c++ |
205 | %defattr(644,root,root,755) | |
206 | %doc gcc/cp/{ChangeLog,NEWS} | |
d78bccd5 AM |
207 | %attr(755,root,root) %{_bindir}/g++-* |
208 | %attr(755,root,root) %{_bindir}/*-g++-* | |
209 | %attr(755,root,root) %{_bindir}/c++-* | |
210 | %attr(755,root,root) %{_bindir}/*-c++-* | |
5ef6cd3f | 211 | %attr(755,root,root) %{_libdir}/gcc/*/*/cc1plus |
5e218b3c PS |
212 | %{_libdir}/gcc/*/*/include/c++ |
213 | %{_libdir}/gcc/*/*/libstdc++.a | |
214 | %{_libdir}/gcc/*/*/libstdc++.la | |
215 | %attr(755,root,root) %{_libdir}/gcc/*/*/libstdc++.so* | |
d78bccd5 AM |
216 | %{_libdir}/gcc/*/*/libsupc++.la |
217 | %{_libdir}/gcc/*/*/libsupc++.a | |
d78bccd5 | 218 | %{_mandir}/man1/g++-*.1* |