]> git.pld-linux.org Git - packages/crossarm-gcc.git/blob - crossarm-gcc.spec
- updated to 4.0.0-20050319.
[packages/crossarm-gcc.git] / crossarm-gcc.spec
1 #
2 # MUST SEE:
3 #               - GCC ARM Improvement Project - http://www.inf.u-szeged.hu/gcc-arm/
4 #               - Developing StrongARM shellocde - http://phrack.org/show.php?p=58&a=10
5 #
6 # Conditional build:
7 %bcond_with     eabi            # build with Embedded ABI support
8 #
9 Summary:        Cross ARM GNU binary utility development utilities - gcc
10 Summary(es):    Utilitarios para desarrollo de binarios de la GNU - ARM gcc
11 Summary(fr):    Utilitaires de développement binaire de GNU - ARM gcc
12 Summary(pl):    Skro¶ne narzêdzia programistyczne GNU dla ARM - gcc
13 Summary(pt_BR): Utilitários para desenvolvimento de binários da GNU - ARM gcc
14 Summary(tr):    GNU geliþtirme araçlarý - ARM gcc
15 Name:           crossarm-gcc
16 Version:        4.0.0
17 %define         _snap   20050319
18 Release:        0.%{_snap}.1%{?with_eabi:eabi}
19 Epoch:          1
20 License:        GPL
21 Group:          Development/Languages
22 #Source0:       ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{version}/gcc-%{version}.tar.bz2
23 Source0:        ftp://gcc.gnu.org/pub/gcc/snapshots/4.0-%{_snap}/gcc-4.0-%{_snap}.tar.bz2
24 # Source0-md5:  981afe4856b3c23db52c515aecc9ead8
25 %define         _llh_ver        2.6.11.0
26 Source1:        http://ep09.pld-linux.org/~mmazur/linux-libc-headers/linux-libc-headers-%{_llh_ver}.tar.bz2
27 # Source1-md5:  7dc73cdc8198f6f8ba25515aea799bbd
28 %define         _uclibc_ver     0.9.27
29 Source2:        http://uclibc.org/downloads/uClibc-%{_uclibc_ver}.tar.bz2
30 # Source2-md5:  6250bd6524283bd8e7bc976d43a46ec0
31 Source3:        crossarm-embedded-uclibc.config
32 URL:            http://gcc.gnu.org/
33 BuildRequires:  autoconf
34 BuildRequires:  automake
35 BuildRequires:  bison
36 BuildRequires:  crossarm-binutils%{?with_eabi:(eabi)}
37 BuildRequires:  flex
38 BuildRequires:  /bin/bash
39 Requires:       crossarm-binutils%{?with_eabi:(eabi)}
40 Requires:       gcc-dirs
41 ExcludeArch:    arm
42 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
43
44 %define         target          arm-linux%{?with_eabi:-eabi}
45 %define         arch            %{_prefix}/%{target}
46 %define         gccarch         %{_libdir}/gcc/%{target}
47 %define         gcclib          %{gccarch}/%{version}
48
49 %define         _noautostrip    .*/libgc.*\\.a
50
51 %description
52 This package contains a cross-gcc which allows the creation of
53 binaries to be run on ARM linux (architecture arm-linux) on
54 other machines.
55
56 %description -l de
57 Dieses Paket enthält einen Cross-gcc, der es erlaubt, auf einem
58 anderem Rechner Code für arm-Linux zu generieren.
59
60 %description -l pl
61 Ten pakiet zawiera skro¶ny gcc pozwalaj±cy na robienie na innych
62 maszynach binariów do uruchamiania na ARM (architektura
63 arm-linux).
64
65 %package c++
66 Summary:        C++ support for crossppc-arm
67 Summary(pl):    Obs³uga C++ dla crossppc-arm
68 Group:          Development/Languages
69 Requires:       %{name} = %{epoch}:%{version}-%{release}
70
71 %description c++
72 This package adds C++ support to the GNU Compiler Collection for ARM.
73
74 %description c++ -l pl
75 Ten pakiet dodaje obs³ugê C++ do kompilatora gcc dla ARM.
76
77 %prep
78 %setup -q -n gcc-4.0-%{_snap} -a1 -a2
79
80 %build
81 FAKE_ROOT=$PWD/fake-root
82 rm -rf $FAKE_ROOT
83
84 install -d $FAKE_ROOT%{_prefix}
85 cp -r uClibc-%{_uclibc_ver}/* $FAKE_ROOT%{_prefix}
86 cd $FAKE_ROOT%{_prefix}
87 install %{SOURCE3} .config
88 %{__make} headers
89 cd -
90
91 cp -f /usr/share/automake/config.* .
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         --with-sysroot=$FAKE_ROOT \
102         --infodir=%{_infodir} \
103         --mandir=%{_mandir} \
104         --bindir=%{_bindir} \
105         --libdir=%{_libdir} \
106         --libexecdir=%{_libdir} \
107         --disable-shared \
108         --disable-threads \
109         --enable-languages="c,c++" \
110         --enable-c99 \
111         --enable-long-long \
112         --with-gnu-as \
113         --with-gnu-ld \
114         --with-system-zlib \
115         --with-multilib \
116         --with-sysroot=$FAKE_ROOT \
117         --without-x \
118         --target=%{target} \
119         --host=%{_target_platform} \
120         --build=%{_target_platform}
121
122 %{__make} all-gcc
123
124 %install
125 rm -rf $RPM_BUILD_ROOT
126
127 %{__make} -C obj-%{target} install-gcc \
128         DESTDIR=$RPM_BUILD_ROOT
129
130 install obj-%{target}/gcc/specs $RPM_BUILD_ROOT%{gcclib}
131
132 # don't want this here
133 rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
134
135 # include/ contains install-tools/include/* and headers that were fixed up
136 # by fixincludes, we don't want former
137 gccdir=$(echo $RPM_BUILD_ROOT%{_libdir}/gcc/*/*/)
138 mkdir   $gccdir/tmp
139 # we have to save these however
140 #{?with_java:mv -f $gccdir/include/{gcj,libffi/ffitarget.h} $gccdir/tmp}
141 mv -f   $gccdir/include/syslimits.h $gccdir/tmp
142 rm -rf  $gccdir/include
143 mv -f   $gccdir/tmp $gccdir/include
144 cp -f   $gccdir/install-tools/include/*.h $gccdir/include
145 # but we don't want anything more from install-tools
146 rm -rf  $gccdir/install-tools
147
148 %if 0%{!?debug:1}
149 %{target}-strip -g $RPM_BUILD_ROOT%{gcclib}/libgcc.a
150 %{target}-strip -g $RPM_BUILD_ROOT%{gcclib}/libgcov.a
151 %endif
152
153 %clean
154 rm -rf $RPM_BUILD_ROOT
155
156 %files
157 %defattr(644,root,root,755)
158 %attr(755,root,root) %{_bindir}/%{target}-cpp
159 %attr(755,root,root) %{_bindir}/%{target}-gcc
160 %dir %{gccarch}
161 %dir %{gcclib}
162 %{?with_eabi:%dir %{gcclib}/thumb}
163 %attr(755,root,root) %{gcclib}/cc1
164 %attr(755,root,root) %{gcclib}/collect2
165 %{gcclib}/crt*.o
166 %{gcclib}/libgcc.a
167 %if %{with eabi}
168 %{gcclib}/thumb/crt*.o
169 %{gcclib}/thumb/libgcc.a
170 %endif
171 %{gcclib}/specs*
172 %dir %{gcclib}/include
173 %{gcclib}/include/*.h
174 %{_mandir}/man1/%{target}-cpp.1*
175 %{_mandir}/man1/%{target}-gcc.1*
176
177 %files c++
178 %defattr(644,root,root,755)
179 %attr(755,root,root) %{_bindir}/%{target}-g++
180 %attr(755,root,root) %{gcclib}/cc1plus
181 %{_mandir}/man1/%{target}-g++.1*
This page took 0.174562 seconds and 4 git commands to generate.