]> git.pld-linux.org Git - packages/crossavr-gcc.git/blame - crossavr-gcc.spec
- synchronized patches with official AVR toolchain 3.4.1.830
[packages/crossavr-gcc.git] / crossavr-gcc.spec
CommitLineData
312cf8f5 1#
8449b592
JR
2# Conditional build:
3%bcond_with bootstrap # for bootstraping
4#
281bac7a 5Summary: Cross AVR GNU binary utility development utilities - gcc
c7d51c5d
ER
6Summary(es.UTF-8): Utilitarios para desarrollo de binarios de la GNU - AVR gcc
7Summary(fr.UTF-8): Utilitaires de développement binaire de GNU - AVR gcc
8Summary(pl.UTF-8): Skrośne narzędzia programistyczne GNU dla AVR - gcc
9Summary(pt_BR.UTF-8): Utilitários para desenvolvimento de binários da GNU - AVR gcc
10Summary(tr.UTF-8): GNU geliştirme araçları - AVR gcc
40ea5eb2 11Name: crossavr-gcc
6ef8d480 12Version: 4.6.2
ab7f78a4 13Release: 5
40ea5eb2 14Epoch: 1
6ef8d480 15Patch1: gcc-bug51969.patch
ab7f78a4 16# Patches 1xx are taken form Atmel official AVR8-GNU toolchain version 3.4.1.830
6ef8d480
PZ
17Patch100: 200-gcc-libiberty-Makefile.in.patch
18Patch101: 300-gcc-fixedpoint-3-4-2010.patch
19Patch102: 301-gcc-xmega-v14.patch
20Patch103: 302-gcc-avrtiny10.patch
21Patch104: 303-gcc-osmain.patch
22Patch105: 304-gcc-builtins-v6.patch
23Patch106: 305-gcc-avrtiny10-non-fixedpoint.patch
24Patch107: 306-gcc-option-list-devices.patch
ab7f78a4
PZ
25Patch108: 307-gcc-avrtc536.patch
26Patch109: 308-gcc-avrtc537.patch
27Patch110: 400-gcc-new-devices.patch
28Patch111: 401-gcc-atmega32_5_50_90_pa.patch
29Patch112: 402-gcc-attiny1634.patch
30Patch113: 403-gcc-atmega48pa.patch
31Patch114: 404-gcc-atxmega_16_32_a4u.patch
32Patch115: 405-gcc-atxmega64_128_192_256a3u.patch
33Patch116: 406-gcc-atmegarfr2_a2.patch
34Patch117: 407-gcc-atmega165pa.patch
35Patch118: 408-gcc-atxmega384c3.patch
36Patch119: 410-gcc-atxmega128a4u.patch
37Patch120: 411-gcc-atxmega64d4.patch
38Patch121: 412-gcc-atmega164pa_168pa_32a_64a.patch
39Patch122: 413-gcc-atxmega64_128_b3.patch
40Patch123: 414-gcc-atxmega64b1.patch
41Patch124: 415-gcc-atmega_8a_128a_1284.patch
42Patch125: 416-gcc-atxmega64a4u.patch
43Patch126: 417-gcc-atxmega128d4.patch
44Patch127: 418-gcc-atmxt336s.patch
45Patch128: 419-gcc-atxmega16c4_32c4_128c3_256c3.patch
46Patch129: 420-gcc-atxmega384d3.patch
47Patch130: 421-gcc-atmega48hvf.patch
48Patch131: 422-gcc-atmega26hvg.patch
49Patch132: 423-gcc-atmxt224_224e.patch
50Patch133: 424-gcc-atxmega192c3.patch
51Patch134: 425-gcc-atmxt112sl.patch
52Patch135: 426-gcc-atxmega64c3.patch
53Patch136: 427-gcc-ata6285_6286.patch
54Patch137: 428-gcc-attiny828.patch
55Patch138: 429-gcc-ata5790_5790n_5795.patch
56Patch139: 430-gcc-ata5272_ata5505.patch
57Patch140: 431-gcc-atmxt540s.patch
58Patch141: 432-gcc-ata5831.patch
59Patch142: 433-gcc-attiny841.patch
60Patch143: 434-gcc-atxmega32_16_8e5.patch
61Patch144: 500-gcc-bug13473.patch
62Patch145: 501-gcc-avrtiny10-bug-12510.patch
63Patch146: 502-gcc-bug12915.patch
64Patch147: 503-gcc-bug13789.patch
65Patch148: 504-gcc-conditional-register.patch
66Patch149: 505-gcc-avrtc381-tiny.patch
67Patch150: 506-gcc-avrtc541.patch
68Patch151: 507-gcc-avrtc-518.patch
69Patch152: 508-gcc-avrtc514-tiny.patch
70Patch153: 509-gcc-AVRTC-544-call-used-registers-tiny10.patch
71Patch154: 510-gcc-avrtc496-tiny.patch
72Patch155: 511-gcc-avrtc539-backported.patch
73Patch156: 512-gcc-avrtc542.patch
74Patch157: 513-gcc-avrtc556-tiny-same-base-and-dest.patch
75Patch158: 514-gcc-avrtc558.patch
76Patch159: 515-gcc-avrtc446.patch
40ea5eb2
WK
77License: GPL
78Group: Development/Languages
6b88a121 79Source0: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{version}/gcc-%{version}.tar.bz2
6ef8d480 80# Source0-md5: 028115c4fbfb6cfd75d6369f4a90d87e
40ea5eb2 81BuildRequires: /bin/bash
f323cece 82BuildRequires: autoconf
fdd61bcf
JB
83BuildRequires: bison
84BuildRequires: crossavr-binutils
dbe7ab63 85BuildRequires: elfutils-devel >= 0.145-1
fdd61bcf 86BuildRequires: flex
328c429b 87BuildRequires: gmp-devel >= 4.1
dbe7ab63 88BuildRequires: libmpc-devel
328c429b 89BuildRequires: mpfr-devel >= 2.3.0
2a46c025 90BuildRequires: perl-tools-pod
59c2e2e2 91BuildRequires: rpmbuild(macros) >= 1.565
92BuildRequires: sed >= 4.0
78067d97 93Requires: crossavr-binutils >= 2.15.91.0.2
328c429b 94%{!?with_bootstrap:Requires: crossavr-libc}
c2bc48fa 95Requires: gcc-dirs
40ea5eb2
WK
96BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
97
40ea5eb2 98%define target avr
40ea5eb2 99%define arch %{_prefix}/%{target}
df3c6f23
JB
100%define gccarch %{_libdir}/gcc/%{target}
101%define gcclib %{_libdir}/gcc/%{target}/%{version}
ef8212dd 102%define _noautostrip .*%{gcclib}.*/libgc.*\\.a
40ea5eb2 103
8449b592
JR
104# functions with printf format attribute but with special parser and also
105# receiving non constant format strings
106%define Werror_cflags %{nil}
107
40ea5eb2
WK
108%description
109This package contains a cross-gcc which allows the creation of
7f5526fe 110binaries to be run on Atmel AVR on other machines.
40ea5eb2 111
76648510 112%description -l de.UTF-8
113Dieses Paket enthält einen Cross-gcc, der es erlaubt, auf einem
114anderem Rechner Code für Atmel AVR zu generieren.
40ea5eb2 115
76648510 116%description -l pl.UTF-8
117Ten pakiet zawiera skrośny gcc pozwalający na robienie na innych
118maszynach binariów do uruchamiania na Atmel AVR.
40ea5eb2 119
1c790698 120%package c++
fdd61bcf 121Summary: C++ support for avr-gcc
c7d51c5d 122Summary(pl.UTF-8): Obsługa C++ dla avr-gcc
fdd61bcf 123Group: Development/Languages
aaeaf91a 124Requires: %{name} = %{epoch}:%{version}-%{release}
1c790698 125
126%description c++
127This package adds C++ support to the GNU Compiler Collection for AVR.
128
76648510 129%description c++ -l pl.UTF-8
130Ten pakiet dodaje obsługę C++ do kompilatora gcc dla AVR.
1c790698 131
40ea5eb2
WK
132%prep
133%setup -q -n gcc-%{version}
59c2e2e2 134cd gcc/config/%{target} && %undos -f c,h && cd -
6ef8d480 135%patch1 -p2
dbe7ab63 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
6ef8d480
PZ
178%patch142 -p0
179%patch143 -p0
180%patch144 -p0
ab7f78a4
PZ
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
40ea5eb2
WK
196
197%build
198rm -rf obj-%{target}
199install -d obj-%{target}
200cd obj-%{target}
201
202CFLAGS="%{rpmcflags}" \
203CXXFLAGS="%{rpmcflags}" \
fdd61bcf
JB
204TEXCONFIG=false \
205../configure \
40ea5eb2
WK
206 --prefix=%{_prefix} \
207 --infodir=%{_infodir} \
208 --mandir=%{_mandir} \
df3c6f23
JB
209 --bindir=%{_bindir} \
210 --libdir=%{_libdir} \
211 --libexecdir=%{_libdir} \
dbe7ab63 212 --enable-c99 \
213 --enable-languages="c,c++" \
214 --enable-long-long \
215 --enable-lto \
40ea5eb2 216 --disable-shared \
69b7b918 217 --disable-libssp \
391a0dd0 218 --with-dwarf2 \
40ea5eb2
WK
219 --with-gnu-as \
220 --with-gnu-ld \
221 --with-system-zlib \
222 --with-multilib \
223 --without-x \
ef8212dd
JB
224 --build=%{_target_platform} \
225 --host=%{_target_platform} \
40ea5eb2
WK
226 --target=%{target}
227
69b7b918 228%{__make} CFLAGS_FOR_TARGET="-Os"
40ea5eb2
WK
229
230%install
231rm -rf $RPM_BUILD_ROOT
40ea5eb2 232
ef8212dd 233%{__make} -C obj-%{target} install \
40ea5eb2
WK
234 DESTDIR=$RPM_BUILD_ROOT
235
328c429b 236# move fixed includes to proper place
237cp $RPM_BUILD_ROOT%{gcclib}/include-fixed/*.h $RPM_BUILD_ROOT%{gcclib}/include
238
ef8212dd
JB
239# don't want it here
240rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
f323cece
ER
241rm -rf $RPM_BUILD_ROOT%{_infodir}
242rm -f $RPM_BUILD_ROOT%{_mandir}/man7/fsf-funding.7
243rm -f $RPM_BUILD_ROOT%{_mandir}/man7/gfdl.7
244rm -f $RPM_BUILD_ROOT%{_mandir}/man7/gpl.7
245rm -f $RPM_BUILD_ROOT%{_datadir}/locale/*/LC_MESSAGES/{gcc,cpplib}.mo
328c429b 246rm -rf $RPM_BUILD_ROOT%{gcclib}/include-fixed
f323cece 247rm -rf $RPM_BUILD_ROOT%{gcclib}/install-tools
6ef8d480 248rm -f $RPM_BUILD_ROOT%{gcclib}/liblto_plugin.la
40ea5eb2 249
ef8212dd 250%if 0%{!?debug:1}
df3c6f23
JB
251# strip target libraries
252%{target}-strip -g $RPM_BUILD_ROOT%{gcclib}{,/avr*}/libg*.a
253%endif
1c790698 254
40ea5eb2
WK
255%clean
256rm -rf $RPM_BUILD_ROOT
257
f323cece 258%files
40ea5eb2 259%defattr(644,root,root,755)
1c790698 260%attr(755,root,root) %{_bindir}/%{target}-gcc*
261%attr(755,root,root) %{_bindir}/%{target}-cpp
262%attr(755,root,root) %{_bindir}/%{target}-gcov
40ea5eb2
WK
263%dir %{gccarch}
264%dir %{gcclib}
265%attr(755,root,root) %{gcclib}/cc1
40ea5eb2 266%attr(755,root,root) %{gcclib}/collect2
dbe7ab63 267%attr(755,root,root) %{gcclib}/lto-wrapper
268%attr(755,root,root) %{gcclib}/lto1
6ef8d480 269%attr(755,root,root) %{gcclib}/liblto_plugin.so*
df3c6f23 270%{gcclib}/libg*.a
f1442436 271%{gcclib}/%{target}*
dbe7ab63 272%{gcclib}/plugin
40ea5eb2
WK
273%dir %{gcclib}/include
274%{gcclib}/include/*.h
df3c6f23 275%{_mandir}/man1/%{target}-cpp.1*
40ea5eb2 276%{_mandir}/man1/%{target}-gcc.1*
df3c6f23 277%{_mandir}/man1/%{target}-gcov.1*
1c790698 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.113429 seconds and 4 git commands to generate.