<?xml version="1.0" encoding="UTF-8" standalone="yes" ?>
<!DOCTYPE bugzilla SYSTEM "http://bugs.gentoo.org/bugzilla.dtd">

<bugzilla version="2.22.7"
          urlbase="http://bugs.gentoo.org/"
          maintainer="bugzilla@gentoo.org"
>

    <bug>
          <bug_id>125805</bug_id>
          
          <creation_ts>2006-03-11 02:38 0000</creation_ts>
          <short_desc>gcc-config support for multiple entries in GCC_SPECS</short_desc>
          <delta_ts>2007-03-05 22:15:26 0000</delta_ts>
          <reporter_accessible>1</reporter_accessible>
          <cclist_accessible>1</cclist_accessible>
          <classification_id>1</classification_id>
          <classification>Unclassified</classification>
          <product>Gentoo Linux</product>
          <component>Core system</component>
          <version>unspecified</version>
          <rep_platform>All</rep_platform>
          <op_sys>Linux</op_sys>
          <bug_status>RESOLVED</bug_status>
          <resolution>FIXED</resolution>
          
          
          
          <priority>P2</priority>
          <bug_severity>normal</bug_severity>
          <target_milestone>---</target_milestone>
          
          
          
          <everconfirmed>1</everconfirmed>
          <reporter>kevquinn@gentoo.org</reporter>
          <assigned_to>toolchain@gentoo.org</assigned_to>
          <cc>bug.hunter@gmx.net</cc>

      

      
          <long_desc isprivate="0">
            <who>kevquinn@gentoo.org</who>
            <bug_when>2006-03-11 02:38:19 0000</bug_when>
            <thetext>We&apos;ve added support for multiple entries in GCC_SPECS, separated by &quot;:&quot;.  gcc-config currently rejects multiple entries as it checks that ${GCC_SPECS} exists.

To follow - a patch to gcc-config-1.3.13 so that it checks colon-separated entries.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>kevquinn@gentoo.org</who>
            <bug_when>2006-03-11 03:14:00 0000</bug_when>
            <thetext>Created an attachment (id=81904)
Check colon-separated entries in GCC_SPECS

Simple enough, I think.  Checks that everything listed in GCC_SPECS exists either as a full path or relative to LDPATH (so that we can set things like &quot;nopie.specs:ssp.specs:nonow.specs&quot;).
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2006-03-11 03:23:01 0000</bug_when>
            <thetext>looks sane enough ... i&apos;ll touchup syntax and commit it</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>kevquinn@gentoo.org</who>
            <bug_when>2006-06-13 12:18:22 0000</bug_when>
            <thetext>SpanKY - if you let me know what syntax bits you don&apos;t like, I&apos;ll update the patch.</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2006-12-08 23:37:06 0000</bug_when>
            <thetext>ive added 1.3.15 with support for multiple entries ... please give it a spin before i move it into ~arch</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>kevquinn@gentoo.org</who>
            <bug_when>2006-12-09 04:02:03 0000</bug_when>
            <thetext>Created an attachment (id=103677)
fail if file is missing on all paths, only check this compiler&apos;s ld paths, issue warning if one or more files are missing

Thanks.  A few issues though.  This part:

        ret=0
        ...
                        for p in ${paths} ; do
                                [[ ! -f ${p}/${f} ]] &amp;&amp; ret=1 &amp;&amp; break 2
                        done
                fi
        done

fails if there&apos;s more than one path - the file only has to exist on one of the paths, not all of them.  That&apos;s why I had the logic there the other way around.

Multiple paths occur on multilib, but also when more than one compiler is installed.  I thought MY_LDPATH would contain just the paths for the selected compiler, which looking at the code is obviously not the case.   However specs files are searched for relative olny to the current compiler&apos;s libdir(s), so the files_exist check should only be looking there.

One more thing, is that if any of the files don&apos;t exist GCC_SPECS is silently set to &quot;&quot; - which is fine, but a warning would be useful in that case (since it implies the config file is out of date/wrong).

I&apos;m not quite up to speed with the workings and effects of multilib; I notice that the LDPATH for the compiler also includes a &apos;32&apos; subdirectory, which is not in the compiler library search path - under what situations is this subdirectory used?
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>kevquinn@gentoo.org</who>
            <bug_when>2006-12-09 04:05:05 0000</bug_when>
            <thetext>Another way to find the compiler library search paths is to do:

gcc -print-search-dirs | awk &apos;$1==&quot;libraries:&quot; {print $2} | sed -e &apos;s/^=/&apos;

