]> git.pld-linux.org Git - packages/crossavr32-gcc.git/blob - crossavr32-gcc.spec
4f18b8601cf440ec411817cbc868272ae5f66b65
[packages/crossavr32-gcc.git] / crossavr32-gcc.spec
1 # $RevOCision: 1.31 $, $Date: 2007-08-01 20:42:29 $
2 #
3 # Conditional build:
4 %bcond_with     bootstrap       # for bootstraping
5 #
6 Summary:        Cross AVR32 GNU binary utility development utilities - gcc
7 Summary(es.UTF-8):      Utilitarios para desarrollo de binarios de la GNU - AVR32 gcc
8 Summary(fr.UTF-8):      Utilitaires de développement binaire de GNU - AVR32 gcc
9 Summary(pl.UTF-8):      Skrośne narzędzia programistyczne GNU dla AVR32 - gcc
10 Summary(pt_BR.UTF-8):   Utilitários para desenvolvimento de binários da GNU - AVR32 gcc
11 Summary(tr.UTF-8):      GNU geliştirme araçları - AVR32 gcc
12 Name:           crossavr32-gcc
13 Version:        4.2.1
14 Release:        0.6%{?with_bootstrap:.bootstrap}
15 Epoch:          1
16 License:        GPL
17 Group:          Development/Languages
18 Source0:        ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{version}/gcc-%{version}.tar.bz2
19 # Source0-md5:  cba410e6ff70f7d7f4be7a0267707fd0
20 Patch0:         %{name}.patch
21 Patch1:         %{name}-configure.patch
22 BuildRequires:  /bin/bash
23 BuildRequires:  autoconf
24 BuildRequires:  bison
25 BuildRequires:  crossavr32-binutils
26 BuildRequires:  flex
27 Requires:       crossavr32-binutils >= 2.17
28 %{!?with_boostrap:Requires:     crossavr32-uClibc}
29 Requires:       gcc-dirs
30 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
31
32 %define         target          avr32-pld-linux
33 %define         arch            %{_prefix}/%{target}
34 %define         gccarch         %{_libdir}/gcc/%{target}
35 %define         gcclib          %{_libdir}/gcc/%{target}/%{version}
36 %define         _noautostrip    .*%{arch}/lib/.*
37 %define         _noautochrpath  .*%{arch}/lib/.*
38
39 %description
40 This package contains a cross-gcc which allows the creation of
41 binaries to be run on Atmel AVR32 on other machines.
42
43 %description -l de.UTF-8
44 Dieses Paket enthält einen Cross-gcc, der es erlaubt, auf einem
45 anderem Rechner Code für Atmel AVR32 zu generieren.
46
47 %description -l pl.UTF-8
48 Ten pakiet zawiera skrośny gcc pozwalający na robienie na innych
49 maszynach binariów do uruchamiania na Atmel AVR.
50
51 %package c++
52 Summary:        C++ support for avr32-gcc
53 Summary(pl.UTF-8):      Obsługa C++ dla avr32-gcc
54 Group:          Development/Languages
55 Requires:       %{name} = %{epoch}:%{version}-%{release}
56
57 %description c++
58 This package adds C++ support to the GNU Compiler Collection for
59 AVR32.
60
61 %description c++ -l pl.UTF-8
62 Ten pakiet dodaje obsługę C++ do kompilatora gcc dla AVR32.
63
64 %package -n crossavr32-libgomp
65 Summary:        GNU OpenMP library
66 Summary(pl.UTF-8):      Biblioteka GNU OpenMP
67 License:        GPL v2+ with unlimited link permission
68 Group:          Libraries
69
70 %description -n crossavr32-libgomp
71 GNU OpenMP library.
72
73 %description -n crossavr32-libgomp -l pl.UTF-8
74 Biblioteka GNU OpenMP.
75
76 %package -n crossavr32-libstdc++
77 Summary:        GNU C++ library
78 Summary(pl.UTF-8):      Biblioteki GNU C++
79 License:        GPL v2+ with free software exception
80 Group:          Libraries
81
82 %description -n crossavr32-libstdc++
83 This is the GNU implementation of the standard C++ libraries, along
84 with additional GNU tools. This package includes the shared libraries
85 necessary to run C++ applications.
86
87 %prep
88 %setup -q -n gcc-%{version}
89 %patch0 -p1
90 %patch1 -p0
91
92 %build
93 %{__autoconf}
94
95 rm -rf obj-%{target}
96 install -d obj-%{target}
97 cd obj-%{target}
98
99 CFLAGS="%{rpmcflags}" \
100 CXXFLAGS="%{rpmcflags}" \
101 TEXCONFIG=false \
102 ../configure \
103         --prefix=%{_prefix} \
104         --infodir=%{_infodir} \
105         --mandir=%{_mandir} \
106         --bindir=%{_bindir} \
107         --libdir=%{_libdir} \
108         --libexecdir=%{_libdir} \
109         --enable-shared \
110 %if %{with bootstrap}
111         --enable-languages="c" \
112         --disable-libssp \
113         --disable-threads \
114         --disable-libmudflap \
115         --disable-nls \
116         --disable-libgomp \
117 %else
118         --enable-languages="c,c++" \
119         --enable-threads=posix \
120         --enable-libssp \
121         --disable-libstdcxx-pch \
122         --enable-__cxa_atexit \
123         --enable-libstdcxx-allocator=new \
124 %endif
125         --with-dwarf2 \
126         --with-gnu-as \
127         --with-gnu-ld \
128         --with-system-zlib \
129         --with-multilib \
130         --without-x \
131         --build=%{_target_platform} \
132         --host=%{_target_platform} \
133         --target=%{target}
134
135
136 CXXFLAGS_FOR_TARGET="-Os"
137 export CXXFLAGS_FOR_TARGET
138 %{__make} CFLAGS_FOR_TARGET="-Os" CXXFLAGS_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 # don't want it here
147 rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
148 rm -rf $RPM_BUILD_ROOT%{_infodir}
149 rm -f $RPM_BUILD_ROOT%{_mandir}/man7/fsf-funding.7
150 rm -f $RPM_BUILD_ROOT%{_mandir}/man7/gfdl.7
151 rm -f $RPM_BUILD_ROOT%{_mandir}/man7/gpl.7
152 rm -f $RPM_BUILD_ROOT%{_datadir}/locale/*/LC_MESSAGES/{gcc,cpplib}.mo
153 rm -f $RPM_BUILD_ROOT%{gcclib}/include/fixed
154 rm -f $RPM_BUILD_ROOT%{gcclib}/include/README
155 rm -rf $RPM_BUILD_ROOT%{gcclib}/install-tools
156
157 %if 0%{!?debug:1}
158 # strip target libraries
159 %{target}-strip --strip-debug --remove-section=.note --remove-section=.comment \
160         $RPM_BUILD_ROOT%{gcclib}{,/uc}/libg*.a \
161         $RPM_BUILD_ROOT%{arch}/lib{,/uc}/lib*.a
162 %{target}-strip --strip-unneeded --remove-section=.note --remove-section=.comment \
163         $RPM_BUILD_ROOT%{arch}/lib{,/uc}/lib*.so.*.*
164 %endif
165
166 %clean
167 rm -rf $RPM_BUILD_ROOT
168
169 %files
170 %defattr(644,root,root,755)
171 %attr(755,root,root) %{_bindir}/%{target}-gcc*
172 %attr(755,root,root) %{_bindir}/%{target}-cpp
173 %attr(755,root,root) %{_bindir}/%{target}-gcov
174 %dir %{gccarch}
175 %dir %{gcclib}
176 %attr(755,root,root) %{gcclib}/cc1
177 %attr(755,root,root) %{gcclib}/collect2
178 %{gcclib}/libg*.a
179 %{gcclib}/crt*.o
180 %{gcclib}/uc
181 %dir %{gcclib}/include
182 %{gcclib}/include/*.h
183 %{_mandir}/man1/%{target}-cpp.1*
184 %{_mandir}/man1/%{target}-gcc.1*
185 %{_mandir}/man1/%{target}-gcov.1*
186
187 %if %{without bootstrap}
188 %files c++
189 %defattr(644,root,root,755)
190 %attr(755,root,root) %{_bindir}/%{target}-g++
191 %attr(755,root,root) %{_bindir}/%{target}-c++
192 %attr(755,root,root) %{gcclib}/cc1plus
193 %{_mandir}/man1/%{target}-g++.1*
194
195 %files -n crossavr32-libgomp
196 %defattr(644,root,root,755)
197 %{arch}/lib/libgomp*
198 %{arch}/lib/uc/libgomp*
199
200 %files -n crossavr32-libstdc++
201 %defattr(644,root,root,755)
202 %{arch}/lib/libstdc*
203 %{arch}/lib/libsupc*
204 %{arch}/lib/uc/libstdc*
205 %{arch}/lib/uc/libsupc*
206 %{arch}/include/c++
207
208 %endif
This page took 0.068452 seconds and 2 git commands to generate.