{"id":486,"date":"2012-07-11T15:44:36","date_gmt":"2012-07-11T21:44:36","guid":{"rendered":"https:\/\/halsafar.ca\/blog\/?p=486"},"modified":"2012-07-11T16:29:57","modified_gmt":"2012-07-11T22:29:57","slug":"android-ndk-standalone-gcc-4-6","status":"publish","type":"post","link":"https:\/\/halsafar.ca\/blog\/2012\/07\/11\/android-ndk-standalone-gcc-4-6\/","title":{"rendered":"Android NDK Standalone GCC 4.6"},"content":{"rendered":"<p>Not entirely sure when Google started to include the GCC 4.6 sources. \u00a0I have first noticed it at the current NDK r8 when running the download-toolchain-sources.sh<\/p>\n<p>You have to compile it yourself. \u00a0There are instructions out there but now that google is including it things have gotten easier. \u00a0These instructions only apply to Linux. \u00a0Specifically tested in Ubuntu 12.04.<\/p>\n<ul>\n<li>sudo apt-get install git-core gnupg flex bison gperf build-essential zip curl<\/li>\n<li><a title=\"Android NDK\" href=\"http:\/\/developer.android.com\/tools\/sdk\/ndk\/index.html#Downloads\">Download NDK<\/a><\/li>\n<li>Untar NDK to [SOME_LOCATION], using \/opt\/ndk\/<\/li>\n<li>Set NDK_ROOT=\/opt\/ndk\/<\/li>\n<li>\u00a0.\/build\/tools\/download-toolchain-sources.sh src\/<\/li>\n<li><a href=\"http:\/\/www.multiprecision.org\/index.php?prog=mpc&amp;page=download\">Download MPC 0.9<\/a><\/li>\n<li>Move mpc tar to .\/src\/mpc\/<\/li>\n<li><code>.\/build\/tools\/build-gcc.sh --gmp-version=4.3.2 --mpc-version=0.9 --mpfr-version=2.4.2 --binutils-version=2.21 $(pwd)\/src $(pwd) arm-linux-androideabi-4.6<\/code><\/li>\n<li><code>.\/build\/tools\/build-gcc.sh --gmp-version=4.3.2 --mpc-version=0.9 --mpfr-version=2.4.2 --binutils-version=2.21 $(pwd)\/src $(pwd) x86-4.6<\/code><\/li>\n<li><code>.\/build\/tools\/build-gcc.sh --gmp-version=4.3.2 --mpc-version=0.9 --mpfr-version=2.4.2 --binutils-version=2.21 $(pwd)\/src $(pwd)\u00a0mipsel-linux-android-4.6<\/code><\/li>\n<li>(Patience)<\/li>\n<li><\/li>\n<\/ul>\n<p>Now you can generate a standalone toolchain for distribution:<\/p>\n<ul>\n<li><code>.\/build\/tools\/make-standalone-toolchain.sh --toolchain=arm-linux-androideabi-4.6 --platform=android-9 --install-dir=\/opt\/android-9_arm\/<\/code><\/li>\n<li><code>.\/build\/tools\/make-standalone-toolchain.sh --toolchain=x86-4.6 --platform=android-9 --install-dir=\/opt\/android-9_x86\/<\/code><\/li>\n<li><code>.\/build\/tools\/make-standalone-toolchain.sh --toolchain=mipsel-linux-android-4.6 --platform=android-9 --install-dir=\/opt\/android-9_mips\/<\/code><\/li>\n<\/ul>\n<p>Done.<\/p>\n<p>Similar steps can be applied to MAC OS X however setting up the development environment is far more annoying. \u00a0I have a feeling this might be near impossible to pull off in Windows without jumping through major hoops.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Not entirely sure when Google started to include the GCC 4.6 sources. \u00a0I have first noticed it at the current NDK r8 when running the download-toolchain-sources.sh You have to compile it yourself. \u00a0There are instructions out there but now that<span class=\"ellipsis\">&hellip;<\/span><\/p>\n<div class=\"read-more\"><a href=\"https:\/\/halsafar.ca\/blog\/2012\/07\/11\/android-ndk-standalone-gcc-4-6\/\">Read more <span class=\"screen-reader-text\">Android NDK Standalone GCC 4.6<\/span><span class=\"meta-nav\"> &#8250;<\/span><\/a><\/div>\n<p><!-- end of .read-more --><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3,6],"tags":[65,69,13,71,72,22,70],"class_list":["post-486","post","type-post","status-publish","format-standard","hentry","category-developement","category-halsafar","tag-c","tag-compile","tag-development","tag-gcc","tag-gcc4_6","tag-linkedin","tag-toolchain"],"aioseo_notices":[],"_links":{"self":[{"href":"https:\/\/halsafar.ca\/blog\/wp-json\/wp\/v2\/posts\/486","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/halsafar.ca\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/halsafar.ca\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/halsafar.ca\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/halsafar.ca\/blog\/wp-json\/wp\/v2\/comments?post=486"}],"version-history":[{"count":14,"href":"https:\/\/halsafar.ca\/blog\/wp-json\/wp\/v2\/posts\/486\/revisions"}],"predecessor-version":[{"id":495,"href":"https:\/\/halsafar.ca\/blog\/wp-json\/wp\/v2\/posts\/486\/revisions\/495"}],"wp:attachment":[{"href":"https:\/\/halsafar.ca\/blog\/wp-json\/wp\/v2\/media?parent=486"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/halsafar.ca\/blog\/wp-json\/wp\/v2\/categories?post=486"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/halsafar.ca\/blog\/wp-json\/wp\/v2\/tags?post=486"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}