]> git.pld-linux.org Git - packages/crossarm-gcc.git/blob - crossarm-gcc.spec
- strip with -R.note -R.comment.
[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 Version:        4.0.1
16 %define         _snap   20050507
17 Release:        0.%{_snap}.1
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:        ftp://gcc.gnu.org/pub/gcc/snapshots/4.0-%{_snap}/gcc-4.0-%{_snap}.tar.bz2
23 # Source0-md5:  701f385de867d117f3648165174b254a
24 %define         _llh_ver        2.6.11.2
25 Source1:        http://ep09.pld-linux.org/~mmazur/linux-libc-headers/linux-libc-headers-%{_llh_ver}.tar.bz2
26 # Source1-md5:  2d21d8e7ff641da74272b114c786464e
27 %define         _uclibc_ver     0.9.27
28 Source2:        http://uclibc.org/downloads/uClibc-%{_uclibc_ver}.tar.bz2
29 # Source2-md5:  6250bd6524283bd8e7bc976d43a46ec0
30 Source3:        crossarm-embedded-uclibc.config
31 URL:            http://gcc.gnu.org/
32 BuildRequires:  autoconf
33 BuildRequires:  automake
34 BuildRequires:  bison
35 BuildRequires:  crossarm-binutils%{?with_eabi:(eabi)}
36 BuildRequires:  flex
37 BuildRequires:  kernel-module-build
38 Requires:       crossarm-binutils%{?with_eabi:(eabi)}
39 Requires:       gcc-dirs
40 ExcludeArch:    arm
41 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
42
43 %define         target          arm-linux%{?with_eabi:-eabi}
44 %define         arch            %{_prefix}/%{target}
45 %define         gccarch         %{_libdir}/gcc/%{target}
46 %define         gcclib          %{gccarch}/%{version}
47
48 %define         _noautostrip    .*/libgc.*\\.a
49
50 %description
51 This package contains a cross-gcc which allows the creation of
52 binaries to be run on ARM linux (architecture arm-linux) on
53 other machines.
54
55 %description -l de
56 Dieses Paket enthält einen Cross-gcc, der es erlaubt, auf einem
57 anderem Rechner Code für arm-Linux zu generieren.
58
59 %description -l pl
60 Ten pakiet zawiera skro¶ny gcc pozwalaj±cy na robienie na innych
61 maszynach binariów do uruchamiania na ARM (architektura
62 arm-linux).
63
64 %package c++
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}
69
70 %description c++
71 This package adds C++ support to the GNU Compiler Collection for ARM.
72
73 %description c++ -l pl
74 Ten pakiet dodaje obs³ugê C++ do kompilatora gcc dla ARM.
75
76 %prep
77 #setup -q -n gcc-%{version} -a1 -a2
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="%{rpmcxxflags}" \
98 TEXCONFIG=false \
99 ../configure \
100         --prefix=%{_prefix} \
101         --infodir=%{_infodir} \
102         --mandir=%{_mandir} \
103         --bindir=%{_bindir} \
104         --libdir=%{_libdir} \
105         --libexecdir=%{_libdir} \
106         --disable-shared \
107         --disable-threads \
108         --enable-languages="c,c++" \
109         --enable-c99 \
110         --enable-long-long \
111         --disable-nls \
112         --with-gnu-as \
113         --with-gnu-ld \
114         --with-demangler-in-ld \
115         --with-system-zlib \
116         --enable-multilib \
117         --with-sysroot=$FAKE_ROOT \
118         --without-x \
119         --target=%{target} \
120         --host=%{_target_platform} \
121         --build=%{_target_platform}
122
123 %{__make} all-gcc
124
125 %install
126 rm -rf $RPM_BUILD_ROOT
127
128 %{__make} -C obj-%{target} install-gcc \
129         DESTDIR=$RPM_BUILD_ROOT
130
131 install obj-%{target}/gcc/specs $RPM_BUILD_ROOT%{gcclib}
132
133 # don't want this here
134 rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
135
136 # include/ contains install-tools/include/* and headers that were fixed up
137 # by fixincludes, we don't want former
138 gccdir=$(echo $RPM_BUILD_ROOT%{_libdir}/gcc/*/*/)
139 mkdir   $gccdir/tmp
140 # we have to save these however
141 #{?with_java:mv -f $gccdir/include/{gcj,libffi/ffitarget.h} $gccdir/tmp}
142 mv -f   $gccdir/include/syslimits.h $gccdir/tmp
143 rm -rf  $gccdir/include
144 mv -f   $gccdir/tmp $gccdir/include
145 cp -f   $gccdir/install-tools/include/*.h $gccdir/include
146 # but we don't want anything more from install-tools
147 rm -rf  $gccdir/install-tools
148
149 %if 0%{!?debug:1}
150 %{target}-strip -g -R.note -R.comment $RPM_BUILD_ROOT%{gcclib}/libgcc.a
151 %{target}-strip -g -R.note -R.comment $RPM_BUILD_ROOT%{gcclib}/libgcov.a
152 %endif
153
154 %clean
155 rm -rf $RPM_BUILD_ROOT
156
157 %files
158 %defattr(644,root,root,755)
159 %attr(755,root,root) %{_bindir}/%{target}-cpp
160 %attr(755,root,root) %{_bindir}/%{target}-gcc
161 %dir %{gccarch}
162 %dir %{gcclib}
163 %{?with_eabi:%dir %{gcclib}/thumb}
164 %attr(755,root,root) %{gcclib}/cc1
165 %attr(755,root,root) %{gcclib}/collect2
166 %{gcclib}/crt*.o
167 %{gcclib}/libgcc.a
168 %if %{with eabi}
169 %{gcclib}/thumb/crt*.o
170 %{gcclib}/thumb/libgcc.a
171 %endif
172 %{gcclib}/specs*
173 %dir %{gcclib}/include
174 %{gcclib}/include/*.h
175 %{_mandir}/man1/%{target}-cpp.1*
176 %{_mandir}/man1/%{target}-gcc.1*
177
178 %files c++
179 %defattr(644,root,root,755)
180 %attr(755,root,root) %{_bindir}/%{target}-g++
181 %attr(755,root,root) %{gcclib}/cc1plus
182 %{_mandir}/man1/%{target}-g++.1*
This page took 0.08588 seconds and 3 git commands to generate.