View previous topic :: View next topic |
Author |
Message |
crowbert Tux's lil' helper
Joined: 28 Apr 2003 Posts: 140
|
Posted: Sun Feb 08, 2015 12:51 am Post subject: Specify alternate gcc version for specific packages?[SOLVED] |
|
|
I've switched to gcc 4.9, but I found that a few specific packages don't compile or work correctly with it. What I would like to do is keep the system default to 4.9, but specify that those particular packages are to be compiled with 4.8.
My thought was to use /etc/portage/package.env to specify different values for CC and CXX, but that doesn't seem to be working. I'm not sure if I'm just doing it wrong, or if invoking a different version of GCC is more complicated than just specifying the full version instead of just 'gcc'.
I would think the same technique should work for selecting icc or another compiler on a per-package basis. Has anyone gotten this working?
Last edited by crowbert on Sun Feb 08, 2015 3:13 am; edited 1 time in total |
|
Back to top |
|
|
krinn Watchman
Joined: 02 May 2003 Posts: 7470
|
Posted: Sun Feb 08, 2015 2:48 am Post subject: |
|
|
It get gcc by path, so switching PATH in the packge env file should be enough no?
Code: | gcc --version
gcc (Gentoo 4.7.4 p1.0, pie-0.5.5) 4.7.4
Copyright © 2012 Free Software Foundation, Inc.
Ce logiciel est libre; voir les sources pour les conditions de copie. Il n'y a PAS
GARANTIE; ni implicite pour le MARCHANDAGE ou pour un BUT PARTICULIER.
PATH="/usr/i686-pc-linux-gnu/gcc-bin/4.4.3" gcc --version
gcc (Gentoo 4.4.3-r3 p1.4, pie-0.4.5) 4.4.3
Copyright © 2010 Free Software Foundation, Inc.
Ce logiciel est libre; voir les sources pour les conditions de copie. Il n'y a PAS
GARANTIE; ni implicite pour le MARCHANDAGE ou pour un BUT PARTICULIER.
|
|
|
Back to top |
|
|
crowbert Tux's lil' helper
Joined: 28 Apr 2003 Posts: 140
|
Posted: Sun Feb 08, 2015 3:12 am Post subject: |
|
|
Ahh. Setting the path should work, but I found that just setting CC and CXX works, too.
My problem was that I had the wrong syntax in the package.env file, so it wasn't loading my variables. |
|
Back to top |
|
|
crowbert Tux's lil' helper
Joined: 28 Apr 2003 Posts: 140
|
Posted: Sun Feb 08, 2015 5:39 pm Post subject: |
|
|
One more follow-up. It seems to depend a bit on the ebuild.
For media-tv/mythtv, I set CC and CXX (last I checked, it wouldn't build with gcc 4.9).
For www-client/chromium, it needs BUILD_CC and BUILD_CXX, at least with an older ebuild (I'm stuck on version 34 due to a pointer focus bug that makes newer versions unusable with my window manager).
Anyway, I've achieved what I need to ensure that I won't accidentally compile the packages in question with the wrong gcc. |
|
Back to top |
|
|
|