]>
Commit | Line | Data |
---|---|---|
312cf8f5 ER |
1 | # |
2 | # Conditional build: | |
3 | %bcond_with bootstrap # for bootstraping | |
4 | # | |
281bac7a | 5 | Summary: Cross AVR GNU binary utility development utilities - gcc |
c7d51c5d ER |
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 | |
40ea5eb2 | 11 | Name: crossavr-gcc |
fae8a012 | 12 | Version: 4.2.4 |
8a8eaaa1 | 13 | Release: 1 |
391a0dd0 ER |
14 | Patch0: %{name}-0b-constants.patch |
15 | Patch1: %{name}-attribute_alias.patch | |
16 | Patch2: %{name}-bug25672.patch | |
17 | Patch3: %{name}-dwarf.patch | |
18 | Patch4: %{name}-libiberty-Makefile.in.patch | |
8a8eaaa1 | 19 | Patch5: %{name}-zz-atmega256x.patch |
40ea5eb2 WK |
20 | Epoch: 1 |
21 | License: GPL | |
22 | Group: Development/Languages | |
6b88a121 | 23 | Source0: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{version}/gcc-%{version}.tar.bz2 |
fae8a012 | 24 | # Source0-md5: d79f553e7916ea21c556329eacfeaa16 |
40ea5eb2 | 25 | BuildRequires: /bin/bash |
f323cece | 26 | BuildRequires: autoconf |
fdd61bcf JB |
27 | BuildRequires: bison |
28 | BuildRequires: crossavr-binutils | |
29 | BuildRequires: flex | |
78067d97 | 30 | Requires: crossavr-binutils >= 2.15.91.0.2 |
312cf8f5 | 31 | %{!?with_boostrap:Requires: crossavr-libc} |
c2bc48fa | 32 | Requires: gcc-dirs |
40ea5eb2 WK |
33 | BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n) |
34 | ||
40ea5eb2 | 35 | %define target avr |
40ea5eb2 | 36 | %define arch %{_prefix}/%{target} |
df3c6f23 JB |
37 | %define gccarch %{_libdir}/gcc/%{target} |
38 | %define gcclib %{_libdir}/gcc/%{target}/%{version} | |
ef8212dd | 39 | %define _noautostrip .*%{gcclib}.*/libgc.*\\.a |
40ea5eb2 WK |
40 | |
41 | %description | |
42 | This package contains a cross-gcc which allows the creation of | |
7f5526fe | 43 | binaries to be run on Atmel AVR on other machines. |
40ea5eb2 | 44 | |
76648510 | 45 | %description -l de.UTF-8 |
46 | Dieses Paket enthält einen Cross-gcc, der es erlaubt, auf einem | |
47 | anderem Rechner Code für Atmel AVR zu generieren. | |
40ea5eb2 | 48 | |
76648510 | 49 | %description -l pl.UTF-8 |
50 | Ten pakiet zawiera skrośny gcc pozwalający na robienie na innych | |
51 | maszynach binariów do uruchamiania na Atmel AVR. | |
40ea5eb2 | 52 | |
1c790698 | 53 | %package c++ |
fdd61bcf | 54 | Summary: C++ support for avr-gcc |
c7d51c5d | 55 | Summary(pl.UTF-8): Obsługa C++ dla avr-gcc |
fdd61bcf | 56 | Group: Development/Languages |
aaeaf91a | 57 | Requires: %{name} = %{epoch}:%{version}-%{release} |
1c790698 | 58 | |
59 | %description c++ | |
60 | This package adds C++ support to the GNU Compiler Collection for AVR. | |
61 | ||
76648510 | 62 | %description c++ -l pl.UTF-8 |
63 | Ten pakiet dodaje obsługę C++ do kompilatora gcc dla AVR. | |
1c790698 | 64 | |
40ea5eb2 WK |
65 | %prep |
66 | %setup -q -n gcc-%{version} | |
391a0dd0 ER |
67 | %patch0 -p0 |
68 | %patch1 -p0 | |
69 | %patch2 -p0 | |
70 | %patch3 -p0 | |
71 | %patch4 -p0 | |
8a8eaaa1 | 72 | %patch5 -p1 |
40ea5eb2 WK |
73 | |
74 | %build | |
75 | rm -rf obj-%{target} | |
76 | install -d obj-%{target} | |
77 | cd obj-%{target} | |
78 | ||
79 | CFLAGS="%{rpmcflags}" \ | |
80 | CXXFLAGS="%{rpmcflags}" \ | |
fdd61bcf JB |
81 | TEXCONFIG=false \ |
82 | ../configure \ | |
40ea5eb2 WK |
83 | --prefix=%{_prefix} \ |
84 | --infodir=%{_infodir} \ | |
85 | --mandir=%{_mandir} \ | |
df3c6f23 JB |
86 | --bindir=%{_bindir} \ |
87 | --libdir=%{_libdir} \ | |
88 | --libexecdir=%{_libdir} \ | |
40ea5eb2 | 89 | --disable-shared \ |
69b7b918 | 90 | --disable-libssp \ |
1c790698 | 91 | --enable-languages="c,c++" \ |
391a0dd0 | 92 | --with-dwarf2 \ |
40ea5eb2 WK |
93 | --with-gnu-as \ |
94 | --with-gnu-ld \ | |
95 | --with-system-zlib \ | |
96 | --with-multilib \ | |
97 | --without-x \ | |
ef8212dd JB |
98 | --build=%{_target_platform} \ |
99 | --host=%{_target_platform} \ | |
40ea5eb2 WK |
100 | --target=%{target} |
101 | ||
69b7b918 | 102 | %{__make} CFLAGS_FOR_TARGET="-Os" |
40ea5eb2 WK |
103 | |
104 | %install | |
105 | rm -rf $RPM_BUILD_ROOT | |
40ea5eb2 | 106 | |
ef8212dd | 107 | %{__make} -C obj-%{target} install \ |
40ea5eb2 WK |
108 | DESTDIR=$RPM_BUILD_ROOT |
109 | ||
ef8212dd JB |
110 | # don't want it here |
111 | rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a | |
f323cece ER |
112 | rm -rf $RPM_BUILD_ROOT%{_infodir} |
113 | rm -f $RPM_BUILD_ROOT%{_mandir}/man7/fsf-funding.7 | |
114 | rm -f $RPM_BUILD_ROOT%{_mandir}/man7/gfdl.7 | |
115 | rm -f $RPM_BUILD_ROOT%{_mandir}/man7/gpl.7 | |
116 | rm -f $RPM_BUILD_ROOT%{_datadir}/locale/*/LC_MESSAGES/{gcc,cpplib}.mo | |
117 | rm -f $RPM_BUILD_ROOT%{gcclib}/include/fixed | |
118 | rm -f $RPM_BUILD_ROOT%{gcclib}/include/README | |
119 | rm -rf $RPM_BUILD_ROOT%{gcclib}/install-tools | |
40ea5eb2 | 120 | |
ef8212dd | 121 | %if 0%{!?debug:1} |
df3c6f23 JB |
122 | # strip target libraries |
123 | %{target}-strip -g $RPM_BUILD_ROOT%{gcclib}{,/avr*}/libg*.a | |
124 | %endif | |
1c790698 | 125 | |
40ea5eb2 WK |
126 | %clean |
127 | rm -rf $RPM_BUILD_ROOT | |
128 | ||
f323cece | 129 | %files |
40ea5eb2 | 130 | %defattr(644,root,root,755) |
1c790698 | 131 | %attr(755,root,root) %{_bindir}/%{target}-gcc* |
132 | %attr(755,root,root) %{_bindir}/%{target}-cpp | |
133 | %attr(755,root,root) %{_bindir}/%{target}-gcov | |
40ea5eb2 WK |
134 | %dir %{gccarch} |
135 | %dir %{gcclib} | |
136 | %attr(755,root,root) %{gcclib}/cc1 | |
40ea5eb2 | 137 | %attr(755,root,root) %{gcclib}/collect2 |
df3c6f23 | 138 | %{gcclib}/libg*.a |
f1442436 | 139 | %{gcclib}/%{target}* |
40ea5eb2 WK |
140 | %dir %{gcclib}/include |
141 | %{gcclib}/include/*.h | |
df3c6f23 | 142 | %{_mandir}/man1/%{target}-cpp.1* |
40ea5eb2 | 143 | %{_mandir}/man1/%{target}-gcc.1* |
df3c6f23 | 144 | %{_mandir}/man1/%{target}-gcov.1* |
1c790698 | 145 | |
146 | %files c++ | |
147 | %defattr(644,root,root,755) | |
148 | %attr(755,root,root) %{_bindir}/%{target}-g++ | |
149 | %attr(755,root,root) %{_bindir}/%{target}-c++ | |
150 | %attr(755,root,root) %{gcclib}/cc1plus | |
151 | %{_mandir}/man1/%{target}-g++.1* |