Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!

Bug 220149

Summary: sys-devel/gcc: include versioned compiler symlinks for cross-compilers
Product: Gentoo Linux Reporter: cJ <cJ-gentoo>
Component: EclassesAssignee: Gentoo Toolchain Maintainers <toolchain>
Status: RESOLVED FIXED    
Severity: enhancement    
Priority: High    
Version: unspecified   
Hardware: All   
OS: Linux   
Whiteboard:
Package list:
Runtime testing required: ---
Attachments: Fix cross toolchains: Do not create unprefixed compiler links

Description cJ 2008-05-03 19:53:35 UTC
I noticed that the symlinks /usr/bin/${CTARGET}-{gcc,g++}-version aren't present for gcc in the case of a cross-compilation toolchain (correct me if I'm wrong).

Having them would be good (couldn't hurt) !
Comment 1 Mark Loeser (RETIRED) gentoo-dev 2009-05-09 22:00:33 UTC
Mike: any reason why we should or shouldn't do this?  You are the one with the most cross-compilation experience :)
Comment 2 SpanKY gentoo-dev 2012-03-02 05:57:00 UTC
can't think of a reason to not do this

http://sources.gentoo.org/eclass/toolchain.eclass?r1=1.518&r2=1.519
Comment 3 Joe Breuer 2012-03-03 15:03:24 UTC
Apparently, the current fix for this bug breaks crossdev, see bug 406765.
Comment 4 Joe Breuer 2012-03-03 15:26:36 UTC
Staring at toolchain.eclass, it seems than the 'lower' versioned symlink (the one without ${CTARGET}) should be created only if ! is_crosscompiling, i.e. (near line 1487:

  if ! is_crosscompile ; then
    # only install non-cross compilers without target prefix
    dosym ${BINPATH}/${CTARGET}-${x} \
      /usr/bin/${x}-${GCC_CONFIG_VER}
  fi

This improved fix works correctly for me (sample size 1).
Comment 5 Joe Breuer 2012-03-03 15:27:45 UTC
Created attachment 304137 [details, diff]
Fix cross toolchains: Do not create unprefixed compiler links
Comment 6 Richard Cox 2012-03-03 17:15:56 UTC
(In reply to comment #5)
> Created attachment 304137 [details, diff] [details, diff]
> Fix cross toolchains: Do not create unprefixed compiler links

I have the same issue.  This fix works for me.