]> git.pld-linux.org Git - packages/crossppc-gcc.git/blob - crossppc-gcc.spec
- more
[packages/crossppc-gcc.git] / crossppc-gcc.spec
1 Summary:        Cross PPC GNU binary utility development utilities - gcc
2 Summary(es):    Utilitarios para desarrollo de binarios de la GNU - PPC gcc
3 Summary(fr):    Utilitaires de développement binaire de GNU - PPC gcc
4 Summary(pl):    Skro¶ne narzêdzia programistyczne GNU dla PPC - gcc
5 Summary(pt_BR): Utilitários para desenvolvimento de binários da GNU - PPC gcc
6 Summary(tr):    GNU geliþtirme araçlarý - PPC gcc
7 Name:           crossppc-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:  crossppc-binutils
29 BuildRequires:  fileutils >= 4.0.41
30 BuildRequires:  flex
31 BuildRequires:  texinfo >= 4.1
32 Requires:       crossppc-binutils
33 Requires:       gcc-dirs
34 ExcludeArch:    ppc
35 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
36
37 %define         target          ppc-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 PPC 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 PPC 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 PPC.
55
56 %package c++
57 Summary:        C++ support for crossppc-gcc
58 Summary(pl):    Obs³uga C++ dla crossppc-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 PPC.
64
65 %description c++ -l pl
66 Ten pakiet dodaje obs³ugê C++ do kompilatora gcc dla PPC.
67
68 %prep
69 %setup -q -n gcc-%{version} -a1 -a2 -a3
70 mv linuxthreads* glibc-%{_glibc_ver}
71 %patch0 -p1
72
73 %build
74 FAKE_ROOT=$PWD/fake-root
75
76 rm -rf $FAKE_ROOT && install -d $FAKE_ROOT/usr/include
77 cp -r linux-libc-headers-%{_llh_ver}/include/{asm-ppc,linux} $FAKE_ROOT/usr/include
78 ln -s asm-ppc $FAKE_ROOT/usr/include/asm
79
80 cd glibc-%{_glibc_ver}
81 cp -f /usr/share/automake/config.* scripts
82 rm -rf builddir && install -d builddir && cd builddir
83 ../configure \
84         --prefix=$FAKE_ROOT/usr \
85         --build=%{_target_platform} \
86         --host=%{target} \
87         --disable-nls \
88         --enable-add-ons=linuxthreads \
89         --with-headers=$FAKE_ROOT/usr/include \
90         --disable-sanity-checks \
91         --enable-hacker-mode
92
93 %{__make} sysdeps/gnu/errlist.c
94 %{__make} install-headers
95
96 install bits/stdio_lim.h $FAKE_ROOT/usr/include/bits
97 touch $FAKE_ROOT/usr/include/gnu/stubs.h
98 cd ../..
99
100 cp -f /usr/share/automake/config.* .
101 rm -rf obj-%{target}
102 install -d obj-%{target}
103 cd obj-%{target}
104
105 CFLAGS="%{rpmcflags}" \
106 CXXFLAGS="%{rpmcflags}" \
107 TEXCONFIG=false \
108 ../configure \
109         --prefix=%{_prefix} \
110         --infodir=%{_infodir} \
111         --mandir=%{_mandir} \
112         --bindir=%{_bindir} \
113         --libdir=%{_libdir} \
114         --libexecdir=%{_libdir} \
115         --disable-shared \
116         --disable-threads \
117         --enable-languages="c,c++" \
118         --enable-c99 \
119         --enable-long-long \
120         --disable-nls \
121         --with-gnu-as \
122         --with-gnu-ld \
123         --with-demangler-in-ld \
124         --with-system-zlib \
125         --disable-multilib \
126         --with-sysroot=$FAKE_ROOT \
127         --without-x \
128         --target=%{target} \
129         --host=%{_target_platform} \
130         --build=%{_target_platform}
131
132 %{__make} all-gcc
133
134 %install
135 rm -rf $RPM_BUILD_ROOT
136
137 %{__make} -C obj-%{target} install-gcc \
138         DESTDIR=$RPM_BUILD_ROOT
139
140 install obj-%{target}/gcc/specs $RPM_BUILD_ROOT%{gcclib}
141
142 # don't want this here
143 rm -f $RPM_BUILD_ROOT%{_libdir}/libiberty.a
144
145 # include/ contains install-tools/include/* and headers that were fixed up
146 # by fixincludes, we don't want former
147 gccdir=$RPM_BUILD_ROOT%{gcclib}
148 mkdir   $gccdir/tmp
149 # we have to save these however
150 mv -f   $gccdir/include/syslimits.h $gccdir/tmp
151 rm -rf  $gccdir/include
152 mv -f   $gccdir/tmp $gccdir/include
153 cp -f   $gccdir/install-tools/include/*.h $gccdir/include
154 # but we don't want anything more from install-tools
155 rm -rf  $gccdir/install-tools
156
157 %if 0%{!?debug:1}
158 %{target}-strip -g -R.note -R.comment $RPM_BUILD_ROOT%{gcclib}/libgcc.a
159 %{target}-strip -g -R.note -R.comment $RPM_BUILD_ROOT%{gcclib}/libgcov.a
160 %endif
161
162 %clean
163 rm -rf $RPM_BUILD_ROOT
164
165 %files
166 %defattr(644,root,root,755)
167 %attr(755,root,root) %{_bindir}/%{target}-gcc
168 %attr(755,root,root) %{_bindir}/%{target}-cpp
169 %dir %{gccarch}
170 %dir %{gcclib}
171 %attr(755,root,root) %{gcclib}/cc1
172 %attr(755,root,root) %{gcclib}/collect2
173 %{gcclib}/*crt*.o
174 %{gcclib}/libgcc.a
175 %{gcclib}/specs*
176 %dir %{gcclib}/include
177 %{gcclib}/include/*.h
178 %{_mandir}/man1/%{target}-cpp.1*
179 %{_mandir}/man1/%{target}-gcc.1*
180
181 %files c++
182 %defattr(644,root,root,755)
183 %attr(755,root,root) %{_bindir}/%{target}-g++
184 %attr(755,root,root) %{gcclib}/cc1plus
185 %{_mandir}/man1/%{target}-g++.1*
This page took 0.046911 seconds and 3 git commands to generate.