]> git.pld-linux.org Git - packages/crossarm-gcc.git/blob - crossarm-gcc.spec
- updated to 4.0.0 (ublibc BR needed for eabi target).
[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 Release:        1%{?with_eabi:eabi}
18 Epoch:          1
19 License:        GPL
20 Group:          Development/Languages
21 Source0:        ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{version}/gcc-%{version}.tar.bz2
22 # Source0-md5:  99f114330f152939f0d9586010da176f
23 %define         _llh_ver        2.6.11.2
24 Source1:        http://ep09.pld-linux.org/~mmazur/linux-libc-headers/linux-libc-headers-%{_llh_ver}.tar.bz2
25 # Source1-md5:  2d21d8e7ff641da74272b114c786464e
26 %define         _uclibc_ver     0.9.27
27 Source2:        http://uclibc.org/downloads/uClibc-%{_uclibc_ver}.tar.bz2
28 # Source2-md5:  6250bd6524283bd8e7bc976d43a46ec0
29 Source3:        crossarm-embedded-uclibc.config
30 Patch0:         gcc-pr20973.patch
31 Patch1:         gcc-pr21173.patch
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:  kernel-module-build
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-%{version} -a1 -a2
79 %patch0 -p1
80 %patch1 -p1
81
82 %build
83 FAKE_ROOT=$PWD/fake-root
84 rm -rf $FAKE_ROOT
85
86 install -d $FAKE_ROOT%{_prefix}
87 cp -r uClibc-%{_uclibc_ver}/* $FAKE_ROOT%{_prefix}
88 cd $FAKE_ROOT%{_prefix}
89 install %{SOURCE3} .config
90 %{__make} headers
91 cd -
92
93 cp -f /usr/share/automake/config.* .
94 rm -rf obj-%{target}
95 install -d obj-%{target}
96 cd obj-%{target}
97
98 CFLAGS="%{rpmcflags}" \
99 CXXFLAGS="%{rpmcxxflags}" \
100 TEXCONFIG=false \
101 ../configure \
102         --prefix=%{_prefix} \
103         --infodir=%{_infodir} \
104         --mandir=%{_mandir} \
105         --bindir=%{_bindir} \
106         --libdir=%{_libdir} \
107         --libexecdir=%{_libdir} \
108         --disable-shared \
109         --disable-threads \
110         --enable-languages="c,c++" \
111         --enable-c99 \
112         --enable-long-long \
113         --disable-nls \
114         --with-gnu-as \
115         --with-gnu-ld \
116         --with-demangler-in-ld \
117         --with-system-zlib \
118         --disable-multilib \
119         --with-sysroot=$FAKE_ROOT \
120         --without-x \
121         --target=%{target} \
122         --host=%{_target_platform} \
123         --build=%{_target_platform}
124
125 %{__make} all-gcc
126
127 %install
128 rm -rf $RPM_BUILD_ROOT
129
130 %{__make} -C obj-%{target} install-gcc \
131         DESTDIR=$RPM_BUILD_ROOT
132
133 install obj-%{target}/gcc/specs $RPM_BUILD_ROOT%{gcclib}
134
135 # don't want this here
136 rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
137
138 # include/ contains install-tools/include/* and headers that were fixed up
139 # by fixincludes, we don't want former
140 gccdir=$(echo $RPM_BUILD_ROOT%{_libdir}/gcc/*/*/)
141 mkdir   $gccdir/tmp
142 # we have to save these however
143 #{?with_java:mv -f $gccdir/include/{gcj,libffi/ffitarget.h} $gccdir/tmp}
144 mv -f   $gccdir/include/syslimits.h $gccdir/tmp
145 rm -rf  $gccdir/include
146 mv -f   $gccdir/tmp $gccdir/include
147 cp -f   $gccdir/install-tools/include/*.h $gccdir/include
148 # but we don't want anything more from install-tools
149 rm -rf  $gccdir/install-tools
150
151 %if 0%{!?debug:1}
152 %{target}-strip -g $RPM_BUILD_ROOT%{gcclib}/libgcc.a
153 %{target}-strip -g $RPM_BUILD_ROOT%{gcclib}/libgcov.a
154 %endif
155
156 %clean
157 rm -rf $RPM_BUILD_ROOT
158
159 %files
160 %defattr(644,root,root,755)
161 %attr(755,root,root) %{_bindir}/%{target}-cpp
162 %attr(755,root,root) %{_bindir}/%{target}-gcc
163 %dir %{gccarch}
164 %dir %{gcclib}
165 %{?with_eabi:%dir %{gcclib}/thumb}
166 %attr(755,root,root) %{gcclib}/cc1
167 %attr(755,root,root) %{gcclib}/collect2
168 %{gcclib}/crt*.o
169 %{gcclib}/libgcc.a
170 %if %{with eabi}
171 %{gcclib}/thumb/crt*.o
172 %{gcclib}/thumb/libgcc.a
173 %endif
174 %{gcclib}/specs*
175 %dir %{gcclib}/include
176 %{gcclib}/include/*.h
177 %{_mandir}/man1/%{target}-cpp.1*
178 %{_mandir}/man1/%{target}-gcc.1*
179
180 %files c++
181 %defattr(644,root,root,755)
182 %attr(755,root,root) %{_bindir}/%{target}-g++
183 %attr(755,root,root) %{gcclib}/cc1plus
184 %{_mandir}/man1/%{target}-g++.1*
This page took 0.076417 seconds and 3 git commands to generate.