Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 125805 - gcc-config support for multiple entries in GCC_SPECS
Summary: gcc-config support for multiple entries in GCC_SPECS
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: [OLD] Core system (show other bugs)
Hardware: All Linux
: High normal (vote)
Assignee: Gentoo Toolchain Maintainers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2006-03-11 02:38 UTC by Kevin F. Quinn (RETIRED)
Modified: 2007-03-05 22:15 UTC (History)
1 user (show)

See Also:
Package list:
Runtime testing required: ---


Attachments
Check colon-separated entries in GCC_SPECS (gcc-config-multispecs.diff,1.61 KB, patch)
2006-03-11 03:14 UTC, Kevin F. Quinn (RETIRED)
Details | Diff
fail if file is missing on all paths, only check this compiler's ld paths, issue warning if one or more files are missing (gcc-config.diff,1.45 KB, patch)
2006-12-09 04:02 UTC, Kevin F. Quinn (RETIRED)
Details | Diff

Note You need to log in before you can comment on or make changes to this bug.
Description Kevin F. Quinn (RETIRED) gentoo-dev 2006-03-11 02:38:19 UTC
We've added support for multiple entries in GCC_SPECS, separated by ":".  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.
Comment 1 Kevin F. Quinn (RETIRED) gentoo-dev 2006-03-11 03:14:00 UTC
Created attachment 81904 [details, diff]
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 "nopie.specs:ssp.specs:nonow.specs").
Comment 2 SpanKY gentoo-dev 2006-03-11 03:23:01 UTC
looks sane enough ... i'll touchup syntax and commit it
Comment 3 Kevin F. Quinn (RETIRED) gentoo-dev 2006-06-13 12:18:22 UTC
SpanKY - if you let me know what syntax bits you don't like, I'll update the patch.
Comment 4 SpanKY gentoo-dev 2006-12-08 23:37:06 UTC
ive added 1.3.15 with support for multiple entries ... please give it a spin before i move it into ~arch
Comment 5 Kevin F. Quinn (RETIRED) gentoo-dev 2006-12-09 04:02:03 UTC
Created attachment 103677 [details, diff]
fail if file is missing on all paths, only check this compiler'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} ]] && ret=1 && break 2
                        done
                fi
        done

fails if there's more than one path - the file only has to exist on one of the paths, not all of them.  That'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's libdir(s), so the files_exist check should only be looking there.

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

I'm not quite up to speed with the workings and effects of multilib; I notice that the LDPATH for the compiler also includes a '32' subdirectory, which is not in the compiler library search path - under what situations is this subdirectory used?
Comment 6 Kevin F. Quinn (RETIRED) gentoo-dev 2006-12-09 04:05:05 UTC
Another way to find the compiler library search paths is to do:

gcc -print-search-dirs | awk '$1=="libraries:" {print $2} | sed -e 's/^=/'

which is where it will actually search for specs files.  Perhaps the output of this would be better than the MY_LDPATH stuff.
Comment 7 SpanKY gentoo-dev 2006-12-09 19:47:54 UTC
no ... you cant assume gcc is executable
Comment 8 SpanKY gentoo-dev 2006-12-16 11:36:54 UTC
ok, ive fixed up cvs again, see if you're good with that

i didnt realize the logic you were going for because there were no comments ;P
Comment 9 Kevin F. Quinn (RETIRED) gentoo-dev 2007-02-21 13:55:29 UTC
hmm; I should have got back to you ages ago - 1.3.15 is fine.
Comment 10 SpanKY gentoo-dev 2007-03-05 22:15:26 UTC
ok, moved into ~arch