diff -r 375c04ff28ba -r cd6aad0e0d4e gcc/gcc.spec --- a/gcc/gcc.spec Sun Mar 18 18:45:29 2012 +0100 +++ b/gcc/gcc.spec Thu Mar 22 20:51:00 2012 +0100 @@ -22,7 +22,7 @@ ## # package version -%define V_full 4.6.0 +%define V_full 4.6.2 %define V_comp %nil # package information @@ -36,7 +36,7 @@ Group: Compiler License: GPL Version: %{V_full} -Release: 20110400 +Release: 20120208 # package options %option with_binutils yes @@ -144,7 +144,6 @@ libjava/configure %{l_shtool} subst \ -e 's;JAR *= *@JAR@;JAR = $(here)/scripts/jar;' \ - -e 's;\(jardir *= *\$(datadir)\)/java;\1/gcc/java;' \ libjava/Makefile.in %endif if [ ".%{V_comp}" != . ]; then @@ -171,6 +170,26 @@ -e 's;.*with_arch_32=\${with_arch_32:-pentium4}.*;;' \ -e 's;with_arch_32=\${with_arch_32:-pentiumpro};arch_without_sse2=yes;' \ gcc/config.gcc + #-e 's;\(with_arch_32=\${with_arch_32:-\)pentium4};\1pentium3};' \ + +%if "%{with_cxx}" == "yes" + # sad hack to correct split gettext in libc and libintl each + # providing locale-intl.cc disparate libintl.h with externs, + # see http://gcc.gnu.org/bugzilla/show_bug.cgi?id=11074 + [ -f %{l_prefix}/include/libintl.h -a -f /usr/include/libintl.h ] && \ + cp /usr/include/libintl.h libstdc++-v3/libsupc++/ || \ + [ -f /usr/include/libintl.h ] || \ + ( echo "A system native gettext installation is not detected. Because GCC" + echo "C++ components require gettext problems may arise. These problems" + echo "can appear at build time causing the build to stop with errors" + echo "containing the words NLS, intl, or locale, or at run time should" + echo "undefined external symbols libintl_* in libstdc++.a interfere with" + echo "building other C++ sources." + echo "" + echo "To solve such problems, contact the GCC package maintainer and inform" + echo "of the location of libintl.h header on the system in question." + ) | %{l_rpmtool} msg -b -t warn +%endif %build # create build subdirectory @@ -237,9 +256,9 @@ CONFIG_SHELL="%{l_bash}" \ GREP="%{l_bash}" \ ../configure \ + --cache-file=./config.cache \ --with-bugurl="http://openpkg.org/" \ --with-pkgversion="%{l_openpkg_release -F "OpenPKG-%%t"}" \ - --cache-file=./config.cache \ --srcdir=`pwd`/.. \ --prefix=%{l_prefix} \ --exec-prefix=%{l_prefix} \ @@ -422,17 +441,10 @@ rm -f $RPM_BUILD_ROOT%{l_prefix}/lib/*.la >/dev/null 2>&1 || true rm -rf $RPM_BUILD_ROOT%{l_prefix}/lib64 >/dev/null 2>&1 || true rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/*-gcc* >/dev/null 2>&1 || true - rmdir $RPM_BUILD_ROOT%{l_prefix}/include/gcc* >/dev/null 2>&1 || true %if "%{with_cxx}" == "yes" rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/*-c++ >/dev/null 2>&1 || true rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/*-g++ >/dev/null 2>&1 || true %endif -%if "%{with_java}" == "yes" - rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/*-gcj >/dev/null 2>&1 || true -%endif -%if "%{with_fortran}" == "yes" - rm -f $RPM_BUILD_ROOT%{l_prefix}/bin/*-gfortran >/dev/null 2>&1 || true -%endif strip $RPM_BUILD_ROOT%{l_prefix}/bin/* >/dev/null 2>&1 || true for prog in cc1 cc1plus collect2 cpp; do strip $RPM_BUILD_ROOT%{l_prefix}/lib/gcc%{V_comp}/${triple}/[0-9]*/${prog} \