You are not logged in.
Pages: 1
Hi everyone,
I am trying to build a Yocto based distro on my archlinux. Unfortunately, I got a recipe that won't build using GCC 6, so I installed GCC 5.
I have already done it on a Kubuntu, using update-alternatives to change the default GCC and G++ versions, but i can't do it on arch. I tried to export CC and CXX, but it does not work.
Is there a clean way to change the default compiler (by clean I mean not replacing the binary or symlinking in /usr/bin) ?
Last edited by maximusk (2017-05-04 08:16:24)
Offline
Exactly. Except I'm not trying to compile a specific program, but a whole Yocto image. And this is the problem, because I can't just edit a makefile, or use gcc-5 on command line.
Offline
I'd try creating a directory with a collection of links to the gcc5 programs, then would try to add this to the front of $PATH while building the stuff that needs gcc5.
You get a list of the programs in the gcc5 package like this:
pacman -Qlq gcc5 | grep -E "usr/bin/.+"This here should print a bunch of "ln -s" command lines where the "-5" gets chopped off from the names for the links:
for x in $(pacman -Qlq gcc5 | grep -E 'usr/bin/.+'); do y="${x##*/}"; y="${y%-5}"; echo ln -s "/$x" "$y"; doneLast edited by Ropid (2017-05-03 18:44:02)
Offline
I tried it, but it's not working. Bitbake and make still use /usr/bin/gcc which is GCC 6.
EDIT : My bad, I didn't check correctly, it uses GCC 5... but the build it still failing.
Last edited by maximusk (2017-05-04 08:07:38)
Offline
Finally managed to fix it. The problem was because the thing i'm trying to build is an old version and it is not compatible with the recent glibc versions (some macros were moved). I found a patch to fix it.
Offline
Pages: 1