ubuntu 12.04 x64 build android source code
2012-08-06 00:00
429 查看
because android using gcc4.4 but ubuntu default using 4.7, so change the gcc to version 4.4.
Verify that it has worked:
Done!
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!
相关文章推荐
- ubuntu 12.04(gcc降级)编译android代码遇到"_FORTIFY_SOURCE"的解决方法
- Ubuntu10.04上编译Android源码(Build Android source in Ubuntu10.04 Platform)
- ubuntu 12.04(gcc降级)编译android代码遇到"_FORTIFY_SOURCE"的解决方法
- Ubuntu 10.10 Compile Android Source Code
- Android source code. Initializing a Build Environment
- ubuntu上编译Android源码(Build Android source
- Build Android source code Compile Environment Under Unbuntu
- Building Android Source code with Ubuntu 10.04
- Ubuntu10.04上编译Android源码(Build Android source in Ubuntu10.04 Platform)
- Google android source code build 问题总结【转】
- Build Android Source Code
- ubuntu 12.04(gcc降级)编译android代码遇到"_FORTIFY_SOURCE"的解决方法
- Android kernel build from source code and from prebuilt
- How to build and debug android source code
- 【转】Ubuntu10.04上编译Android源码(Build Android source in Ubuntu10.04 Platform)
- ubuntu 12.04 build android的问题
- Android: Ubuntu 12.04 LTS下Build Android Source Tree 4.0.1遇到的错误
- ubuntu 12.04(gcc降级)编译android代码遇到"_FORTIFY_SOURCE"的解决方法
- Build update.zip from your own android source code
- Android 4.4 Initializing a Build Environment on Ubuntu 12.04