# HG changeset patch # User Michael Schloh von Bennewitz # Date 1301081314 -3600 # Node ID aee811db821a90e8a0e4fdbe709135553be3edc2 # Parent 02bcb113e03918893996525429390d82f786517c Back out ineffective correction and reformat AS/LD detection logic. Additionally, explicitly link libm when using libmpc to avoid errors. diff -r 02bcb113e039 -r aee811db821a gcc/gcc.spec --- a/gcc/gcc.spec Fri Mar 25 20:09:41 2011 +0100 +++ b/gcc/gcc.spec Fri Mar 25 20:28:34 2011 +0100 @@ -60,7 +60,7 @@ # build information Prefix: %{l_prefix} BuildRoot: %{l_buildroot} -BuildPreReq: OpenPKG, openpkg >= 20060823, make +BuildPreReq: OpenPKG, openpkg >= 20060823, make, libtool PreReq: OpenPKG, openpkg >= 20060823 %if "%{with_binutils}" == "yes" BuildPreReq: binutils >= 2.14 @@ -109,6 +109,9 @@ %endif %patch -p0 %{l_shtool} subst -v -s \ + -e 's;\(gmplibs="-lmpc\) \(-lmpfr -lgmp\);\1 -lm \2;' \ + configure + %{l_shtool} subst -v -s \ -e 's;PREFIX_INCLUDE_DIR;PREFIX_INCLUDE_DIR_DISABLED;g' \ gcc/configure if [ ".%{V_comp}" != . ]; then @@ -134,36 +137,18 @@ cd obj # solve strange compatability problems - case "%{l_platform -t}" in - *-sunos* ) -%if "%{with_binutils}" == "no" - ( echo "Building GCC on Solaris OS requires GNU as, however" - echo "the OS native linker will be used in place of GNU ld." - echo "" - echo "To solve this problem, install the binutils package" - echo "and build GCC again using the option 'with_binutils'." - echo "OpenPKG will ignore GNU ld but use GNU as to build GCC." - echo "" - echo "Please note that this condition applies to OpenPKG" - echo "building of the GCC package on Solaris only!" - ) | %{l_rpmtool} msg -b -t warn - exit 1; - ;; +%if "%{with_binutils}" == "yes" + # determine ld(1) and as(1) usage, allowing either + # one to be from the GNU distribution of binutils + LD=%{l_tool_locate ld ld} + AS=%{l_tool_locate as as} %else - # locate ld(1) and as(1), using the GNU assembler - # but ignoring the presence of any OpenPKG linker - LD=`PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/ccs/bin:/opt/bin:/opt/sbin \ - which ld` - ;; + # locate ld(1) and as(1), using the GNU assembler + # but ignoring the presence of any OpenPKG linker + LD=`PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/ccs/bin:/opt/bin:/opt/sbin which ld` + AS=`PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/ccs/bin:/opt/bin:/opt/sbin which as` %endif - *-* ) - # determine ld(1) and as(1) usage, allowing either - # one to be from the GNU distribution of binutils - LD=%{l_tool_locate ld ld} - ;; - esac l_with_gnu_ld_as="" - AS=%{l_tool_locate as as} echo $LD | grep '^/' >/dev/null && l_with_gnu_ld_as="--with-ld=$LD" echo $AS | grep '^/' >/dev/null && l_with_gnu_ld_as="${l_with_gnu_ld_as} --with-as=$AS" $LD --version /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"