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