日韩性视频-久久久蜜桃-www中文字幕-在线中文字幕av-亚洲欧美一区二区三区四区-撸久久-香蕉视频一区-久久无码精品丰满人妻-国产高潮av-激情福利社-日韩av网址大全-国产精品久久999-日本五十路在线-性欧美在线-久久99精品波多结衣一区-男女午夜免费视频-黑人极品ⅴideos精品欧美棵-人人妻人人澡人人爽精品欧美一区-日韩一区在线看-欧美a级在线免费观看

歡迎訪問 生活随笔!

生活随笔

當前位置: 首頁 > 运维知识 > Ubuntu >内容正文

Ubuntu

Ubuntu 12.04 安装设置gcc4.4

發布時間:2023/11/29 Ubuntu 64 豆豆
生活随笔 收集整理的這篇文章主要介紹了 Ubuntu 12.04 安装设置gcc4.4 小編覺得挺不錯的,現在分享給大家,幫大家做個參考.

在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-pkgversion='Ubuntu/Linaro 4.4.6-11ubuntu2' --with-bugurl=file:///usr/share/doc/gcc-4.4/README.Bugs --enable-languages=c,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-threads=posix --with-gxx-include-dir=/usr/include/c++/4.4 --libdir=/usr/lib --enable-nls --with-sysroot=/ --enable-clocale=gnu --enable-libstdcxx-debug --enable-objc-gc --disable-werror --with-arch-32=i686 --with-tune=generic --enable-checking=release --build=x86_64-linux-gnu --host=x86_64-linux-gnu --target=x86_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

總結

以上是生活随笔為你收集整理的Ubuntu 12.04 安装设置gcc4.4的全部內容,希望文章能夠幫你解決所遇到的問題。

如果覺得生活随笔網站內容還不錯,歡迎將生活随笔推薦給好友。