]>
Commit | Line | Data |
---|---|---|
bb32bfd8 | 1 | |
2 | %define major_ver 4.4 | |
3 | %define minor_ver 0 | |
4 | ||
7a59e371 | 5 | Summary: Cross PPC GNU binary utility development utilities - gcc |
617296a3 ER |
6 | Summary(es.UTF-8): Utilitarios para desarrollo de binarios de la GNU - PPC gcc |
7 | Summary(fr.UTF-8): Utilitaires de développement binaire de GNU - PPC gcc | |
8 | Summary(pl.UTF-8): Skrośne narzędzia programistyczne GNU dla PPC - gcc | |
9 | Summary(pt_BR.UTF-8): Utilitários para desenvolvimento de binários da GNU - PPC gcc | |
10 | Summary(tr.UTF-8): GNU geliştirme araçları - PPC gcc | |
7a59e371 | 11 | Name: crossppc-gcc |
bb32bfd8 | 12 | Version: %{major_ver}.%{minor_ver} |
0ac00785 | 13 | Release: 0.1 |
7a59e371 | 14 | Epoch: 1 |
bb32bfd8 | 15 | License: GPL v3+ |
7a59e371 | 16 | Group: Development/Languages |
feaade00 | 17 | Source0: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{version}/gcc-%{version}.tar.bz2 |
bb32bfd8 | 18 | # Source0-md5: cf5d787bee57f38168b74d65a7c0e6fd |
0ac00785 | 19 | Source1: gcc-optimize-la.pl |
bb32bfd8 | 20 | #Patch100: gcc-branch.diff |
21 | # svn diff svn://gcc.gnu.org/svn/gcc/branches/gcc-4_3-branch@145062 svn://gcc.gnu.org/svn/gcc/branches/ix86/gcc-4_3-branch > gcc-ix86-branch.diff | |
22 | # The goal of this branch is to add support for newer ix86 processors such as AMD's Barcelona and Intel's Westmere to GCC 4.3.x. | |
23 | Patch101: gcc-ix86-branch.diff | |
0ac00785 | 24 | Patch0: gcc-info.patch |
25 | Patch1: gcc-nolocalefiles.patch | |
26 | Patch2: gcc-nodebug.patch | |
27 | Patch3: gcc-ada-link.patch | |
28 | Patch4: gcc-sparc64-ada_fix.patch | |
bb32bfd8 | 29 | Patch5: gcc-pr14912.patch |
0ac00785 | 30 | Patch6: gcc-ppc64-m32-m64-multilib-only.patch |
31 | Patch7: gcc-libjava-multilib.patch | |
32 | Patch8: gcc-enable-java-awt-qt.patch | |
33 | Patch9: gcc-hash-style-gnu.patch | |
34 | Patch10: gcc-moresparcs.patch | |
bb32bfd8 | 35 | Patch11: gcc-build-id.patch |
5ed6cabc | 36 | URL: http://gcc.gnu.org/ |
0d8f2eb6 JB |
37 | BuildRequires: autoconf |
38 | BuildRequires: automake | |
39 | BuildRequires: bison | |
7a59e371 | 40 | BuildRequires: crossppc-binutils |
0a6b1fae | 41 | BuildRequires: fileutils >= 4.0.41 |
7a59e371 | 42 | BuildRequires: flex |
0ac00785 | 43 | BuildRequires: gmp-devel >= 4.1 |
44 | BuildRequires: mpfr-devel >= 2.3.0 | |
45 | BuildRequires: rpmbuild(macros) >= 1.211 | |
0a6b1fae | 46 | BuildRequires: texinfo >= 4.1 |
7a59e371 | 47 | Requires: crossppc-binutils |
d9f9f444 | 48 | Requires: gcc-dirs |
c02c6191 | 49 | ExcludeArch: ppc |
7a59e371 | 50 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
51 | ||
7a59e371 | 52 | %define target ppc-pld-linux |
7a59e371 | 53 | %define arch %{_prefix}/%{target} |
f8eaf6b0 PS |
54 | %define gccarch %{_libdir}/gcc/%{target} |
55 | %define gcclib %{gccarch}/%{version} | |
bb32bfd8 | 56 | %define _slibdir /%{_lib} |
57 | ||
58 | %define filterout -fwrapv -fno-strict-aliasing -fsigned-char | |
59 | %define filterout_ld -Wl,--as-needed | |
7a59e371 | 60 | |
0ac00785 | 61 | # used for crtbegin.o / crtend.o |
62 | %if 0%{?debug:1} | |
63 | %define target_cflags %{debugcflags} | |
64 | %else | |
bb32bfd8 | 65 | %define target_cflags -O2%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ppc: %{specflags_ppc}}} |
0ac00785 | 66 | %endif |
67 | ||
8b251c15 | 68 | %define _noautostrip .*/libgc.*\\.a |
7a59e371 | 69 | |
70 | %description | |
71 | This package contains a cross-gcc which allows the creation of | |
c57feb42 | 72 | binaries to be run on PPC Linux on other machines. |
7a59e371 | 73 | |
b03213de JR |
74 | %description -l de.UTF-8 |
75 | Dieses Paket enthält einen Cross-gcc, der es erlaubt, auf einem | |
76 | anderem Rechner Code für PPC Linux zu generieren. | |
7a59e371 | 77 | |
b03213de JR |
78 | %description -l pl.UTF-8 |
79 | Ten pakiet zawiera skrośny gcc pozwalający na robienie na innych | |
80 | maszynach binariów do uruchamiania na Linuksie PPC. | |
7a59e371 | 81 | |
e67d0236 JB |
82 | %package c++ |
83 | Summary: C++ support for crossppc-gcc | |
617296a3 | 84 | Summary(pl.UTF-8): Obsługa C++ dla crossppc-gcc |
e67d0236 JB |
85 | Group: Development/Languages |
86 | Requires: %{name} = %{epoch}:%{version}-%{release} | |
87 | ||
88 | %description c++ | |
89 | This package adds C++ support to the GNU Compiler Collection for PPC. | |
90 | ||
b03213de JR |
91 | %description c++ -l pl.UTF-8 |
92 | Ten pakiet dodaje obsługę C++ do kompilatora gcc dla PPC. | |
e67d0236 | 93 | |
7a59e371 | 94 | %prep |
c5df9c8d | 95 | %setup -q -n gcc-%{version} |
bb32bfd8 | 96 | #patch100 -p0 |
0ac00785 | 97 | %patch101 -p0 |
f8eaf6b0 | 98 | %patch0 -p1 |
0ac00785 | 99 | %patch1 -p1 |
100 | %patch2 -p1 | |
101 | %patch3 -p1 | |
bb32bfd8 | 102 | %patch5 -p1 |
0ac00785 | 103 | %patch4 -p1 |
0ac00785 | 104 | %patch6 -p1 |
105 | %patch7 -p0 | |
106 | %if %{with qt} | |
107 | %patch8 -p1 | |
108 | %endif | |
109 | %patch9 -p1 | |
bb32bfd8 | 110 | #patch10 -p1 |
111 | %patch11 -p0 | |
0ac00785 | 112 | |
113 | mv ChangeLog ChangeLog.general | |
114 | ||
115 | # override snapshot version. | |
116 | echo %{version} > gcc/BASE-VER | |
117 | echo "release" > gcc/DEV-PHASE | |
7a59e371 | 118 | |
119 | %build | |
0ac00785 | 120 | cd gcc |
bb32bfd8 | 121 | #{__autoconf} |
0ac00785 | 122 | cd .. |
bb32bfd8 | 123 | cp -f /usr/share/automake/config.sub . |
7a59e371 | 124 | |
0ac00785 | 125 | rm -rf builddir && install -d builddir && cd builddir |
126 | ||
127 | CC="%{__cc}" \ | |
7a59e371 | 128 | CFLAGS="%{rpmcflags}" \ |
0ac00785 | 129 | CXXFLAGS="%{rpmcxxflags}" \ |
130 | CFLAGS_FOR_TARGET="%{target_cflags}" \ | |
beb83fe9 JB |
131 | TEXCONFIG=false \ |
132 | ../configure \ | |
7a59e371 | 133 | --prefix=%{_prefix} \ |
0ac00785 | 134 | --with-local-prefix=%{_prefix}/local \ |
135 | --libdir=%{_libdir} \ | |
136 | --libexecdir=%{_libdir} \ | |
7a59e371 | 137 | --infodir=%{_infodir} \ |
138 | --mandir=%{_mandir} \ | |
6f87cee4 | 139 | --bindir=%{_bindir} \ |
7a59e371 | 140 | --disable-shared \ |
0a6b1fae | 141 | --disable-threads \ |
c5df9c8d | 142 | --without-headers \ |
fcba1d67 | 143 | --enable-languages="c,c++" \ |
0ac00785 | 144 | --disable-libgomp \ |
f8eaf6b0 PS |
145 | --enable-c99 \ |
146 | --enable-long-long \ | |
0ac00785 | 147 | --disable-multilib \ |
0a6b1fae | 148 | --disable-nls \ |
0ac00785 | 149 | --disable-werror \ |
7a59e371 | 150 | --with-gnu-as \ |
151 | --with-gnu-ld \ | |
0a6b1fae | 152 | --with-demangler-in-ld \ |
7a59e371 | 153 | --with-system-zlib \ |
bb32bfd8 | 154 | --with-slibdir=%{_slibdir} \ |
7a59e371 | 155 | --without-x \ |
0ac00785 | 156 | --with-long-double-128 \ |
157 | --enable-secureplt \ | |
158 | --with-gxx-include-dir=%{_includedir}/c++/%{version} \ | |
159 | --disable-libstdcxx-pch \ | |
160 | --enable-__cxa_atexit \ | |
161 | --enable-libstdcxx-allocator=new \ | |
162 | --with-pkgversion="PLD-Linux" \ | |
163 | --with-bugurl="http://bugs.pld-linux.org" \ | |
fcba1d67 | 164 | --target=%{target} \ |
a3ee301c JB |
165 | --host=%{_target_platform} \ |
166 | --build=%{_target_platform} | |
7a59e371 | 167 | |
bb32bfd8 | 168 | cd .. |
169 | ||
170 | %{__make} -C builddir all-gcc \ | |
171 | LDFLAGS_FOR_TARGET="%{rpmldflags}" | |
7a59e371 | 172 | |
173 | %install | |
174 | rm -rf $RPM_BUILD_ROOT | |
7a59e371 | 175 | |
0ac00785 | 176 | %{__make} -C builddir install-gcc \ |
7a59e371 | 177 | DESTDIR=$RPM_BUILD_ROOT |
178 | ||
0ac00785 | 179 | install builddir/gcc/specs $RPM_BUILD_ROOT%{gcclib} |
b082b857 | 180 | |
0a6b1fae | 181 | gccdir=$RPM_BUILD_ROOT%{gcclib} |
0ac00785 | 182 | cp $gccdir/install-tools/include/*.h $gccdir/include |
183 | cp $gccdir/include-fixed/syslimits.h $gccdir/include | |
184 | rm -rf $gccdir/install-tools | |
185 | rm -rf $gccdir/include-fixed | |
186 | ||
187 | #%if 0%{!?debug:1} | |
188 | #%{target}-strip -g -R.note -R.comment $RPM_BUILD_ROOT%{gcclib}/libgcc.a | |
189 | #%{target}-strip -g -R.note -R.comment $RPM_BUILD_ROOT%{gcclib}/libgcov.a | |
190 | #%endif | |
7a59e371 | 191 | |
192 | %clean | |
193 | rm -rf $RPM_BUILD_ROOT | |
194 | ||
195 | %files | |
196 | %defattr(644,root,root,755) | |
7a59e371 | 197 | %attr(755,root,root) %{_bindir}/%{target}-cpp |
0ac00785 | 198 | %attr(755,root,root) %{_bindir}/%{target}-gcc |
199 | %attr(755,root,root) %{_bindir}/%{target}-gccbug | |
200 | %attr(755,root,root) %{_bindir}/%{target}-gcov | |
7a59e371 | 201 | %dir %{gccarch} |
202 | %dir %{gcclib} | |
203 | %attr(755,root,root) %{gcclib}/cc1 | |
7a59e371 | 204 | %attr(755,root,root) %{gcclib}/collect2 |
0ac00785 | 205 | #%{gcclib}/*crt*.o |
206 | #%{gcclib}/libgcc.a | |
207 | %{gcclib}/specs | |
7a59e371 | 208 | %dir %{gcclib}/include |
209 | %{gcclib}/include/*.h | |
8d61bd52 | 210 | %{_mandir}/man1/%{target}-cpp.1* |
1c08fb98 | 211 | %{_mandir}/man1/%{target}-gcc.1* |
0ac00785 | 212 | %{_mandir}/man1/%{target}-gcov.1* |
e67d0236 JB |
213 | |
214 | %files c++ | |
215 | %defattr(644,root,root,755) | |
216 | %attr(755,root,root) %{_bindir}/%{target}-g++ | |
e67d0236 | 217 | %attr(755,root,root) %{gcclib}/cc1plus |
8d61bd52 | 218 | %{_mandir}/man1/%{target}-g++.1* |