]> git.pld-linux.org Git - packages/crossavr-gcc.git/blob - crossavr-gcc.spec
- updated to 4.7.3 (4.7.2 and older fail to compile with ICE)
[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.7.3
13 Release:        1
14 Epoch:          1
15 # Patches 1xx are taken form Atmel official AVR8-GNU toolchain version 3.4.2
16 # http://distribute.atmel.no/tools/opensource/Atmel-AVR-Toolchain-3.4.2/avr/avr-patches.tar.gz
17 Patch100:       300-gcc-xmega-support.patch
18 Patch101:       301-gcc-tiny-support.patch
19 Patch102:       302-gcc-mlist-devices.patch
20 Patch103:       303-ata6289-architecture-correction.patch
21 Patch104:       400-gcc-public-devices-support.patch
22 Patch105:       401-gcc-non-public-devices-support.patch
23 Patch106:       402-gcc-atmega64_128_2564RFR2.patch
24 Patch107:       403-gcc-atmxts200.patch
25 Patch108:       501-gcc-avrtc579.patch
26 Patch109:       502-gcc-pr54796.patch
27 Patch110:       503-gcc-avrtc-513.patch
28 Patch111:       504-gcc-avrtc-610.patch
29 Patch112:       505-gcc-avrtc586.patch
30 License:        GPL
31 Group:          Development/Languages
32 Source0:        ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{version}/gcc-%{version}.tar.bz2
33 # Source0-md5:  86f428a30379bdee0224e353ee2f999e
34 BuildRequires:  /bin/bash
35 BuildRequires:  autoconf
36 BuildRequires:  bison
37 BuildRequires:  crossavr-binutils >= 2.23.1
38 BuildRequires:  elfutils-devel >= 0.145-1
39 BuildRequires:  flex
40 BuildRequires:  gmp-devel >= 4.1
41 BuildRequires:  libmpc-devel
42 BuildRequires:  mpfr-devel >= 2.3.0
43 BuildRequires:  perl-tools-pod
44 BuildRequires:  ppl-devel
45 BuildRequires:  rpmbuild(macros) >= 1.565
46 BuildRequires:  sed >= 4.0
47 Requires:       crossavr-binutils >= 2.23.1
48 %{!?with_bootstrap:Requires:    crossavr-libc}
49 Requires:       gcc-dirs
50 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
51
52 %define         target          avr
53 %define         arch            %{_prefix}/%{target}
54 %define         gccarch         %{_libdir}/gcc/%{target}
55 %define         gcclib          %{_libdir}/gcc/%{target}/%{version}
56 %define         _noautostrip    .*%{gcclib}.*/libgc.*\\.a
57
58 # functions with printf format attribute but with special parser and also
59 # receiving non constant format strings
60 %define         Werror_cflags   %{nil}
61
62 %description
63 This package contains a cross-gcc which allows the creation of
64 binaries to be run on Atmel AVR on other machines.
65
66 %description -l de.UTF-8
67 Dieses Paket enthält einen Cross-gcc, der es erlaubt, auf einem
68 anderem Rechner Code für Atmel AVR zu generieren.
69
70 %description -l pl.UTF-8
71 Ten pakiet zawiera skrośny gcc pozwalający na robienie na innych
72 maszynach binariów do uruchamiania na Atmel AVR.
73
74 %package c++
75 Summary:        C++ support for avr-gcc
76 Summary(pl.UTF-8):      Obsługa C++ dla avr-gcc
77 Group:          Development/Languages
78 Requires:       %{name} = %{epoch}:%{version}-%{release}
79
80 %description c++
81 This package adds C++ support to the GNU Compiler Collection for AVR.
82
83 %description c++ -l pl.UTF-8
84 Ten pakiet dodaje obsługę C++ do kompilatora gcc dla AVR.
85
86 %prep
87 %setup -q -n gcc-%{version}
88 cd gcc/config/%{target} && %undos -f c,h && cd -
89 %patch100 -p0
90 #patch101 -p0
91 %patch102 -p0
92 %patch103 -p0
93 #patch104 -p0
94 #patch105 -p0
95 #patch106 -p0
96 #patch107 -p0
97 #patch108 -p0
98 %patch109 -p0
99 #patch110 -p0
100 %patch111 -p0
101 #patch112 -p0
102
103 %build
104 rm -rf obj-%{target}
105 install -d obj-%{target}
106 cd obj-%{target}
107
108 CFLAGS="%{rpmcflags}" \
109 CXXFLAGS="%{rpmcflags}" \
110 TEXCONFIG=false \
111 ../configure \
112         --prefix=%{_prefix} \
113         --infodir=%{_infodir} \
114         --mandir=%{_mandir} \
115         --bindir=%{_bindir} \
116         --libdir=%{_libdir} \
117         --libexecdir=%{_libdir} \
118         --enable-c99 \
119         --enable-languages="c,c++" \
120         --enable-long-long \
121         --enable-lto \
122         --disable-shared \
123         --disable-libssp \
124         --with-dwarf2 \
125         --with-gnu-as \
126         --with-gnu-ld \
127         --with-system-zlib \
128         --with-multilib \
129         --with-ppl \
130         --disable-ppl-version-check \
131         --without-x \
132         --build=%{_target_platform} \
133         --host=%{_target_platform} \
134         --target=%{target}
135
136 %{__make} CFLAGS_FOR_TARGET="-Os"
137
138 %install
139 rm -rf $RPM_BUILD_ROOT
140
141 %{__make} -C obj-%{target} install \
142         DESTDIR=$RPM_BUILD_ROOT
143
144 # move fixed includes to proper place
145 cp $RPM_BUILD_ROOT%{gcclib}/include-fixed/*.h $RPM_BUILD_ROOT%{gcclib}/include
146
147 # don't want it here
148 rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
149 rm -rf $RPM_BUILD_ROOT%{_infodir}
150 rm -f $RPM_BUILD_ROOT%{_mandir}/man7/fsf-funding.7
151 rm -f $RPM_BUILD_ROOT%{_mandir}/man7/gfdl.7
152 rm -f $RPM_BUILD_ROOT%{_mandir}/man7/gpl.7
153 rm -f $RPM_BUILD_ROOT%{_datadir}/locale/*/LC_MESSAGES/{gcc,cpplib}.mo
154 rm -rf $RPM_BUILD_ROOT%{gcclib}/include-fixed
155 rm -rf $RPM_BUILD_ROOT%{gcclib}/install-tools
156 rm -f $RPM_BUILD_ROOT%{gcclib}/liblto_plugin.la
157
158 %if 0%{!?debug:1}
159 # strip target libraries
160 %{target}-strip -g $RPM_BUILD_ROOT%{gcclib}{,/avr*}/libg*.a
161 %endif
162
163 %clean
164 rm -rf $RPM_BUILD_ROOT
165
166 %files
167 %defattr(644,root,root,755)
168 %attr(755,root,root) %{_bindir}/%{target}-gcc*
169 %attr(755,root,root) %{_bindir}/%{target}-cpp
170 %attr(755,root,root) %{_bindir}/%{target}-gcov
171 %dir %{gccarch}
172 %dir %{gcclib}
173 %attr(755,root,root) %{gcclib}/cc1
174 %attr(755,root,root) %{gcclib}/collect2
175 %attr(755,root,root) %{gcclib}/lto-wrapper
176 %attr(755,root,root) %{gcclib}/lto1
177 %attr(755,root,root) %{gcclib}/liblto_plugin.so*
178 %{gcclib}/libg*.a
179 %{gcclib}/%{target}*
180 %{gcclib}/plugin
181 %dir %{gcclib}/tiny-stack
182 %{gcclib}/tiny-stack/*.a
183 %dir %{gcclib}/include
184 %{gcclib}/include/*.h
185 %{_mandir}/man1/%{target}-cpp.1*
186 %{_mandir}/man1/%{target}-gcc.1*
187 %{_mandir}/man1/%{target}-gcov.1*
188
189 %files c++
190 %defattr(644,root,root,755)
191 %attr(755,root,root) %{_bindir}/%{target}-g++
192 %attr(755,root,root) %{_bindir}/%{target}-c++
193 %attr(755,root,root) %{gcclib}/cc1plus
194 %{_mandir}/man1/%{target}-g++.1*
This page took 0.051229 seconds and 3 git commands to generate.