]>
Commit | Line | Data |
---|---|---|
312cf8f5 | 1 | # |
8449b592 JR |
2 | # Conditional build: |
3 | %bcond_with bootstrap # for bootstraping | |
4 | # | |
281bac7a | 5 | Summary: Cross AVR GNU binary utility development utilities - gcc |
c7d51c5d ER |
6 | Summary(es.UTF-8): Utilitarios para desarrollo de binarios de la GNU - AVR gcc |
7 | Summary(fr.UTF-8): Utilitaires de développement binaire de GNU - AVR gcc | |
8 | Summary(pl.UTF-8): Skrośne narzędzia programistyczne GNU dla AVR - gcc | |
9 | Summary(pt_BR.UTF-8): Utilitários para desenvolvimento de binários da GNU - AVR gcc | |
10 | Summary(tr.UTF-8): GNU geliştirme araçları - AVR gcc | |
40ea5eb2 | 11 | Name: crossavr-gcc |
64c2fd3a | 12 | Version: 4.7.3 |
7252e137 | 13 | Release: 3 |
40ea5eb2 | 14 | Epoch: 1 |
7252e137 JB |
15 | License: GPL v3+ |
16 | Group: Development/Languages | |
17 | Source0: http://gcc.gnu.org/pub/gcc/releases/gcc-%{version}/gcc-%{version}.tar.bz2 | |
18 | # Source0-md5: 86f428a30379bdee0224e353ee2f999e | |
51ae354d | 19 | Patch0: gnu_inline-mismatch.patch |
64c2fd3a JR |
20 | # Patches 1xx are taken form Atmel official AVR8-GNU toolchain version 3.4.2 |
21 | # http://distribute.atmel.no/tools/opensource/Atmel-AVR-Toolchain-3.4.2/avr/avr-patches.tar.gz | |
22 | Patch100: 300-gcc-xmega-support.patch | |
23 | Patch101: 301-gcc-tiny-support.patch | |
24 | Patch102: 302-gcc-mlist-devices.patch | |
25 | Patch103: 303-ata6289-architecture-correction.patch | |
26 | Patch104: 400-gcc-public-devices-support.patch | |
27 | Patch105: 401-gcc-non-public-devices-support.patch | |
28 | Patch106: 402-gcc-atmega64_128_2564RFR2.patch | |
29 | Patch107: 403-gcc-atmxts200.patch | |
30 | Patch108: 501-gcc-avrtc579.patch | |
31 | Patch109: 502-gcc-pr54796.patch | |
32 | Patch110: 503-gcc-avrtc-513.patch | |
33 | Patch111: 504-gcc-avrtc-610.patch | |
34 | Patch112: 505-gcc-avrtc586.patch | |
7252e137 | 35 | URL: http://gcc.gnu.org/ |
40ea5eb2 | 36 | BuildRequires: /bin/bash |
f323cece | 37 | BuildRequires: autoconf |
fdd61bcf | 38 | BuildRequires: bison |
7252e137 | 39 | BuildRequires: cloog-ppl-devel >= 0.16.1 |
64c2fd3a | 40 | BuildRequires: crossavr-binutils >= 2.23.1 |
dbe7ab63 | 41 | BuildRequires: elfutils-devel >= 0.145-1 |
fdd61bcf | 42 | BuildRequires: flex |
7252e137 JB |
43 | BuildRequires: gmp-devel >= 4.3.2 |
44 | BuildRequires: libmpc-devel >= 0.8.0 | |
45 | BuildRequires: mpfr-devel >= 2.4.2 | |
2a46c025 | 46 | BuildRequires: perl-tools-pod |
7252e137 | 47 | BuildRequires: ppl-devel >= 0.11 |
59c2e2e2 | 48 | BuildRequires: rpmbuild(macros) >= 1.565 |
49 | BuildRequires: sed >= 4.0 | |
64c2fd3a | 50 | Requires: crossavr-binutils >= 2.23.1 |
328c429b | 51 | %{!?with_bootstrap:Requires: crossavr-libc} |
7252e137 JB |
52 | Requires: cloog-ppl-libs >= 0.16.1 |
53 | Requires: gmp >= 4.3.2 | |
c2bc48fa | 54 | Requires: gcc-dirs |
7252e137 JB |
55 | Requires: libmpc >= 0.8.0 |
56 | Requires: mpfr >= 2.4.2 | |
57 | Requires: ppl >= 0.11 | |
40ea5eb2 WK |
58 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
59 | ||
40ea5eb2 | 60 | %define target avr |
7252e137 JB |
61 | %define archprefix %{_prefix}/%{target} |
62 | %define gccarchdir %{_libdir}/gcc/%{target} | |
63 | %define gcclibdir %{_libdir}/gcc/%{target}/%{version} | |
64 | ||
65 | %define _noautostrip .*%{gcclibdir}.*/libgc.*\\.a | |
40ea5eb2 | 66 | |
8449b592 JR |
67 | # functions with printf format attribute but with special parser and also |
68 | # receiving non constant format strings | |
69 | %define Werror_cflags %{nil} | |
70 | ||
40ea5eb2 WK |
71 | %description |
72 | This package contains a cross-gcc which allows the creation of | |
7f5526fe | 73 | binaries to be run on Atmel AVR on other machines. |
40ea5eb2 | 74 | |
76648510 | 75 | %description -l de.UTF-8 |
76 | Dieses Paket enthält einen Cross-gcc, der es erlaubt, auf einem | |
77 | anderem Rechner Code für Atmel AVR zu generieren. | |
40ea5eb2 | 78 | |
76648510 | 79 | %description -l pl.UTF-8 |
80 | Ten pakiet zawiera skrośny gcc pozwalający na robienie na innych | |
81 | maszynach binariów do uruchamiania na Atmel AVR. | |
40ea5eb2 | 82 | |
1c790698 | 83 | %package c++ |
fdd61bcf | 84 | Summary: C++ support for avr-gcc |
c7d51c5d | 85 | Summary(pl.UTF-8): Obsługa C++ dla avr-gcc |
fdd61bcf | 86 | Group: Development/Languages |
aaeaf91a | 87 | Requires: %{name} = %{epoch}:%{version}-%{release} |
1c790698 | 88 | |
89 | %description c++ | |
90 | This package adds C++ support to the GNU Compiler Collection for AVR. | |
91 | ||
76648510 | 92 | %description c++ -l pl.UTF-8 |
93 | Ten pakiet dodaje obsługę C++ do kompilatora gcc dla AVR. | |
1c790698 | 94 | |
40ea5eb2 WK |
95 | %prep |
96 | %setup -q -n gcc-%{version} | |
59c2e2e2 | 97 | cd gcc/config/%{target} && %undos -f c,h && cd - |
51ae354d | 98 | %patch0 -p1 |
dbe7ab63 | 99 | %patch100 -p0 |
64c2fd3a | 100 | #patch101 -p0 |
dbe7ab63 | 101 | %patch102 -p0 |
102 | %patch103 -p0 | |
64c2fd3a JR |
103 | #patch104 -p0 |
104 | #patch105 -p0 | |
105 | #patch106 -p0 | |
106 | #patch107 -p0 | |
107 | #patch108 -p0 | |
dbe7ab63 | 108 | %patch109 -p0 |
64c2fd3a | 109 | #patch110 -p0 |
dbe7ab63 | 110 | %patch111 -p0 |
64c2fd3a | 111 | #patch112 -p0 |
40ea5eb2 WK |
112 | |
113 | %build | |
114 | rm -rf obj-%{target} | |
115 | install -d obj-%{target} | |
116 | cd obj-%{target} | |
117 | ||
118 | CFLAGS="%{rpmcflags}" \ | |
119 | CXXFLAGS="%{rpmcflags}" \ | |
fdd61bcf JB |
120 | TEXCONFIG=false \ |
121 | ../configure \ | |
7252e137 | 122 | MAKEINFO=/bin/true \ |
40ea5eb2 | 123 | --prefix=%{_prefix} \ |
df3c6f23 JB |
124 | --bindir=%{_bindir} \ |
125 | --libdir=%{_libdir} \ | |
126 | --libexecdir=%{_libdir} \ | |
7252e137 JB |
127 | --infodir=%{_infodir} \ |
128 | --mandir=%{_mandir} \ | |
dbe7ab63 | 129 | --enable-c99 \ |
130 | --enable-languages="c,c++" \ | |
7252e137 | 131 | --disable-libssp \ |
dbe7ab63 | 132 | --enable-long-long \ |
133 | --enable-lto \ | |
7252e137 | 134 | --disable-ppl-version-check \ |
40ea5eb2 | 135 | --disable-shared \ |
391a0dd0 | 136 | --with-dwarf2 \ |
40ea5eb2 WK |
137 | --with-gnu-as \ |
138 | --with-gnu-ld \ | |
40ea5eb2 | 139 | --with-multilib \ |
0d52da83 | 140 | --with-ppl \ |
7252e137 | 141 | --with-system-zlib \ |
40ea5eb2 | 142 | --without-x \ |
ef8212dd JB |
143 | --build=%{_target_platform} \ |
144 | --host=%{_target_platform} \ | |
40ea5eb2 WK |
145 | --target=%{target} |
146 | ||
7252e137 JB |
147 | %{__make} \ |
148 | CFLAGS_FOR_TARGET="-Os" | |
40ea5eb2 WK |
149 | |
150 | %install | |
151 | rm -rf $RPM_BUILD_ROOT | |
40ea5eb2 | 152 | |
ef8212dd | 153 | %{__make} -C obj-%{target} install \ |
40ea5eb2 WK |
154 | DESTDIR=$RPM_BUILD_ROOT |
155 | ||
328c429b | 156 | # move fixed includes to proper place |
7252e137 | 157 | cp -p $RPM_BUILD_ROOT%{gcclibdir}/include-fixed/{limits,syslimits}.h $RPM_BUILD_ROOT%{gcclibdir}/include |
328c429b | 158 | |
ef8212dd | 159 | # don't want it here |
7252e137 JB |
160 | %{__rm} $RPM_BUILD_ROOT%{_libdir}/libiberty.a |
161 | %{__rm} $RPM_BUILD_ROOT%{_mandir}/man7/{fsf-funding,gfdl,gpl}.7 | |
162 | %{__rm} -r $RPM_BUILD_ROOT%{_infodir} | |
163 | %{__rm} -r $RPM_BUILD_ROOT%{_localedir} | |
164 | %{__rm} -r $RPM_BUILD_ROOT%{gcclibdir}/include-fixed | |
165 | %{__rm} -r $RPM_BUILD_ROOT%{gcclibdir}/install-tools | |
166 | %{__rm} $RPM_BUILD_ROOT%{gcclibdir}/liblto_plugin.la | |
40ea5eb2 | 167 | |
ef8212dd | 168 | %if 0%{!?debug:1} |
df3c6f23 | 169 | # strip target libraries |
7252e137 | 170 | %{target}-strip -g $RPM_BUILD_ROOT%{gcclibdir}{,/avr*}/libg*.a |
df3c6f23 | 171 | %endif |
1c790698 | 172 | |
40ea5eb2 WK |
173 | %clean |
174 | rm -rf $RPM_BUILD_ROOT | |
175 | ||
f323cece | 176 | %files |
40ea5eb2 | 177 | %defattr(644,root,root,755) |
1c790698 | 178 | %attr(755,root,root) %{_bindir}/%{target}-cpp |
7252e137 JB |
179 | %attr(755,root,root) %{_bindir}/%{target}-gcc |
180 | %attr(755,root,root) %{_bindir}/%{target}-gcc-%{version} | |
181 | %attr(755,root,root) %{_bindir}/%{target}-gcc-ar | |
182 | %attr(755,root,root) %{_bindir}/%{target}-gcc-nm | |
183 | %attr(755,root,root) %{_bindir}/%{target}-gcc-ranlib | |
1c790698 | 184 | %attr(755,root,root) %{_bindir}/%{target}-gcov |
7252e137 JB |
185 | %dir %{gccarchdir} |
186 | %dir %{gcclibdir} | |
187 | %attr(755,root,root) %{gcclibdir}/cc1 | |
188 | %attr(755,root,root) %{gcclibdir}/collect2 | |
189 | %attr(755,root,root) %{gcclibdir}/lto-wrapper | |
190 | %attr(755,root,root) %{gcclibdir}/lto1 | |
191 | %attr(755,root,root) %{gcclibdir}/liblto_plugin.so* | |
192 | %{gcclibdir}/libgcc.a | |
193 | %{gcclibdir}/libgcov.a | |
194 | # subtargets | |
195 | %{gcclibdir}/avr25 | |
196 | %{gcclibdir}/avr3 | |
197 | %{gcclibdir}/avr31 | |
198 | %{gcclibdir}/avr35 | |
199 | %{gcclibdir}/avr4 | |
200 | %{gcclibdir}/avr5 | |
201 | %{gcclibdir}/avr51 | |
202 | %{gcclibdir}/avr6 | |
203 | %{gcclibdir}/avrxmega2 | |
204 | %{gcclibdir}/avrxmega4 | |
205 | %{gcclibdir}/avrxmega5 | |
206 | %{gcclibdir}/avrxmega6 | |
207 | %{gcclibdir}/avrxmega7 | |
208 | %{gcclibdir}/tiny-stack | |
209 | %dir %{gcclibdir}/include | |
210 | %{gcclibdir}/include/float.h | |
211 | %{gcclibdir}/include/iso646.h | |
212 | %{gcclibdir}/include/limits.h | |
213 | %{gcclibdir}/include/stdalign.h | |
214 | %{gcclibdir}/include/stdarg.h | |
215 | %{gcclibdir}/include/stdbool.h | |
216 | %{gcclibdir}/include/stddef.h | |
217 | %{gcclibdir}/include/stdfix.h | |
218 | %{gcclibdir}/include/stdint-gcc.h | |
219 | %{gcclibdir}/include/stdint.h | |
220 | %{gcclibdir}/include/stdnoreturn.h | |
221 | %{gcclibdir}/include/syslimits.h | |
222 | %{gcclibdir}/include/tgmath.h | |
223 | %{gcclibdir}/include/unwind.h | |
224 | %{gcclibdir}/include/varargs.h | |
225 | # plugin-devel | |
226 | %{gcclibdir}/plugin | |
df3c6f23 | 227 | %{_mandir}/man1/%{target}-cpp.1* |
40ea5eb2 | 228 | %{_mandir}/man1/%{target}-gcc.1* |
df3c6f23 | 229 | %{_mandir}/man1/%{target}-gcov.1* |
1c790698 | 230 | |
231 | %files c++ | |
232 | %defattr(644,root,root,755) | |
233 | %attr(755,root,root) %{_bindir}/%{target}-g++ | |
234 | %attr(755,root,root) %{_bindir}/%{target}-c++ | |
7252e137 | 235 | %attr(755,root,root) %{gcclibdir}/cc1plus |
1c790698 | 236 | %{_mandir}/man1/%{target}-g++.1* |