gcc/gcc.spec

changeset 406
cd6aad0e0d4e
parent 339
c9103fdfdf0d
child 407
633675dc493c
equal deleted inserted replaced
9:a60fd5877c0a 10:dd1589a14614
20 ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 20 ## OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
21 ## SUCH DAMAGE. 21 ## SUCH DAMAGE.
22 ## 22 ##
23 23
24 # package version 24 # package version
25 %define V_full 4.6.0 25 %define V_full 4.6.2
26 %define V_comp %nil 26 %define V_comp %nil
27 27
28 # package information 28 # package information
29 Name: gcc 29 Name: gcc
30 Summary: GNU Compiler Collection 30 Summary: GNU Compiler Collection
34 Distribution: OpenPKG Community 34 Distribution: OpenPKG Community
35 Class: CORE 35 Class: CORE
36 Group: Compiler 36 Group: Compiler
37 License: GPL 37 License: GPL
38 Version: %{V_full} 38 Version: %{V_full}
39 Release: 20110400 39 Release: 20120208
40 40
41 # package options 41 # package options
42 %option with_binutils yes 42 %option with_binutils yes
43 %option with_cxx yes 43 %option with_cxx yes
44 %option with_objc no 44 %option with_objc no
142 %{l_shtool} subst \ 142 %{l_shtool} subst \
143 -e 's;\(default_python_dir\) *=.*;\1=/share/gcc/python/libjava;' \ 143 -e 's;\(default_python_dir\) *=.*;\1=/share/gcc/python/libjava;' \
144 libjava/configure 144 libjava/configure
145 %{l_shtool} subst \ 145 %{l_shtool} subst \
146 -e 's;JAR *= *@JAR@;JAR = $(here)/scripts/jar;' \ 146 -e 's;JAR *= *@JAR@;JAR = $(here)/scripts/jar;' \
147 -e 's;\(jardir *= *\$(datadir)\)/java;\1/gcc/java;' \
148 libjava/Makefile.in 147 libjava/Makefile.in
149 %endif 148 %endif
150 if [ ".%{V_comp}" != . ]; then 149 if [ ".%{V_comp}" != . ]; then
151 %{l_shtool} subst -v -s \ 150 %{l_shtool} subst -v -s \
152 -e 's;(libdir)/gcc/;(libdir)/gcc%{V_comp}/;' \ 151 -e 's;(libdir)/gcc/;(libdir)/gcc%{V_comp}/;' \
169 libstdc++-v3/include/ext/codecvt_specializations.h 168 libstdc++-v3/include/ext/codecvt_specializations.h
170 %{l_shtool} subst \ 169 %{l_shtool} subst \
171 -e 's;.*with_arch_32=\${with_arch_32:-pentium4}.*;;' \ 170 -e 's;.*with_arch_32=\${with_arch_32:-pentium4}.*;;' \
172 -e 's;with_arch_32=\${with_arch_32:-pentiumpro};arch_without_sse2=yes;' \ 171 -e 's;with_arch_32=\${with_arch_32:-pentiumpro};arch_without_sse2=yes;' \
173 gcc/config.gcc 172 gcc/config.gcc
173 #-e 's;\(with_arch_32=\${with_arch_32:-\)pentium4};\1pentium3};' \
174
175 %if "%{with_cxx}" == "yes"
176 # sad hack to correct split gettext in libc and libintl each
177 # providing locale-intl.cc disparate libintl.h with externs,
178 # see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11074
179 [ -f %{l_prefix}/include/libintl.h -a -f /usr/include/libintl.h ] && \
180 cp /usr/include/libintl.h libstdc++-v3/libsupc++/ || \
181 [ -f /usr/include/libintl.h ] || \
182 ( echo "A system native gettext installation is not detected. Because GCC"
183 echo "C++ components require gettext problems may arise. These problems"
184 echo "can appear at build time causing the build to stop with errors"
185 echo "containing the words NLS, intl, or locale, or at run time should"
186 echo "undefined external symbols libintl_* in libstdc++.a interfere with"
187 echo "building other C++ sources."
188 echo ""
189 echo "To solve such problems, contact the GCC package maintainer and inform"
190 echo "of the location of libintl.h header on the system in question."
191 ) | %{l_rpmtool} msg -b -t warn
192 %endif
174 193
175 %build 194 %build
176 # create build subdirectory 195 # create build subdirectory
177 %{l_shtool} mkdir -p objbld 196 %{l_shtool} mkdir -p objbld
178 cd objbld 197 cd objbld
235 LDFLAGS="%{l_ldflags}" \ 254 LDFLAGS="%{l_ldflags}" \
236 %endif 255 %endif
237 CONFIG_SHELL="%{l_bash}" \ 256 CONFIG_SHELL="%{l_bash}" \
238 GREP="%{l_bash}" \ 257 GREP="%{l_bash}" \
239 ../configure \ 258 ../configure \
259 --cache-file=./config.cache \
240 --with-bugurl="http://openpkg.org/" \ 260 --with-bugurl="http://openpkg.org/" \
241 --with-pkgversion="%{l_openpkg_release -F "OpenPKG-%%t"}" \ 261 --with-pkgversion="%{l_openpkg_release -F "OpenPKG-%%t"}" \
242 --cache-file=./config.cache \
243 --srcdir=`pwd`/.. \ 262 --srcdir=`pwd`/.. \
244 --prefix=%{l_prefix} \ 263 --prefix=%{l_prefix} \
245 --exec-prefix=%{l_prefix} \ 264 --exec-prefix=%{l_prefix} \
246 --mandir=%{l_prefix}/man \ 265 --mandir=%{l_prefix}/man \
247 --infodir=%{l_prefix}/info \ 266 --infodir=%{l_prefix}/info \
420 rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir 439 rm -f $RPM_BUILD_ROOT%{l_prefix}/info/dir
421 rm -rf $RPM_BUILD_ROOT%{l_prefix}/man/man7 >/dev/null 2>&1 || true 440 rm -rf $RPM_BUILD_ROOT%{l_prefix}/man/man7 >/dev/null 2>&1 || true
422 rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/*.la >/dev/null 2>&1 || true 441 rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/*.la >/dev/null 2>&1 || true
423 rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib64 >/dev/null 2>&1 || true 442 rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib64 >/dev/null 2>&1 || true
424 rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/*-gcc* >/dev/null 2>&1 || true 443 rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/*-gcc* >/dev/null 2>&1 || true
425 rmdir $RPM_BUILD_ROOT%{l_prefix}/include/gcc* >/dev/null 2>&1 || true
426 %if "%{with_cxx}" == "yes" 444 %if "%{with_cxx}" == "yes"
427 rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/*-c++ >/dev/null 2>&1 || true 445 rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/*-c++ >/dev/null 2>&1 || true
428 rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/*-g++ >/dev/null 2>&1 || true 446 rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/*-g++ >/dev/null 2>&1 || true
429 %endif
430 %if "%{with_java}" == "yes"
431 rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/*-gcj >/dev/null 2>&1 || true
432 %endif
433 %if "%{with_fortran}" == "yes"
434 rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/*-gfortran >/dev/null 2>&1 || true
435 %endif 447 %endif
436 strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true 448 strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true
437 for prog in cc1 cc1plus collect2 cpp; do 449 for prog in cc1 cc1plus collect2 cpp; do
438 strip $RPM_BUILD_ROOT%{l_prefix}/lib/gcc%{V_comp}/${triple}/[0-9]*/${prog} \ 450 strip $RPM_BUILD_ROOT%{l_prefix}/lib/gcc%{V_comp}/${triple}/[0-9]*/${prog} \
439 >/dev/null 2>&1 || true 451 >/dev/null 2>&1 || true

mercurial