1.1 --- a/gcc/gcc.spec Fri Mar 25 20:09:41 2011 +0100 1.2 +++ b/gcc/gcc.spec Fri Mar 25 20:28:34 2011 +0100 1.3 @@ -60,7 +60,7 @@ 1.4 # build information 1.5 Prefix: %{l_prefix} 1.6 BuildRoot: %{l_buildroot} 1.7 -BuildPreReq: OpenPKG, openpkg >= 20060823, make 1.8 +BuildPreReq: OpenPKG, openpkg >= 20060823, make, libtool 1.9 PreReq: OpenPKG, openpkg >= 20060823 1.10 %if "%{with_binutils}" == "yes" 1.11 BuildPreReq: binutils >= 2.14 1.12 @@ -109,6 +109,9 @@ 1.13 %endif 1.14 %patch -p0 1.15 %{l_shtool} subst -v -s \ 1.16 + -e 's;\(gmplibs="-lmpc\) \(-lmpfr -lgmp\);\1 -lm \2;' \ 1.17 + configure 1.18 + %{l_shtool} subst -v -s \ 1.19 -e 's;PREFIX_INCLUDE_DIR;PREFIX_INCLUDE_DIR_DISABLED;g' \ 1.20 gcc/configure 1.21 if [ ".%{V_comp}" != . ]; then 1.22 @@ -134,36 +137,18 @@ 1.23 cd obj 1.24 1.25 # solve strange compatability problems 1.26 - case "%{l_platform -t}" in 1.27 - *-sunos* ) 1.28 -%if "%{with_binutils}" == "no" 1.29 - ( echo "Building GCC on Solaris OS requires GNU as, however" 1.30 - echo "the OS native linker will be used in place of GNU ld." 1.31 - echo "" 1.32 - echo "To solve this problem, install the binutils package" 1.33 - echo "and build GCC again using the option 'with_binutils'." 1.34 - echo "OpenPKG will ignore GNU ld but use GNU as to build GCC." 1.35 - echo "" 1.36 - echo "Please note that this condition applies to OpenPKG" 1.37 - echo "building of the GCC package on Solaris only!" 1.38 - ) | %{l_rpmtool} msg -b -t warn 1.39 - exit 1; 1.40 - ;; 1.41 +%if "%{with_binutils}" == "yes" 1.42 + # determine ld(1) and as(1) usage, allowing either 1.43 + # one to be from the GNU distribution of binutils 1.44 + LD=%{l_tool_locate ld ld} 1.45 + AS=%{l_tool_locate as as} 1.46 %else 1.47 - # locate ld(1) and as(1), using the GNU assembler 1.48 - # but ignoring the presence of any OpenPKG linker 1.49 - LD=`PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/ccs/bin:/opt/bin:/opt/sbin \ 1.50 - which ld` 1.51 - ;; 1.52 + # locate ld(1) and as(1), using the GNU assembler 1.53 + # but ignoring the presence of any OpenPKG linker 1.54 + LD=`PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/ccs/bin:/opt/bin:/opt/sbin which ld` 1.55 + AS=`PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/ccs/bin:/opt/bin:/opt/sbin which as` 1.56 %endif 1.57 - *-* ) 1.58 - # determine ld(1) and as(1) usage, allowing either 1.59 - # one to be from the GNU distribution of binutils 1.60 - LD=%{l_tool_locate ld ld} 1.61 - ;; 1.62 - esac 1.63 l_with_gnu_ld_as="" 1.64 - AS=%{l_tool_locate as as} 1.65 echo $LD | grep '^/' >/dev/null && l_with_gnu_ld_as="--with-ld=$LD" 1.66 echo $AS | grep '^/' >/dev/null && l_with_gnu_ld_as="${l_with_gnu_ld_as} --with-as=$AS" 1.67 $LD --version </dev/null 2>/dev/null | grep "^GNU ld " >/dev/null && l_with_gnu_ld_as="${l_with_gnu_ld_as} --with-gnu-ld" || l_with_gnu_ld_as="${l_with_gnu_ld_as} --without-gnu-ld"