Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 256759 - sys-devel/crossdev-wrappers for non-canonical specification of platform
Summary: sys-devel/crossdev-wrappers for non-canonical specification of platform
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All All
: Lowest enhancement (vote)
Assignee: solar (RETIRED)
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2009-01-29 08:51 UTC by Jan Postránský
Modified: 2010-02-09 00:42 UTC (History)
1 user (show)

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


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Jan Postránský 2009-01-29 08:51:27 UTC
With the following patch the `emerge-wrapper --init' works correctly for non-canonicaly named cross-compilers (like mingw32-4.2.4 in my case).


35c35
<       chosts=$(gcc-config -l | awk '{print $2}'| grep -- -| cut -d '-' -f 1-4| sort -u)
---
>       chosts=$(gcc-config -l | awk '{print $2}'| grep -- -| sed --expression="s/-[0-9.]*//g"| sort -u)
Comment 1 solar (RETIRED) gentoo-dev 2009-01-30 02:24:04 UTC
(In reply to comment #0)
> With the following patch the `emerge-wrapper --init' works correctly for
> non-canonicaly named cross-compilers (like mingw32-4.2.4 in my case).
> 
> 
> 35c35
> <       chosts=$(gcc-config -l | awk '{print $2}'| grep -- -| cut -d '-' -f
> 1-4| sort -u)
> ---
> >       chosts=$(gcc-config -l | awk '{print $2}'| grep -- -| sed --expression="s/-[0-9.]*//g"| sort -u)
> 

-------------------

It does not work for standard cross compilers.


wizdev ~ # gcc-config -l | awk '{print $2}'| grep -- -| cut -d '-' -f 1-4| sort -u 
armv4tl-softfloat-linux-gnueabi
armv5te-softfloat-linux-gnueabi
armv6j-softfloat-linux-gnueabi
armv7a-softfloat-linux-gnueabi
powerpc-pc-linux-uclibc
x86_64-pc-linux-gnu
x86_64-pc-linux-uclibc
wizdev ~ # gcc-config -l | awk '{print $2}'| grep -- -| sed --expression="s/-[0-9.]*//g"| sort -u
armv4tlsoftfloatlinuxgnueabi
armv5tesoftfloatlinuxgnueabi
armv6jsoftfloatlinuxgnueabi
armv7asoftfloatlinuxgnueabi
powerpcpclinuxuclibc
x86_64pclinuxgnu
x86_64pclinuxgnuhardened
x86_64pclinuxgnuhardenednopie
x86_64pclinuxgnuhardenednopiessp
x86_64pclinuxgnuhardenednossp
x86_64pclinuxgnuvanilla
x86_64pclinuxuclibc
wizdev ~ # gcc-config -l
 [1] armv4tl-softfloat-linux-gnueabi-4.2.4 *

 [2] armv5te-softfloat-linux-gnueabi-4.2.4 *

 [3] armv6j-softfloat-linux-gnueabi-4.3.2 *

 [4] armv7a-softfloat-linux-gnueabi-4.3.2 *

 [5] powerpc-pc-linux-uclibc-4.1.2 *

 [6] x86_64-pc-linux-gnu-3.4.6
 [7] x86_64-pc-linux-gnu-3.4.6-hardened
 [8] x86_64-pc-linux-gnu-3.4.6-hardenednopie
 [9] x86_64-pc-linux-gnu-3.4.6-hardenednopiessp
 [10] x86_64-pc-linux-gnu-3.4.6-hardenednossp
 [11] x86_64-pc-linux-gnu-4.1.2
 [12] x86_64-pc-linux-gnu-4.3.2
 [13] x86_64-pc-linux-gnu-4.3.2-hardenednopie
 [14] x86_64-pc-linux-gnu-4.3.2-vanilla *
 [15] x86_64-pc-linux-uclibc-4.1.2 *
Comment 2 SpanKY gentoo-dev 2009-01-30 06:41:43 UTC
if all you want to do is safely extract the chosts from the gcc-config list, we can extend gcc-config.  after all, it already does exactly that (neither of those statements are correct).  look at chop_gcc_ver_spec() in the file.
Comment 3 Jan Postránský 2009-01-30 07:11:08 UTC
35c35
<       chosts=$(gcc-config -l | awk '{print $2}'| grep -- -| cut -d '-' -f 1-4| sort -u)
---
>       chosts=$(gcc-config -l | awk '{print $2}'| grep -- -| sed --expression="s/-[0-9][0-9.]*//g"| sort -u)


With the above fix it works for standard cross compilers, too.
Comment 4 solar (RETIRED) gentoo-dev 2009-01-30 14:24:35 UTC
(In reply to comment #2)
> if all you want to do is safely extract the chosts from the gcc-config list, we
> can extend gcc-config. 

That would probably be most ideal. However I've been avoiding doing bumps on the wrappers in anticipation of crossdev taking over most of what the wrappers do.
Any timeframe for when you want to do that?
Comment 5 solar (RETIRED) gentoo-dev 2010-02-09 00:42:10 UTC
crossdev-wrappers have been merged into crossdev.