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