网站扫二维码怎么做,正在进入一站式服务平台,顺企网宁波网站建设,给我一个网站图片在Ubuntu 12.04中的默认的GCC版本是4.6。但是这个版本在编译android 4.0源码的时候会出差#xff0c;下面是安装和设置GCC4.4的方法。 下文来自网络#xff1a;http://mjanja.co.ke/2012/04/ubuntu-gcc-4-4-considered-harmful/ I’ve been having some problems with Ubuntu…在Ubuntu 12.04中的默认的GCC版本是4.6。但是这个版本在编译android 4.0源码的时候会出差下面是安装和设置GCC4.4的方法。 下文来自网络http://mjanja.co.ke/2012/04/ubuntu-gcc-4-4-considered-harmful/ I’ve been having some problems with Ubuntu 11.10′s default GCC (4.6.2) for some time now. First, I was having problems with self-kang CyanogenMod 9 builds on my Samsung Tab 7 Plus (specifically, adb wouldn’t work). Second, I couldn’t boot Linux kernel 3.3 on my Sandy Bridge Core i7-2600 build server. I didn’t know the problems were because of GCC until recently, but now that I’ve switched back to 4.4 both of those problems have gone away; I can only assume that something in Ubuntu’s GCC fork is broken. The solution: set GCC 4.4 as the default compiler. It’s pretty easy to do this in Debian-based distros using the alternatives system. Install GCC 4.4 First, install GCC 4.4 (and friends): apt-get install gcc-4.4 g-4.4 g-4.4-multilib gcc-4.4-multilib Set 4.4 to be the default Then set 4.4 to be higher priority than 4.6: update-alternatives --install /usr/bin/g g /usr/bin/g-4.4 100
update-alternatives --install /usr/bin/g g /usr/bin/g-4.6 50
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.4 100
update-alternatives --install /usr/bin/gcc gcc /usr/bin/gcc-4.6 50
update-alternatives --install /usr/bin/cpp cpp-bin /usr/bin/cpp-4.4 100
update-alternatives --install /usr/bin/cpp cpp-bin /usr/bin/cpp-4.6 50 Verify that it has worked: gcc -v
Using built-in specs.
Target: x86_64-linux-gnu
Configured with: ../src/configure -v --with-pkgversionUbuntu/Linaro 4.4.6-11ubuntu2 --with-bugurlfile:///usr/share/doc/gcc-4.4/README.Bugs --enable-languagesc,c,fortran,objc,obj-c --prefix/usr --program-suffix-4.4 --enable-shared --enable-linker-build-id --with-system-zlib --libexecdir/usr/lib --without-included-gettext --enable-threadsposix --with-gxx-include-dir/usr/include/c/4.4 --libdir/usr/lib --enable-nls --with-sysroot/ --enable-clocalegnu --enable-libstdcxx-debug --enable-objc-gc --disable-werror --with-arch-32i686 --with-tunegeneric --enable-checkingrelease --buildx86_64-linux-gnu --hostx86_64-linux-gnu --targetx86_64-linux-gnu
Thread model: posix
gcc version 4.4.6 (Ubuntu/Linaro 4.4.6-11ubuntu2) Done!转载于:https://www.cnblogs.com/tnxk/archive/2012/07/07/2580731.html