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