]> git.pld-linux.org Git - packages/crossavr-gcc.git/blob - crossavr-gcc.spec
- synchronized patches with official AVR toolchain 3.4.1.830
[packages/crossavr-gcc.git] / crossavr-gcc.spec
1 #
2 # Conditional build:
3 %bcond_with     bootstrap       # for bootstraping
4 #
5 Summary:        Cross AVR GNU binary utility development utilities - gcc
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
11 Name:           crossavr-gcc
12 Version:        4.6.2
13 Release:        5
14 Epoch:          1
15 Patch1:         gcc-bug51969.patch
16 # Patches 1xx are taken form Atmel official AVR8-GNU toolchain version 3.4.1.830
17 Patch100:       200-gcc-libiberty-Makefile.in.patch
18 Patch101:       300-gcc-fixedpoint-3-4-2010.patch
19 Patch102:       301-gcc-xmega-v14.patch
20 Patch103:       302-gcc-avrtiny10.patch
21 Patch104:       303-gcc-osmain.patch
22 Patch105:       304-gcc-builtins-v6.patch
23 Patch106:       305-gcc-avrtiny10-non-fixedpoint.patch
24 Patch107:       306-gcc-option-list-devices.patch
25 Patch108:       307-gcc-avrtc536.patch
26 Patch109:       308-gcc-avrtc537.patch
27 Patch110:       400-gcc-new-devices.patch
28 Patch111:       401-gcc-atmega32_5_50_90_pa.patch
29 Patch112:       402-gcc-attiny1634.patch
30 Patch113:       403-gcc-atmega48pa.patch
31 Patch114:       404-gcc-atxmega_16_32_a4u.patch
32 Patch115:       405-gcc-atxmega64_128_192_256a3u.patch
33 Patch116:       406-gcc-atmegarfr2_a2.patch
34 Patch117:       407-gcc-atmega165pa.patch
35 Patch118:       408-gcc-atxmega384c3.patch
36 Patch119:       410-gcc-atxmega128a4u.patch
37 Patch120:       411-gcc-atxmega64d4.patch
38 Patch121:       412-gcc-atmega164pa_168pa_32a_64a.patch
39 Patch122:       413-gcc-atxmega64_128_b3.patch
40 Patch123:       414-gcc-atxmega64b1.patch
41 Patch124:       415-gcc-atmega_8a_128a_1284.patch
42 Patch125:       416-gcc-atxmega64a4u.patch
43 Patch126:       417-gcc-atxmega128d4.patch
44 Patch127:       418-gcc-atmxt336s.patch
45 Patch128:       419-gcc-atxmega16c4_32c4_128c3_256c3.patch
46 Patch129:       420-gcc-atxmega384d3.patch
47 Patch130:       421-gcc-atmega48hvf.patch
48 Patch131:       422-gcc-atmega26hvg.patch
49 Patch132:       423-gcc-atmxt224_224e.patch
50 Patch133:       424-gcc-atxmega192c3.patch
51 Patch134:       425-gcc-atmxt112sl.patch
52 Patch135:       426-gcc-atxmega64c3.patch
53 Patch136:       427-gcc-ata6285_6286.patch
54 Patch137:       428-gcc-attiny828.patch
55 Patch138:       429-gcc-ata5790_5790n_5795.patch
56 Patch139:       430-gcc-ata5272_ata5505.patch
57 Patch140:       431-gcc-atmxt540s.patch
58 Patch141:       432-gcc-ata5831.patch
59 Patch142:       433-gcc-attiny841.patch
60 Patch143:       434-gcc-atxmega32_16_8e5.patch
61 Patch144:       500-gcc-bug13473.patch
62 Patch145:       501-gcc-avrtiny10-bug-12510.patch
63 Patch146:       502-gcc-bug12915.patch
64 Patch147:       503-gcc-bug13789.patch
65 Patch148:       504-gcc-conditional-register.patch
66 Patch149:       505-gcc-avrtc381-tiny.patch
67 Patch150:       506-gcc-avrtc541.patch
68 Patch151:       507-gcc-avrtc-518.patch
69 Patch152:       508-gcc-avrtc514-tiny.patch
70 Patch153:       509-gcc-AVRTC-544-call-used-registers-tiny10.patch
71 Patch154:       510-gcc-avrtc496-tiny.patch
72 Patch155:       511-gcc-avrtc539-backported.patch
73 Patch156:       512-gcc-avrtc542.patch
74 Patch157:       513-gcc-avrtc556-tiny-same-base-and-dest.patch
75 Patch158:       514-gcc-avrtc558.patch
76 Patch159:       515-gcc-avrtc446.patch
77 License:        GPL
78 Group:          Development/Languages
79 Source0:        ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{version}/gcc-%{version}.tar.bz2
80 # Source0-md5:  028115c4fbfb6cfd75d6369f4a90d87e
81 BuildRequires:  /bin/bash
82 BuildRequires:  autoconf
83 BuildRequires:  bison
84 BuildRequires:  crossavr-binutils
85 BuildRequires:  elfutils-devel >= 0.145-1
86 BuildRequires:  flex
87 BuildRequires:  gmp-devel >= 4.1
88 BuildRequires:  libmpc-devel
89 BuildRequires:  mpfr-devel >= 2.3.0
90 BuildRequires:  perl-tools-pod
91 BuildRequires:  rpmbuild(macros) >= 1.565
92 BuildRequires:  sed >= 4.0
93 Requires:       crossavr-binutils >= 2.15.91.0.2
94 %{!?with_bootstrap:Requires:    crossavr-libc}
95 Requires:       gcc-dirs
96 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
97
98 %define         target          avr
99 %define         arch            %{_prefix}/%{target}
100 %define         gccarch         %{_libdir}/gcc/%{target}
101 %define         gcclib          %{_libdir}/gcc/%{target}/%{version}
102 %define         _noautostrip    .*%{gcclib}.*/libgc.*\\.a
103
104 # functions with printf format attribute but with special parser and also
105 # receiving non constant format strings
106 %define         Werror_cflags   %{nil}
107
108 %description
109 This package contains a cross-gcc which allows the creation of
110 binaries to be run on Atmel AVR on other machines.
111
112 %description -l de.UTF-8
113 Dieses Paket enthält einen Cross-gcc, der es erlaubt, auf einem
114 anderem Rechner Code für Atmel AVR zu generieren.
115
116 %description -l pl.UTF-8
117 Ten pakiet zawiera skrośny gcc pozwalający na robienie na innych
118 maszynach binariów do uruchamiania na Atmel AVR.
119
120 %package c++
121 Summary:        C++ support for avr-gcc
122 Summary(pl.UTF-8):      Obsługa C++ dla avr-gcc
123 Group:          Development/Languages
124 Requires:       %{name} = %{epoch}:%{version}-%{release}
125
126 %description c++
127 This package adds C++ support to the GNU Compiler Collection for AVR.
128
129 %description c++ -l pl.UTF-8
130 Ten pakiet dodaje obsługę C++ do kompilatora gcc dla AVR.
131
132 %prep
133 %setup -q -n gcc-%{version}
134 cd gcc/config/%{target} && %undos -f c,h && cd -
135 %patch1 -p2
136 %patch100 -p0
137 %patch101 -p0
138 %patch102 -p0
139 %patch103 -p0
140 %patch104 -p0
141 %patch105 -p0
142 %patch106 -p0
143 %patch107 -p0
144 %patch108 -p0
145 %patch109 -p0
146 %patch110 -p0
147 %patch111 -p0
148 %patch112 -p0
149 %patch113 -p0
150 %patch114 -p0
151 %patch115 -p0
152 %patch116 -p0
153 %patch117 -p0
154 %patch118 -p0
155 %patch119 -p0
156 %patch120 -p0
157 %patch121 -p0
158 %patch122 -p0
159 %patch123 -p0
160 %patch124 -p0
161 %patch125 -p0
162 %patch126 -p0
163 %patch127 -p0
164 %patch128 -p0
165 %patch129 -p0
166 %patch130 -p0
167 %patch131 -p0
168 %patch132 -p0
169 %patch133 -p0
170 %patch134 -p0
171 %patch135 -p0
172 %patch136 -p0
173 %patch137 -p0
174 %patch138 -p0
175 %patch139 -p0
176 %patch140 -p0
177 %patch141 -p0
178 %patch142 -p0
179 %patch143 -p0
180 %patch144 -p0
181 %patch145 -p0
182 %patch146 -p0
183 %patch147 -p0
184 %patch148 -p0
185 %patch149 -p0
186 %patch150 -p0
187 %patch151 -p0
188 %patch152 -p0
189 %patch153 -p0
190 %patch154 -p0
191 %patch155 -p0
192 %patch156 -p0
193 %patch157 -p0
194 %patch158 -p0
195 %patch159 -p0
196
197 %build
198 rm -rf obj-%{target}
199 install -d obj-%{target}
200 cd obj-%{target}
201
202 CFLAGS="%{rpmcflags}" \
203 CXXFLAGS="%{rpmcflags}" \
204 TEXCONFIG=false \
205 ../configure \
206         --prefix=%{_prefix} \
207         --infodir=%{_infodir} \
208         --mandir=%{_mandir} \
209         --bindir=%{_bindir} \
210         --libdir=%{_libdir} \
211         --libexecdir=%{_libdir} \
212         --enable-c99 \
213         --enable-languages="c,c++" \
214         --enable-long-long \
215         --enable-lto \
216         --disable-shared \
217         --disable-libssp \
218         --with-dwarf2 \
219         --with-gnu-as \
220         --with-gnu-ld \
221         --with-system-zlib \
222         --with-multilib \
223         --without-x \
224         --build=%{_target_platform} \
225         --host=%{_target_platform} \
226         --target=%{target}
227
228 %{__make} CFLAGS_FOR_TARGET="-Os"
229
230 %install
231 rm -rf $RPM_BUILD_ROOT
232
233 %{__make} -C obj-%{target} install \
234         DESTDIR=$RPM_BUILD_ROOT
235
236 # move fixed includes to proper place
237 cp $RPM_BUILD_ROOT%{gcclib}/include-fixed/*.h $RPM_BUILD_ROOT%{gcclib}/include
238
239 # don't want it here
240 rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
241 rm -rf $RPM_BUILD_ROOT%{_infodir}
242 rm -f $RPM_BUILD_ROOT%{_mandir}/man7/fsf-funding.7
243 rm -f $RPM_BUILD_ROOT%{_mandir}/man7/gfdl.7
244 rm -f $RPM_BUILD_ROOT%{_mandir}/man7/gpl.7
245 rm -f $RPM_BUILD_ROOT%{_datadir}/locale/*/LC_MESSAGES/{gcc,cpplib}.mo
246 rm -rf $RPM_BUILD_ROOT%{gcclib}/include-fixed
247 rm -rf $RPM_BUILD_ROOT%{gcclib}/install-tools
248 rm -f $RPM_BUILD_ROOT%{gcclib}/liblto_plugin.la
249
250 %if 0%{!?debug:1}
251 # strip target libraries
252 %{target}-strip -g $RPM_BUILD_ROOT%{gcclib}{,/avr*}/libg*.a
253 %endif
254
255 %clean
256 rm -rf $RPM_BUILD_ROOT
257
258 %files
259 %defattr(644,root,root,755)
260 %attr(755,root,root) %{_bindir}/%{target}-gcc*
261 %attr(755,root,root) %{_bindir}/%{target}-cpp
262 %attr(755,root,root) %{_bindir}/%{target}-gcov
263 %dir %{gccarch}
264 %dir %{gcclib}
265 %attr(755,root,root) %{gcclib}/cc1
266 %attr(755,root,root) %{gcclib}/collect2
267 %attr(755,root,root) %{gcclib}/lto-wrapper
268 %attr(755,root,root) %{gcclib}/lto1
269 %attr(755,root,root) %{gcclib}/liblto_plugin.so*
270 %{gcclib}/libg*.a
271 %{gcclib}/%{target}*
272 %{gcclib}/plugin
273 %dir %{gcclib}/include
274 %{gcclib}/include/*.h
275 %{_mandir}/man1/%{target}-cpp.1*
276 %{_mandir}/man1/%{target}-gcc.1*
277 %{_mandir}/man1/%{target}-gcov.1*
278
279 %files c++
280 %defattr(644,root,root,755)
281 %attr(755,root,root) %{_bindir}/%{target}-g++
282 %attr(755,root,root) %{_bindir}/%{target}-c++
283 %attr(755,root,root) %{gcclib}/cc1plus
284 %{_mandir}/man1/%{target}-g++.1*
This page took 0.038469 seconds and 3 git commands to generate.