File: README.Android

package info (click to toggle)
stress-ng 0.20.01-1
  • links: PTS
  • area: main
  • in suites: forky, sid
  • size: 17,788 kB
  • sloc: ansic: 206,398; sh: 862; makefile: 857; cpp: 254
file content (50 lines) | stat: -rw-r--r-- 1,300 bytes parent folder | download | duplicates (4)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
= Android porting notes =

How to setup a Ubuntu 12.04 machine to cross compile for different architectures.

== Setup ==

Install tools:

sudo apt-get install kernel-package build-essential git gcc-arm-linux-gnueabi gcc-arm-linux-gnueabihf gcc-4.6-multilib-arm-linux-gnueabihf gcc-4.6-multilib-arm-linux-gnueabi

== Environment ==
Ubuntu has a command called ''dpkg-architecture'' which setups up most of the cross compile environment.

64-bit x86:
 export $(dpkg-architecture -aamd64)

32-bit x86:
 export $(dpkg-architecture -ai386)

armhf (RaspberryPi/uPC):
 export $(dpkg-architecture -aarmhf)
 export CROSS_COMPILE=arm-linux-gnueabihf-
 export CCPREFIX=${CROSS_COMPILE}

armel:
 export $(dpkg-architecture -aarmel)
 export CROSS_COMPILE=arm-linux-gnueabi-
 export CCPREFIX=${CROSS_COMPILE}

Shared Variables:
 export CONCURRENCY_LEVEL=`grep -c '^processor' /proc/cpuinfo`
 export ROOT_CMD=fakeroot

== Build ==
#Make
 export CC=${CROSS_COMPILE}gcc
 STATIC=1 make ARCH=arm

= Ubuntu 17.04 =
Considerably easier with a cross-compilation enable distribution, swap architecture as needed.

=== Setup ===
  apt-get install gcc-4.9-aarch64-linux-gnu

=== Build ===

  CC=aarch64-linux-gnu-gcc-4.9 STATIC=1 make

M.Srikanth Kumar, Jul 14, 2015
Colin Ian King,   Dec  6, 2016 (updated, static linking)