问题
I have gcc-4.6 & gcc-4.7 both installed on my machine and I made gcc the default compiler. But still I could see 4.6 under "cat /proc/version" but I want 4.7 in place of 4.6.
cat /proc/version
Linux version 3.2.0-4-rt-686-pae (debian-kernel@lists.debian.org) (gcc version 4.6.3 (Debian 4.6.3-14) ) #1 SMP PREEMPT RT Debian 3.2.65-1+deb7u2
How can I change gcc version here from 4.6 to 4.7 ?
Any help would be really helpfull for me.
Many Thanks.
回答1:
As the same problem is mentioned here https://askubuntu.com/questions/193539/having-2-versions-of-gcc I suggest you to check the solution.
回答2:
This is because you have both versions installed,and 4.6 being treated as the default. The easiest way make gcc-4.7 the default gcc is to move the symlink of /usr/bin/gcc:
sudo rm /usr/bin/gcc
sudo ln -s /usr/bin/gcc-4.7 /usr/bin/gcc
Reference link here
回答3:
Is there any way to use a module in 3.2 which is compiled with kernel 3.10 ?
You can try the option -f
of modprobe
.
来源:https://stackoverflow.com/questions/29144241/how-to-change-gcc-version-linux