]> git.pld-linux.org Git - packages/crossavr-gcc.git/blame - crossavr-gcc.spec
crossavr-gcc: Synchronized with official AVR toolchain 3.4.0.663.
[packages/crossavr-gcc.git] / crossavr-gcc.spec
CommitLineData
312cf8f5 1#
328c429b 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
dbe7ab63 13Release: 1
40ea5eb2 14Epoch: 1
6ef8d480
PZ
15Patch1: gcc-bug51969.patch
16# Patches 1xx are taken form Atmel official AVR8-GNU toolchain version 3.4.0.663.
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
25Patch108: 400-gcc-new-devices.patch
26Patch109: 401-gcc-atmega32_5_50_90_pa.patch
27Patch110: 402-gcc-attiny1634.patch
28Patch111: 403-gcc-atmega48pa.patch
29Patch112: 404-gcc-atxmega_16_32_a4u.patch
30Patch113: 405-gcc-atxmega64_128_192_256a3u.patch
31Patch114: 406-gcc-atmegarfr2_a2.patch
32Patch115: 407-gcc-atmega165pa.patch
33Patch116: 408-gcc-atxmega384c3.patch
34Patch117: 409-gcc-attiny80.patch
35Patch118: 410-gcc-atxmega128a4u.patch
36Patch119: 411-gcc-atxmega64d4.patch
37Patch120: 412-gcc-atmega164pa_168pa_32a_64a.patch
38Patch121: 413-gcc-atxmega64_128_b3.patch
39Patch122: 414-gcc-atxmega64b1.patch
40Patch123: 415-gcc-atmega_8a_128a_1284.patch
41Patch124: 416-gcc-atxmega64a4u.patch
42Patch125: 417-gcc-atxmega128d4.patch
43Patch126: 418-gcc-atmxt336s.patch
44Patch127: 419-gcc-atxmega16c4_32c4_128c3_256c3.patch
45Patch128: 420-gcc-atxmega384d3.patch
46Patch129: 421-gcc-atmega48hvf.patch
47Patch130: 422-gcc-atmega26hvg.patch
48Patch131: 423-gcc-atmxt224_224e.patch
49Patch132: 424-gcc-atxmega192c3.patch
50Patch133: 425-gcc-atmxt112sl.patch
51Patch134: 426-gcc-atxmega64c3.patch
52Patch135: 427-gcc-ata6285_6286.patch
53Patch136: 428-gcc-attiny828.patch
54Patch137: 429-gcc-ata5790_5790n_5795.patch
55Patch138: 430-gcc-ata5272_ata5505.patch
56Patch139: 500-gcc-bug13473.patch
57Patch140: 501-gcc-avrtiny10-bug-12510.patch
58Patch141: 502-gcc-bug12915.patch
59Patch142: 503-gcc-bug13789.patch
60Patch143: 504-gcc-conditional-register.patch
61Patch144: 505-gcc-avrtc381-tiny.patch
40ea5eb2
WK
62License: GPL
63Group: Development/Languages
6b88a121 64Source0: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{version}/gcc-%{version}.tar.bz2
6ef8d480 65# Source0-md5: 028115c4fbfb6cfd75d6369f4a90d87e
40ea5eb2 66BuildRequires: /bin/bash
f323cece 67BuildRequires: autoconf
fdd61bcf
JB
68BuildRequires: bison
69BuildRequires: crossavr-binutils
dbe7ab63 70BuildRequires: elfutils-devel >= 0.145-1
fdd61bcf 71BuildRequires: flex
328c429b 72BuildRequires: gmp-devel >= 4.1
dbe7ab63 73BuildRequires: libmpc-devel
328c429b 74BuildRequires: mpfr-devel >= 2.3.0
2a46c025 75BuildRequires: perl-tools-pod
59c2e2e2 76BuildRequires: rpmbuild(macros) >= 1.565
77BuildRequires: sed >= 4.0
78067d97 78Requires: crossavr-binutils >= 2.15.91.0.2
328c429b 79%{!?with_bootstrap:Requires: crossavr-libc}
c2bc48fa 80Requires: gcc-dirs
40ea5eb2
WK
81BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
82
40ea5eb2 83%define target avr
40ea5eb2 84%define arch %{_prefix}/%{target}
df3c6f23
JB
85%define gccarch %{_libdir}/gcc/%{target}
86%define gcclib %{_libdir}/gcc/%{target}/%{version}
ef8212dd 87%define _noautostrip .*%{gcclib}.*/libgc.*\\.a
40ea5eb2
WK
88
89%description
90This package contains a cross-gcc which allows the creation of
7f5526fe 91binaries to be run on Atmel AVR on other machines.
40ea5eb2 92
76648510 93%description -l de.UTF-8
94Dieses Paket enthält einen Cross-gcc, der es erlaubt, auf einem
95anderem Rechner Code für Atmel AVR zu generieren.
40ea5eb2 96
76648510 97%description -l pl.UTF-8
98Ten pakiet zawiera skrośny gcc pozwalający na robienie na innych
99maszynach binariów do uruchamiania na Atmel AVR.
40ea5eb2 100
1c790698 101%package c++
fdd61bcf 102Summary: C++ support for avr-gcc
c7d51c5d 103Summary(pl.UTF-8): Obsługa C++ dla avr-gcc
fdd61bcf 104Group: Development/Languages
aaeaf91a 105Requires: %{name} = %{epoch}:%{version}-%{release}
1c790698 106
107%description c++
108This package adds C++ support to the GNU Compiler Collection for AVR.
109
76648510 110%description c++ -l pl.UTF-8
111Ten pakiet dodaje obsługę C++ do kompilatora gcc dla AVR.
1c790698 112
40ea5eb2
WK
113%prep
114%setup -q -n gcc-%{version}
59c2e2e2 115cd gcc/config/%{target} && %undos -f c,h && cd -
6ef8d480 116%patch1 -p2
dbe7ab63 117%patch100 -p0
118%patch101 -p0
119%patch102 -p0
120%patch103 -p0
121%patch104 -p0
122%patch105 -p0
123%patch106 -p0
124%patch107 -p0
125%patch108 -p0
126%patch109 -p0
127%patch110 -p0
128%patch111 -p0
129%patch112 -p0
130%patch113 -p0
131%patch114 -p0
132%patch115 -p0
133%patch116 -p0
134%patch117 -p0
135%patch118 -p0
136%patch119 -p0
137%patch120 -p0
138%patch121 -p0
139%patch122 -p0
140%patch123 -p0
141%patch124 -p0
142%patch125 -p0
143%patch126 -p0
144%patch127 -p0
145%patch128 -p0
146%patch129 -p0
147%patch130 -p0
148%patch131 -p0
149%patch132 -p0
150%patch133 -p0
151%patch134 -p0
152%patch135 -p0
153%patch136 -p0
154%patch137 -p0
155%patch138 -p0
156%patch139 -p0
157%patch140 -p0
158%patch141 -p0
6ef8d480
PZ
159%patch142 -p0
160%patch143 -p0
161%patch144 -p0
40ea5eb2
WK
162
163%build
164rm -rf obj-%{target}
165install -d obj-%{target}
166cd obj-%{target}
167
168CFLAGS="%{rpmcflags}" \
169CXXFLAGS="%{rpmcflags}" \
fdd61bcf
JB
170TEXCONFIG=false \
171../configure \
40ea5eb2
WK
172 --prefix=%{_prefix} \
173 --infodir=%{_infodir} \
174 --mandir=%{_mandir} \
df3c6f23
JB
175 --bindir=%{_bindir} \
176 --libdir=%{_libdir} \
177 --libexecdir=%{_libdir} \
dbe7ab63 178 --enable-c99 \
179 --enable-languages="c,c++" \
180 --enable-long-long \
181 --enable-lto \
40ea5eb2 182 --disable-shared \
69b7b918 183 --disable-libssp \
391a0dd0 184 --with-dwarf2 \
40ea5eb2
WK
185 --with-gnu-as \
186 --with-gnu-ld \
187 --with-system-zlib \
188 --with-multilib \
189 --without-x \
ef8212dd
JB
190 --build=%{_target_platform} \
191 --host=%{_target_platform} \
40ea5eb2
WK
192 --target=%{target}
193
69b7b918 194%{__make} CFLAGS_FOR_TARGET="-Os"
40ea5eb2
WK
195
196%install
197rm -rf $RPM_BUILD_ROOT
40ea5eb2 198
ef8212dd 199%{__make} -C obj-%{target} install \
40ea5eb2
WK
200 DESTDIR=$RPM_BUILD_ROOT
201
328c429b 202# move fixed includes to proper place
203cp $RPM_BUILD_ROOT%{gcclib}/include-fixed/*.h $RPM_BUILD_ROOT%{gcclib}/include
204
ef8212dd
JB
205# don't want it here
206rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
f323cece
ER
207rm -rf $RPM_BUILD_ROOT%{_infodir}
208rm -f $RPM_BUILD_ROOT%{_mandir}/man7/fsf-funding.7
209rm -f $RPM_BUILD_ROOT%{_mandir}/man7/gfdl.7
210rm -f $RPM_BUILD_ROOT%{_mandir}/man7/gpl.7
211rm -f $RPM_BUILD_ROOT%{_datadir}/locale/*/LC_MESSAGES/{gcc,cpplib}.mo
328c429b 212rm -rf $RPM_BUILD_ROOT%{gcclib}/include-fixed
f323cece 213rm -rf $RPM_BUILD_ROOT%{gcclib}/install-tools
6ef8d480 214rm -f $RPM_BUILD_ROOT%{gcclib}/liblto_plugin.la
40ea5eb2 215
ef8212dd 216%if 0%{!?debug:1}
df3c6f23
JB
217# strip target libraries
218%{target}-strip -g $RPM_BUILD_ROOT%{gcclib}{,/avr*}/libg*.a
219%endif
1c790698 220
40ea5eb2
WK
221%clean
222rm -rf $RPM_BUILD_ROOT
223
f323cece 224%files
40ea5eb2 225%defattr(644,root,root,755)
1c790698 226%attr(755,root,root) %{_bindir}/%{target}-gcc*
227%attr(755,root,root) %{_bindir}/%{target}-cpp
228%attr(755,root,root) %{_bindir}/%{target}-gcov
40ea5eb2
WK
229%dir %{gccarch}
230%dir %{gcclib}
231%attr(755,root,root) %{gcclib}/cc1
40ea5eb2 232%attr(755,root,root) %{gcclib}/collect2
dbe7ab63 233%attr(755,root,root) %{gcclib}/lto-wrapper
234%attr(755,root,root) %{gcclib}/lto1
6ef8d480 235%attr(755,root,root) %{gcclib}/liblto_plugin.so*
df3c6f23 236%{gcclib}/libg*.a
f1442436 237%{gcclib}/%{target}*
dbe7ab63 238%{gcclib}/plugin
40ea5eb2
WK
239%dir %{gcclib}/include
240%{gcclib}/include/*.h
df3c6f23 241%{_mandir}/man1/%{target}-cpp.1*
40ea5eb2 242%{_mandir}/man1/%{target}-gcc.1*
df3c6f23 243%{_mandir}/man1/%{target}-gcov.1*
1c790698 244
245%files c++
246%defattr(644,root,root,755)
247%attr(755,root,root) %{_bindir}/%{target}-g++
248%attr(755,root,root) %{_bindir}/%{target}-c++
249%attr(755,root,root) %{gcclib}/cc1plus
250%{_mandir}/man1/%{target}-g++.1*
This page took 0.060737 seconds and 4 git commands to generate.