]> git.pld-linux.org Git - packages/crossppc64-gcc.git/blob - crossppc64-gcc.spec
- updated to 4.0.1-20050609.
[packages/crossppc64-gcc.git] / crossppc64-gcc.spec
1 Summary:        Cross PPC64 GNU binary utility development utilities - gcc
2 Summary(es):    Utilitarios para desarrollo de binarios de la GNU - PPC64 gcc
3 Summary(fr):    Utilitaires de développement binaire de GNU - PPC64 gcc
4 Summary(pl):    Skro¶ne narzêdzia programistyczne GNU dla PPC64 - gcc
5 Summary(pt_BR): Utilitários para desenvolvimento de binários da GNU - PPC64 gcc
6 Summary(tr):    GNU geliþtirme araçlarý - PPC64 gcc
7 Name:           crossppc64-gcc
8 Version:        4.0.1
9 %define         _snap   20050609
10 Release:        0.%{_snap}.1
11 Epoch:          1
12 License:        GPL
13 Group:          Development/Languages
14 #Source0:       ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{version}/gcc-%{version}.tar.bz2
15 Source0:        ftp://gcc.gnu.org/pub/gcc/snapshots/4.0-%{_snap}/gcc-4.0-%{_snap}.tar.bz2
16 # Source0-md5:  3ba660302e1c4c09c878dcab822c9e3c
17 %define         _llh_ver        2.6.11.2
18 Source1:        http://ep09.pld-linux.org/~mmazur/linux-libc-headers/linux-libc-headers-%{_llh_ver}.tar.bz2
19 # Source1-md5:  2d21d8e7ff641da74272b114c786464e
20 %define         _glibc_ver      2.3.5
21 Source2:        ftp://sources.redhat.com/pub/glibc/releases/glibc-%{_glibc_ver}.tar.bz2
22 # Source2-md5:  93d9c51850e0513aa4846ac0ddcef639
23 Source3:        ftp://sources.redhat.com/pub/glibc/releases/glibc-linuxthreads-%{_glibc_ver}.tar.bz2
24 # Source3-md5:  77011b0898393c56b799bc011a0f37bf
25 Patch0:         %{name}-libc-sysdeps-configure.patch
26 URL:            http://gcc.gnu.org/
27 BuildRequires:  autoconf
28 BuildRequires:  automake
29 BuildRequires:  bison
30 BuildRequires:  crossppc64-binutils
31 BuildRequires:  fileutils >= 4.0.41
32 BuildRequires:  flex
33 BuildRequires:  texinfo >= 4.1
34 Requires:       crossppc64-binutils
35 Requires:       gcc-dirs
36 ExcludeArch:    ppc64
37 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
38
39 %define         target          ppc64-pld-linux
40 %define         arch            %{_prefix}/%{target}
41 %define         gccarch         %{_libdir}/gcc/%{target}
42 %define         gcclib          %{gccarch}/%{version}
43
44 %define         _noautostrip    .*/libgc.*\\.a
45
46 %description
47 This package contains a cross-gcc which allows the creation of
48 binaries to be run on PPC64 Linux on other machines.
49
50 %description -l de
51 Dieses Paket enthält einen Cross-gcc, der es erlaubt, auf einem
52 anderem Rechner Code für PPC64 Linux zu generieren.
53
54 %description -l pl
55 Ten pakiet zawiera skro¶ny gcc pozwalaj±cy na robienie na innych
56 maszynach binariów do uruchamiania na Linuksie PPC64.
57
58 %package c++
59 Summary:        C++ support for crossppc64-gcc
60 Summary(pl):    Obs³uga C++ dla crossppc64-gcc
61 Group:          Development/Languages
62 Requires:       %{name} = %{epoch}:%{version}-%{release}
63
64 %description c++
65 This package adds C++ support to the GNU Compiler Collection for
66 PPC64.
67
68 %description c++ -l pl
69 Ten pakiet dodaje obs³ugê C++ do kompilatora gcc dla PPC64.
70
71 %prep
72 #setup -q -n gcc-%{version} -a1 -a2 -a3
73 %setup -q -n gcc-4.0-%{_snap} -a1 -a2 -a3
74 mv linuxthreads* glibc-%{_glibc_ver}
75 %patch0 -p1
76
77 %build
78 FAKE_ROOT=$PWD/fake-root
79
80 rm -rf $FAKE_ROOT && install -d $FAKE_ROOT%{_includedir}
81 cp -r linux-libc-headers-%{_llh_ver}/include/{asm-ppc64,linux} $FAKE_ROOT%{_includedir}
82 ln -s asm-ppc64 $FAKE_ROOT%{_includedir}/asm
83
84 cd glibc-%{_glibc_ver}
85 cp -f /usr/share/automake/config.* scripts
86 rm -rf builddir && install -d builddir && cd builddir
87 ../configure \
88 --prefix=$FAKE_ROOT%{_prefix} \
89         --build=%{_target_platform} \
90         --host=%{target} \
91         --disable-nls \
92         --enable-add-ons=linuxthreads \
93         --with-headers=$FAKE_ROOT%{_includedir} \
94         --disable-sanity-checks \
95         --enable-hacker-mode
96
97 %{__make} sysdeps/gnu/errlist.c
98 %{__make} install-headers
99
100 install bits/stdio_lim.h $FAKE_ROOT%{_includedir}/bits
101 touch $FAKE_ROOT%{_includedir}/gnu/stubs.h
102 cd ../..
103
104 cp -f /usr/share/automake/config.* .
105 rm -rf obj-%{target}
106 install -d obj-%{target}
107 cd obj-%{target}
108
109 CFLAGS="%{rpmcflags}" \
110 CXXFLAGS="%{rpmcflags}" \
111 TEXCONFIG=false \
112 ../configure \
113         --prefix=%{_prefix} \
114         --infodir=%{_infodir} \
115         --mandir=%{_mandir} \
116         --bindir=%{_bindir} \
117         --libdir=%{_libdir} \
118         --libexecdir=%{_libdir} \
119         --disable-shared \
120         --disable-threads \
121         --enable-languages="c,c++" \
122         --enable-c99 \
123         --enable-long-long \
124         --disable-nls \
125         --with-gnu-as \
126         --with-gnu-ld \
127         --with-demangler-in-ld \
128         --with-system-zlib \
129         --enable-multilib \
130         --with-sysroot=$FAKE_ROOT \
131         --without-x \
132         --target=%{target} \
133         --host=%{_target_platform} \
134         --build=%{_target_platform}
135
136 %{__make} all-gcc
137
138 %install
139 rm -rf $RPM_BUILD_ROOT
140
141 %{__make} -C obj-%{target} install-gcc \
142         DESTDIR=$RPM_BUILD_ROOT
143
144 install obj-%{target}/gcc/specs $RPM_BUILD_ROOT%{gcclib}
145
146 # don't want this here
147 rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
148
149 # include/ contains install-tools/include/* and headers that were fixed up
150 # by fixincludes, we don't want former
151 gccdir=$RPM_BUILD_ROOT%{gcclib}
152 mkdir   $gccdir/tmp
153 # we have to save these however
154 mv -f   $gccdir/include/syslimits.h $gccdir/tmp
155 rm -rf  $gccdir/include
156 mv -f   $gccdir/tmp $gccdir/include
157 cp -f   $gccdir/install-tools/include/*.h $gccdir/include
158 # but we don't want anything more from install-tools
159 rm -rf  $gccdir/install-tools
160
161 %if 0%{!?debug:1}
162 %{target}-strip -g -R.note -R.comment $RPM_BUILD_ROOT%{gcclib}/libgcc.a
163 %{target}-strip -g -R.note -R.comment $RPM_BUILD_ROOT%{gcclib}/libgcov.a
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 %dir %{gccarch}
174 %dir %{gcclib}
175 %attr(755,root,root) %{gcclib}/cc1
176 %attr(755,root,root) %{gcclib}/collect2
177 %dir %{gcclib}/32
178 %{gcclib}/32/crt*.o
179 %{gcclib}/32/libgcc.a
180 %{gcclib}/crt*.o
181 %{gcclib}/libgcc.a
182 %{gcclib}/specs*
183 %dir %{gcclib}/include
184 %{gcclib}/include/*.h
185 %{_mandir}/man1/%{target}-cpp.1*
186 %{_mandir}/man1/%{target}-gcc.1*
187
188 %files c++
189 %defattr(644,root,root,755)
190 %attr(755,root,root) %{_bindir}/%{target}-g++
191 %attr(755,root,root) %{gcclib}/cc1plus
192 %{_mandir}/man1/%{target}-g++.1*
This page took 0.253034 seconds and 4 git commands to generate.