Source Build Environment-use arm-linux-gcc4.3.2 Compiler

Source: Internet
Author: User
Download a new arm-linux-gcc4.4.3 (: http://www.arm9.net/download.asp
.
Export
Path = "/home/New/opt/friendlyarm/toolschain/4.4.3/bin: $ path"
Export
Path = "/home/New/usr/local/ARM/4.3.2/bin: $ path"
The file format compiled by the General arm-GCC compiler is the same as that compiled by running make in the android source code tree through Android. mk..
Note 1: if the common arm-Linux-GCC compiler is linked to glibc, it can only be statically linked; otherwise, it cannot run on Android. Because the C library is different. Arm-ling-gcc
-O a./Hello. C-static
[1].
(Note: When running a program without static content, the dynamic library is required.{High total verification})
NOTE 2: arm-linux-gcc4.4.3
The version is not generic, but not the version of android2.3, or earlier than 4.3.2. Otherwise, the kernel
Too old, segmentation fault error.
Classic Note: static files compiled with arm-linux-gcc4.3.2 can run on Android. This will be used after the library is transplanted.
You cannot directly use the compiler in the android source code package to compile the makefile project.
How to Use the Cross Compiler
[2]: The usage method is similar to that of the local GCC, but there is something special:RequiredThe-L and-I Parameters specify that the compiler uses the PostgreSQL system library and header file, instead of the local (x86) Library (the header file can sometimes be used locally ).
Example:Iscsi-XXXX-Linux-GNU-GCC test. C-L/path/to/sparclib-I/path/to/sparcinclude
ADB push hello Dev/Hello
Pay attention to the following path/, and do not push it to another directory. Otherwise, the permission prompt will be executed.
Denied.
ADB shell chmod 777 DEV/Hello

ADB Shell
CD Dev
./Hello output result!

[1] See
Http://blog.csdn.net/pottichu/article/details/5660982

[2] See

Http://www.360doc.com/content/10/0619/14/1795182_33985297.shtml

Original text in http://www.bangchui.org/read.php? Tid = 21889

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.