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