1.1 --- a/gcc/gcc.spec Sun Mar 18 18:45:29 2012 +0100 1.2 +++ b/gcc/gcc.spec Thu Mar 22 20:51:00 2012 +0100 1.3 @@ -22,7 +22,7 @@ 1.4 ## 1.5 1.6 # package version 1.7 -%define V_full 4.6.0 1.8 +%define V_full 4.6.2 1.9 %define V_comp %nil 1.10 1.11 # package information 1.12 @@ -36,7 +36,7 @@ 1.13 Group: Compiler 1.14 License: GPL 1.15 Version: %{V_full} 1.16 -Release: 20110400 1.17 +Release: 20120208 1.18 1.19 # package options 1.20 %option with_binutils yes 1.21 @@ -144,7 +144,6 @@ 1.22 libjava/configure 1.23 %{l_shtool} subst \ 1.24 -e 's;JAR *= *@JAR@;JAR = $(here)/scripts/jar;' \ 1.25 - -e 's;\(jardir *= *\$(datadir)\)/java;\1/gcc/java;' \ 1.26 libjava/Makefile.in 1.27 %endif 1.28 if [ ".%{V_comp}" != . ]; then 1.29 @@ -171,6 +170,26 @@ 1.30 -e 's;.*with_arch_32=\${with_arch_32:-pentium4}.*;;' \ 1.31 -e 's;with_arch_32=\${with_arch_32:-pentiumpro};arch_without_sse2=yes;' \ 1.32 gcc/config.gcc 1.33 + #-e 's;\(with_arch_32=\${with_arch_32:-\)pentium4};\1pentium3};' \ 1.34 + 1.35 +%if "%{with_cxx}" == "yes" 1.36 + # sad hack to correct split gettext in libc and libintl each 1.37 + # providing locale-intl.cc disparate libintl.h with externs, 1.38 + # see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11074 1.39 + [ -f %{l_prefix}/include/libintl.h -a -f /usr/include/libintl.h ] && \ 1.40 + cp /usr/include/libintl.h libstdc++-v3/libsupc++/ || \ 1.41 + [ -f /usr/include/libintl.h ] || \ 1.42 + ( echo "A system native gettext installation is not detected. Because GCC" 1.43 + echo "C++ components require gettext problems may arise. These problems" 1.44 + echo "can appear at build time causing the build to stop with errors" 1.45 + echo "containing the words NLS, intl, or locale, or at run time should" 1.46 + echo "undefined external symbols libintl_* in libstdc++.a interfere with" 1.47 + echo "building other C++ sources." 1.48 + echo "" 1.49 + echo "To solve such problems, contact the GCC package maintainer and inform" 1.50 + echo "of the location of libintl.h header on the system in question." 1.51 + ) | %{l_rpmtool} msg -b -t warn 1.52 +%endif 1.53 1.54 %build 1.55 # create build subdirectory 1.56 @@ -237,9 +256,9 @@ 1.57 CONFIG_SHELL="%{l_bash}" \ 1.58 GREP="%{l_bash}" \ 1.59 ../configure \ 1.60 + --cache-file=./config.cache \ 1.61 --with-bugurl="http://openpkg.org/" \ 1.62 --with-pkgversion="%{l_openpkg_release -F "OpenPKG-%%t"}" \ 1.63 - --cache-file=./config.cache \ 1.64 --srcdir=`pwd`/.. \ 1.65 --prefix=%{l_prefix} \ 1.66 --exec-prefix=%{l_prefix} \ 1.67 @@ -422,17 +441,10 @@ 1.68 rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/*.la >/dev/null 2>&1 || true 1.69 rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib64 >/dev/null 2>&1 || true 1.70 rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/*-gcc* >/dev/null 2>&1 || true 1.71 - rmdir $RPM_BUILD_ROOT%{l_prefix}/include/gcc* >/dev/null 2>&1 || true 1.72 %if "%{with_cxx}" == "yes" 1.73 rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/*-c++ >/dev/null 2>&1 || true 1.74 rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/*-g++ >/dev/null 2>&1 || true 1.75 %endif 1.76 -%if "%{with_java}" == "yes" 1.77 - rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/*-gcj >/dev/null 2>&1 || true 1.78 -%endif 1.79 -%if "%{with_fortran}" == "yes" 1.80 - rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/*-gfortran >/dev/null 2>&1 || true 1.81 -%endif 1.82 strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true 1.83 for prog in cc1 cc1plus collect2 cpp; do 1.84 strip $RPM_BUILD_ROOT%{l_prefix}/lib/gcc%{V_comp}/${triple}/[0-9]*/${prog} \