]> git.pld-linux.org Git - packages/crossppc-gcc.git/blob - crossppc-gcc.spec
- fixes
[packages/crossppc-gcc.git] / crossppc-gcc.spec
1
2 %define         major_ver       4.4
3 %define         minor_ver       0
4
5 Summary:        Cross PPC GNU binary utility development utilities - gcc
6 Summary(es.UTF-8):      Utilitarios para desarrollo de binarios de la GNU - PPC gcc
7 Summary(fr.UTF-8):      Utilitaires de développement binaire de GNU - PPC gcc
8 Summary(pl.UTF-8):      Skrośne narzędzia programistyczne GNU dla PPC - gcc
9 Summary(pt_BR.UTF-8):   Utilitários para desenvolvimento de binários da GNU - PPC gcc
10 Summary(tr.UTF-8):      GNU geliştirme araçları - PPC gcc
11 Name:           crossppc-gcc
12 Version:        %{major_ver}.%{minor_ver}
13 Release:        0.1
14 Epoch:          1
15 License:        GPL v3+
16 Group:          Development/Languages
17 Source0:        ftp://gcc.gnu.org/pub/gcc/releases/gcc-%{version}/gcc-%{version}.tar.bz2
18 # Source0-md5:  cf5d787bee57f38168b74d65a7c0e6fd
19 Source1:        gcc-optimize-la.pl
20 #Patch100:      gcc-branch.diff
21 # svn diff svn://gcc.gnu.org/svn/gcc/branches/gcc-4_3-branch@145062 svn://gcc.gnu.org/svn/gcc/branches/ix86/gcc-4_3-branch > gcc-ix86-branch.diff
22 # The goal of this branch is to add support for newer ix86 processors such as AMD's Barcelona and Intel's Westmere to GCC 4.3.x.
23 Patch101:       gcc-ix86-branch.diff
24 Patch0:         gcc-info.patch
25 Patch1:         gcc-nolocalefiles.patch
26 Patch2:         gcc-nodebug.patch
27 Patch3:         gcc-ada-link.patch
28 Patch4:         gcc-sparc64-ada_fix.patch
29 Patch5:         gcc-pr14912.patch
30 Patch6:         gcc-ppc64-m32-m64-multilib-only.patch
31 Patch7:         gcc-libjava-multilib.patch
32 Patch8:         gcc-enable-java-awt-qt.patch
33 Patch9:         gcc-hash-style-gnu.patch
34 Patch10:        gcc-moresparcs.patch
35 Patch11:        gcc-build-id.patch
36 URL:            http://gcc.gnu.org/
37 BuildRequires:  autoconf
38 BuildRequires:  automake
39 BuildRequires:  bison
40 BuildRequires:  crossppc-binutils
41 BuildRequires:  fileutils >= 4.0.41
42 BuildRequires:  flex
43 BuildRequires:  gmp-devel >= 4.1
44 BuildRequires:  mpfr-devel >= 2.3.0
45 BuildRequires:  rpmbuild(macros) >= 1.211
46 BuildRequires:  texinfo >= 4.1
47 Requires:       crossppc-binutils
48 Requires:       gcc-dirs
49 ExcludeArch:    ppc
50 BuildRoot:      %{tmpdir}/%{name}-%{version}-root-%(id -u -n)
51
52 %define         target          ppc-pld-linux
53 %define         arch            %{_prefix}/%{target}
54 %define         gccarch         %{_libdir}/gcc/%{target}
55 %define         gcclib          %{gccarch}/%{version}
56 %define         _slibdir        /%{_lib}
57
58 %define         filterout       -fwrapv -fno-strict-aliasing -fsigned-char
59 %define         filterout_ld    -Wl,--as-needed
60
61 # used for crtbegin.o / crtend.o
62 %if 0%{?debug:1}
63 %define         target_cflags   %{debugcflags}
64 %else
65 %define         target_cflags   -O2%{!?nospecflags:%{?specflags: %{specflags}}%{?specflags_ppc: %{specflags_ppc}}}
66 %endif
67
68 %define         _noautostrip    .*/libgc.*\\.a
69
70 %description
71 This package contains a cross-gcc which allows the creation of
72 binaries to be run on PPC Linux on other machines.
73
74 %description -l de.UTF-8
75 Dieses Paket enthält einen Cross-gcc, der es erlaubt, auf einem
76 anderem Rechner Code für PPC Linux zu generieren.
77
78 %description -l pl.UTF-8
79 Ten pakiet zawiera skrośny gcc pozwalający na robienie na innych
80 maszynach binariów do uruchamiania na Linuksie PPC.
81
82 %package c++
83 Summary:        C++ support for crossppc-gcc
84 Summary(pl.UTF-8):      Obsługa C++ dla crossppc-gcc
85 Group:          Development/Languages
86 Requires:       %{name} = %{epoch}:%{version}-%{release}
87
88 %description c++
89 This package adds C++ support to the GNU Compiler Collection for PPC.
90
91 %description c++ -l pl.UTF-8
92 Ten pakiet dodaje obsługę C++ do kompilatora gcc dla PPC.
93
94 %prep
95 %setup -q -n gcc-%{version}
96 #patch100 -p0
97 %patch101 -p0
98 %patch0 -p1
99 %patch1 -p1
100 %patch2 -p1
101 %patch3 -p1
102 %patch5 -p1
103 %patch4 -p1
104 %patch6 -p1
105 %patch7 -p0
106 %if %{with qt}
107 %patch8 -p1
108 %endif
109 %patch9 -p1
110 #patch10 -p1
111 %patch11 -p0
112
113 mv ChangeLog ChangeLog.general
114
115 # override snapshot version.
116 echo %{version} > gcc/BASE-VER
117 echo "release" > gcc/DEV-PHASE
118
119 %build
120 cd gcc
121 #{__autoconf}
122 cd ..
123 cp -f /usr/share/automake/config.sub .
124
125 rm -rf builddir && install -d builddir && cd builddir
126
127 CC="%{__cc}" \
128 CFLAGS="%{rpmcflags}" \
129 CXXFLAGS="%{rpmcxxflags}" \
130 CFLAGS_FOR_TARGET="%{target_cflags}" \
131 TEXCONFIG=false \
132 ../configure \
133         --prefix=%{_prefix} \
134         --with-local-prefix=%{_prefix}/local \
135         --libdir=%{_libdir} \
136         --libexecdir=%{_libdir} \
137         --infodir=%{_infodir} \
138         --mandir=%{_mandir} \
139         --bindir=%{_bindir} \
140         --disable-shared \
141         --disable-threads \
142         --without-headers \
143         --enable-languages="c,c++" \
144         --disable-libgomp \
145         --enable-c99 \
146         --enable-long-long \
147         --disable-multilib \
148         --disable-nls \
149         --disable-werror \
150         --with-gnu-as \
151         --with-gnu-ld \
152         --with-demangler-in-ld \
153         --with-system-zlib \
154         --with-slibdir=%{_slibdir} \
155         --without-x \
156         --with-long-double-128 \
157         --enable-secureplt \
158         --with-gxx-include-dir=%{_includedir}/c++/%{version} \
159         --disable-libstdcxx-pch \
160         --enable-__cxa_atexit \
161         --enable-libstdcxx-allocator=new \
162         --with-pkgversion="PLD-Linux" \
163         --with-bugurl="http://bugs.pld-linux.org" \
164         --target=%{target} \
165         --host=%{_target_platform} \
166         --build=%{_target_platform}
167
168 cd ..
169
170 %{__make} -C builddir all-gcc \
171         LDFLAGS_FOR_TARGET="%{rpmldflags}"
172
173 %install
174 rm -rf $RPM_BUILD_ROOT
175
176 %{__make} -C builddir install-gcc \
177         DESTDIR=$RPM_BUILD_ROOT
178
179 install builddir/gcc/specs $RPM_BUILD_ROOT%{gcclib}
180
181 gccdir=$RPM_BUILD_ROOT%{gcclib}
182 cp $gccdir/install-tools/include/*.h $gccdir/include
183 cp $gccdir/include-fixed/syslimits.h $gccdir/include
184 rm -rf $gccdir/install-tools
185 rm -rf $gccdir/include-fixed
186
187 #%if 0%{!?debug:1}
188 #%{target}-strip -g -R.note -R.comment $RPM_BUILD_ROOT%{gcclib}/libgcc.a
189 #%{target}-strip -g -R.note -R.comment $RPM_BUILD_ROOT%{gcclib}/libgcov.a
190 #%endif
191
192 %clean
193 rm -rf $RPM_BUILD_ROOT
194
195 %files
196 %defattr(644,root,root,755)
197 %attr(755,root,root) %{_bindir}/%{target}-cpp
198 %attr(755,root,root) %{_bindir}/%{target}-gcc
199 %attr(755,root,root) %{_bindir}/%{target}-gccbug
200 %attr(755,root,root) %{_bindir}/%{target}-gcov
201 %dir %{gccarch}
202 %dir %{gcclib}
203 %attr(755,root,root) %{gcclib}/cc1
204 %attr(755,root,root) %{gcclib}/collect2
205 #%{gcclib}/*crt*.o
206 #%{gcclib}/libgcc.a
207 %{gcclib}/specs
208 %dir %{gcclib}/include
209 %{gcclib}/include/*.h
210 %{_mandir}/man1/%{target}-cpp.1*
211 %{_mandir}/man1/%{target}-gcc.1*
212 %{_mandir}/man1/%{target}-gcov.1*
213
214 %files c++
215 %defattr(644,root,root,755)
216 %attr(755,root,root) %{_bindir}/%{target}-g++
217 %attr(755,root,root) %{gcclib}/cc1plus
218 %{_mandir}/man1/%{target}-g++.1*
This page took 0.30118 seconds and 3 git commands to generate.