]> git.pld-linux.org Git - packages/crossavr-gcc.git/blob - crossavr-gcc.spec
a12e10dd54700f3c72c896aa36836e1f8d8fb89e
[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.3.5
13 Release:        1
14 Patch0:         crossavr-gcc-bug-11259-v3.patch
15 Patch1:         crossavr-gcc-bug-18145.patch
16 Patch2:         crossavr-gcc-bug-19636-24894-31644-31786.patch
17 Patch3:         crossavr-gcc-bug-33009.patch
18 Patch4:         crossavr-gcc-bug-34210-35508.patch
19 Patch5:         crossavr-gcc-bug-35013.patch
20 Patch6:         crossavr-gcc-builtins-v6.patch
21 Patch7:         crossavr-gcc-libgcc.patch
22 Patch8:         crossavr-gcc-libiberty-Makefile.in.patch
23 Patch9:         crossavr-gcc-new-devices.patch
24 Patch10:        crossavr-gcc-param-inline-call-cost.patch
25 Patch11:        crossavr-gcc-xmega.patch
26 Patch12:        crossavr-gcc-osmain.patch
27 Epoch:          1
28 License:        GPL
29 Group:          Development/Languages
30 Source0:        ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{version}/gcc-%{version}.tar.bz2
31 # Source0-md5:  e588cfde3bf323f82918589b94f14a15
32 BuildRequires:  /bin/bash
33 BuildRequires:  autoconf
34 BuildRequires:  bison
35 BuildRequires:  crossavr-binutils
36 BuildRequires:  flex
37 BuildRequires:  gmp-devel >= 4.1
38 BuildRequires:  mpfr-devel >= 2.3.0
39 BuildRequires:  perl-tools-pod
40 Requires:       crossavr-binutils >= 2.15.91.0.2
41 %{!?with_bootstrap:Requires:    crossavr-libc}
42 Requires:       gcc-dirs
43 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
44
45 %define         target          avr
46 %define         arch            %{_prefix}/%{target}
47 %define         gccarch         %{_libdir}/gcc/%{target}
48 %define         gcclib          %{_libdir}/gcc/%{target}/%{version}
49 %define         _noautostrip    .*%{gcclib}.*/libgc.*\\.a
50
51 %description
52 This package contains a cross-gcc which allows the creation of
53 binaries to be run on Atmel AVR on other machines.
54
55 %description -l de.UTF-8
56 Dieses Paket enthält einen Cross-gcc, der es erlaubt, auf einem
57 anderem Rechner Code für Atmel AVR zu generieren.
58
59 %description -l pl.UTF-8
60 Ten pakiet zawiera skrośny gcc pozwalający na robienie na innych
61 maszynach binariów do uruchamiania na Atmel AVR.
62
63 %package c++
64 Summary:        C++ support for avr-gcc
65 Summary(pl.UTF-8):      Obsługa C++ dla avr-gcc
66 Group:          Development/Languages
67 Requires:       %{name} = %{epoch}:%{version}-%{release}
68
69 %description c++
70 This package adds C++ support to the GNU Compiler Collection for AVR.
71
72 %description c++ -l pl.UTF-8
73 Ten pakiet dodaje obsługę C++ do kompilatora gcc dla AVR.
74
75 %prep
76 %setup -q -n gcc-%{version}
77 %patch0 -p0
78 %patch1 -p0
79 %patch2 -p0
80 %patch3 -p0
81 %patch4 -p0
82 %patch5 -p0
83 %patch6 -p0
84 %patch7 -p0
85 %patch8 -p0
86 %patch9 -p0
87 %patch10 -p0
88 %patch11 -p0
89 %patch12 -p0
90
91 %build
92 rm -rf obj-%{target}
93 install -d obj-%{target}
94 cd obj-%{target}
95
96 CFLAGS="%{rpmcflags}" \
97 CXXFLAGS="%{rpmcflags}" \
98 TEXCONFIG=false \
99 ../configure \
100         --prefix=%{_prefix} \
101         --infodir=%{_infodir} \
102         --mandir=%{_mandir} \
103         --bindir=%{_bindir} \
104         --libdir=%{_libdir} \
105         --libexecdir=%{_libdir} \
106         --disable-shared \
107         --disable-libssp \
108         --enable-languages="c,c++" \
109         --with-dwarf2 \
110         --with-gnu-as \
111         --with-gnu-ld \
112         --with-system-zlib \
113         --with-multilib \
114         --without-x \
115         --build=%{_target_platform} \
116         --host=%{_target_platform} \
117         --target=%{target}
118
119 %{__make} CFLAGS_FOR_TARGET="-Os"
120
121 %install
122 rm -rf $RPM_BUILD_ROOT
123
124 %{__make} -C obj-%{target} install \
125         DESTDIR=$RPM_BUILD_ROOT
126
127 # move fixed includes to proper place
128 cp $RPM_BUILD_ROOT%{gcclib}/include-fixed/*.h $RPM_BUILD_ROOT%{gcclib}/include
129
130 # don't want it here
131 rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
132 rm -rf $RPM_BUILD_ROOT%{_infodir}
133 rm -f $RPM_BUILD_ROOT%{_mandir}/man7/fsf-funding.7
134 rm -f $RPM_BUILD_ROOT%{_mandir}/man7/gfdl.7
135 rm -f $RPM_BUILD_ROOT%{_mandir}/man7/gpl.7
136 rm -f $RPM_BUILD_ROOT%{_datadir}/locale/*/LC_MESSAGES/{gcc,cpplib}.mo
137 rm -rf $RPM_BUILD_ROOT%{gcclib}/include-fixed
138 rm -rf $RPM_BUILD_ROOT%{gcclib}/install-tools
139
140 %if 0%{!?debug:1}
141 # strip target libraries
142 %{target}-strip -g $RPM_BUILD_ROOT%{gcclib}{,/avr*}/libg*.a
143 %endif
144
145 %clean
146 rm -rf $RPM_BUILD_ROOT
147
148 %files
149 %defattr(644,root,root,755)
150 %attr(755,root,root) %{_bindir}/%{target}-gcc*
151 %attr(755,root,root) %{_bindir}/%{target}-cpp
152 %attr(755,root,root) %{_bindir}/%{target}-gcov
153 %dir %{gccarch}
154 %dir %{gcclib}
155 %attr(755,root,root) %{gcclib}/cc1
156 %attr(755,root,root) %{gcclib}/collect2
157 %{gcclib}/libg*.a
158 %{gcclib}/%{target}*
159 %dir %{gcclib}/include
160 %{gcclib}/include/*.h
161 %{_mandir}/man1/%{target}-cpp.1*
162 %{_mandir}/man1/%{target}-gcc.1*
163 %{_mandir}/man1/%{target}-gcov.1*
164
165 %files c++
166 %defattr(644,root,root,755)
167 %attr(755,root,root) %{_bindir}/%{target}-g++
168 %attr(755,root,root) %{_bindir}/%{target}-c++
169 %attr(755,root,root) %{gcclib}/cc1plus
170 %{_mandir}/man1/%{target}-g++.1*
This page took 0.165397 seconds and 3 git commands to generate.