which is where it will actually search for specs files.  Perhaps the output of this would be better than the MY_LDPATH stuff.
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2006-12-09 19:47:54 0000</bug_when>
            <thetext>no ... you cant assume gcc is executable</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2006-12-16 11:36:54 0000</bug_when>
            <thetext>ok, ive fixed up cvs again, see if you&apos;re good with that

i didnt realize the logic you were going for because there were no comments ;P</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>kevquinn@gentoo.org</who>
            <bug_when>2007-02-21 13:55:29 0000</bug_when>
            <thetext>hmm; I should have got back to you ages ago - 1.3.15 is fine.
</thetext>
          </long_desc>
          <long_desc isprivate="0">
            <who>vapier@gentoo.org</who>
            <bug_when>2007-03-05 22:15:26 0000</bug_when>
            <thetext>ok, moved into ~arch</thetext>
          </long_desc>
      
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>81904</attachid>
            <date>2006-03-11 03:14 0000</date>
            <desc>Check colon-separated entries in GCC_SPECS</desc>
            <filename>gcc-config-multispecs.diff</filename>
            <type>text/plain</type>
            <data encoding="base64">SW5kZXg6IGdjYy1jb25maWctMS4zLjEzCj09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09
PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT09PT0KUkNTIGZpbGU6IC92YXIvY3Zzcm9v
dC9nZW50b28teDg2L3N5cy1kZXZlbC9nY2MtY29uZmlnL2ZpbGVzL2djYy1jb25maWctMS4zLjEz
LHYKcmV0cmlldmluZyByZXZpc2lvbiAxLjMKZGlmZiAtdSAtYiAtQiAtcjEuMyBnY2MtY29uZmln
LTEuMy4xMwotLS0gZ2NjLWNvbmZpZy0xLjMuMTMJOCBKYW4gMjAwNiAwOTo1Mjo0NSAtMDAwMAkx
LjMKKysrIGdjYy1jb25maWctMS4zLjEzCTExIE1hciAyMDA2IDExOjA3OjMwIC0wMDAwCkBAIC02
MSw2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q0JJVFN8R0NDX1NQRUNTKT0vIHtwcmludCAkMH0nIFwKIAkJCSIke0dDQ19FTlZfRH0vJHtDQ19D
T01QfSIgPiAiJHtFTlZfRH0vMDVnY2MiCiAJCWVjaG8gIkxEUEFUSD1cIiR7TVlfTERQQVRIfVwi
IiA+PiAiJHtFTlZfRH0vMDVnY2MiCi0JCWlmIFtbIC1uICR7R0NDX1NQRUNTfSBdXSAmJiBbWyAt
ZSAke1JPT1R9LyR7R0NDX1NQRUNTfSBdXSA7IHRoZW4KKwkJIyBWZXJpZnkgYWxsIEdDQ19TUEVD
UyBmaWxlcyBleGlzdCBlaXRoZXIgYXMgZnVsbCBwYXRocyBvciByZWxhdGl2ZQorCQkjIHRvIGFu
IExEUEFUSCBlbnRyeQorCQlpZiBbWyAtbiAke0dDQ19TUEVDU30gXV0gJiYgZmlsZXNfZXhpc3Qg
JHtNWV9MRFBBVEh9ICR7R0NDX1NQRUNTfSA7IHRoZW4KIAkJCWVjaG8gIkdDQ19TUEVDUz1cIiR7
R0NDX1NQRUNTfVwiIiA+PiAiJHtFTlZfRH0vMDVnY2MiCiAJCWVsc2UKIAkJCSMgUGVvcGxlIG5l
ZWQgdG8gcmVidWlsZCB0aGVpciBnY2Mgb3Igc2V0dGluZyBHQ0NfU1BFQ1MgdG8K
</data>        

          </attachment>
          <attachment
              isobsolete="0"
              ispatch="1"
              isprivate="0"
          >
            <attachid>103677</attachid>
            <date>2006-12-09 04:02 0000</date>
            <desc>fail if file is missing on all paths, only check this compiler&apos;s ld paths, issue warning if one or more files are missing</desc>
            <filename>gcc-config.diff</filename>
            <type>text/plain</type>
            <data encoding="base64">LS0tIGdjYy1jb25maWctMS4zLjE1CTIwMDYtMTItMDkgMDg6MzM6MDkuMDAwMDAwMDAwICswMTAw
CisrKyAvdXNyL2Jpbi9nY2MtY29uZmlnCTIwMDYtMTItMDkgMTI6NDk6MTQuMDAwMDAwMDAwICsw
MTAwCkBAIC0xNjMsOSArMTYzLDExIEBACiAJCWl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