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
7 %bcond_without eabi # build without Embedded ABI support
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
17 #define _snap 20050609
18 Release: 2%{?with_eabi:eabi}
21 Group: Development/Languages
22 Source0: ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{version}/gcc-%{version}.tar.bz2
23 # Source0-md5: 947416e825a877a0d69489be1be43be1
24 #Source0: ftp://gcc.gnu.org/pub/gcc/snapshots/4.0-%{_snap}/gcc-4.0-%{_snap}.tar.bz2
25 %define _llh_ver 2.6.11.2
26 Source1: http://ep09.pld-linux.org/~mmazur/linux-libc-headers/linux-libc-headers-%{_llh_ver}.tar.bz2
27 # Source1-md5: 2d21d8e7ff641da74272b114c786464e
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 Source4: crossarm-lpc210x-crt0.s
33 URL: http://gcc.gnu.org/
34 BuildRequires: autoconf
35 BuildRequires: automake
37 BuildRequires: crossarm-binutils%{?with_eabi:(eabi)}
39 BuildRequires: kernel-module-build
40 Requires: crossarm-binutils%{?with_eabi:(eabi)}
43 BuildRoot: %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
45 %define target arm-linux%{?with_eabi:-eabi}
46 %define arch %{_prefix}/%{target}
47 %define gccarch %{_libdir}/gcc/%{target}
48 %define gcclib %{gccarch}/%{version}
50 %define _noautostrip .*/libgc.*\\.a
53 This package contains a cross-gcc which allows the creation of
54 binaries to be run on ARM Linux on other machines.
57 Dieses Paket enthält einen Cross-gcc, der es erlaubt, auf einem
58 anderem Rechner Code für ARM Linux zu generieren.
61 Ten pakiet zawiera skro¶ny gcc pozwalaj±cy na robienie na innych
62 maszynach binariów do uruchamiania na Linuksie ARM.
65 Summary: C++ support for crossarm-gcc
66 Summary(pl): Obs³uga C++ dla crossarm-gcc
67 Group: Development/Languages
68 Requires: %{name} = %{epoch}:%{version}-%{release}
71 This package adds C++ support to the GNU Compiler Collection for ARM.
73 %description c++ -l pl
74 Ten pakiet dodaje obs³ugê C++ do kompilatora gcc dla ARM.
77 %setup -q -n gcc-%{version} -a1 -a2
78 #setup -q -n gcc-4.0-%{_snap} -a1 -a2
81 FAKE_ROOT=$PWD/fake-root
84 install -d $FAKE_ROOT%{_prefix}
85 cp -r uClibc-%{_uclibc_ver}/* $FAKE_ROOT%{_prefix}
86 cd $FAKE_ROOT%{_prefix}
87 install %{SOURCE3} .config
91 cp -f /usr/share/automake/config.* .
93 install -d obj-%{target}
96 CFLAGS="%{rpmcflags}" \
97 CXXFLAGS="%{rpmcxxflags}" \
100 --prefix=%{_prefix} \
101 --infodir=%{_infodir} \
102 --mandir=%{_mandir} \
103 --bindir=%{_bindir} \
104 --libdir=%{_libdir} \
105 --libexecdir=%{_libdir} \
108 --enable-languages="c,c++" \
114 --with-demangler-in-ld \
117 --with-sysroot=$FAKE_ROOT \
120 --host=%{_target_platform} \
121 --build=%{_target_platform}
126 rm -rf $RPM_BUILD_ROOT
127 install -d $RPM_BUILD_ROOT%{_usrsrc}/%{name}
129 %{__make} -C obj-%{target} install-gcc \
130 DESTDIR=$RPM_BUILD_ROOT
132 install obj-%{target}/gcc/specs $RPM_BUILD_ROOT%{gcclib}
134 # don't want this here
135 rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
137 # include/ contains install-tools/include/* and headers that were fixed up
138 # by fixincludes, we don't want former
139 gccdir=$(echo $RPM_BUILD_ROOT%{_libdir}/gcc/*/*/)
141 # we have to save these however
142 #{?with_java:mv -f $gccdir/include/{gcj,libffi/ffitarget.h} $gccdir/tmp}
143 mv -f $gccdir/include/syslimits.h $gccdir/tmp
144 rm -rf $gccdir/include
145 mv -f $gccdir/tmp $gccdir/include
146 cp -f $gccdir/install-tools/include/*.h $gccdir/include
147 # but we don't want anything more from install-tools
148 rm -rf $gccdir/install-tools
151 %{target}-strip -g -R.note -R.comment $RPM_BUILD_ROOT%{gcclib}/libgcc.a
152 %{target}-strip -g -R.note -R.comment $RPM_BUILD_ROOT%{gcclib}/libgcov.a
155 # custom startup file(s)
156 install %{SOURCE4} $RPM_BUILD_ROOT%{_usrsrc}/%{name}
157 %{target}-as -mcpu=arm7tdmi %{SOURCE4} -o $RPM_BUILD_ROOT%{gcclib}/lpc210x-crt0.o
160 rm -rf $RPM_BUILD_ROOT
163 %defattr(644,root,root,755)
164 %attr(755,root,root) %{_bindir}/%{target}-cpp
165 %attr(755,root,root) %{_bindir}/%{target}-gcc
168 %{?with_eabi:%dir %{gcclib}/thumb}
169 %attr(755,root,root) %{gcclib}/cc1
170 %attr(755,root,root) %{gcclib}/collect2
174 %{gcclib}/thumb/crt*.o
175 %{gcclib}/thumb/libgcc.a
178 %dir %{gcclib}/include
179 %{gcclib}/include/*.h
180 %{_mandir}/man1/%{target}-cpp.1*
181 %{_mandir}/man1/%{target}-gcc.1*
185 %defattr(644,root,root,755)
186 %attr(755,root,root) %{_bindir}/%{target}-g++
187 %attr(755,root,root) %{gcclib}/cc1plus
188 %{_mandir}/man1/%{target}-g++.1*