Questions tagged [cross-compilation]

Questions on how to compile software for the Raspberry Pi using other devices.

A cross compiler is a compiler capable of creating executable code for a platform other than the one on which the compiler is running.

A great answer for how to cross-compile can be found here:

188 questions
89
votes
8 answers

How do I build a GCC 4.7 toolchain for cross-compiling?

I already asked this question on Stack Overflow, but I would like to know if anyone managed to build a GCC 4.7 toolchain for ARM cross-compilation (for a x86/x86-64 Linux host). There are many instructions for building GCC from source and many…
user13
47
votes
4 answers

Is there a Linux From Scratch (LFS) ARM equivalent

I'd like to demonstrate how it's possible to 'bootstrap' up from a near-bare installation of Linux to something useful and productive. The Tiny Core and LFS projects demonstrate this well. However they are specific images for x86 based systems Is…
popey
  • 748
  • 1
  • 6
  • 13
36
votes
3 answers

How do I see which ARM CPU version I have?

When compiling a package for the Pi I came across a message like this: CFLAGS += -march=armv7-a -mtune=cortex-a8 -mfpu=neon -mfloat-abi=softfp #-mcpu=cortex-a8 and CFLAGS += -mtune=arm1176jzf-s -mfpu=vfp -mfloat-abi=hard I know the difference…
kun
  • 471
  • 1
  • 4
  • 5
18
votes
3 answers

How do I cross-compile the kernel on a Ubuntu host?

I would like to understand more about how the kernel works. Part of this is to compile it myself. How do I cross-compile the Kernel on a Ubuntu host?
Alex Chamberlain
  • 15,638
  • 15
  • 69
  • 113
16
votes
3 answers

How do I install node.js if my package manager doesn't include it?

Node.js, server side javascript sitting on top of Google's v8 engine, is not available for install from the Debian squeeze's default repositories and doesn't easily compile for ARM. Are there any raspberry pi specific projects to get node up and…
wmarbut
  • 1,113
  • 1
  • 9
  • 16
14
votes
2 answers

building kernel image (.img) including ramdisk

I have built my Linux kernel (3.0.1) for my Raspberry Pi with these following steps: 1. Downloading kernel source 2. tar xvf source.tar.bz2 3. downloading arm cross compilation tool. 4. tar xvf…
Shantanu Banerjee
  • 435
  • 2
  • 6
  • 17
10
votes
1 answer

How do I install distcc?

I have read How to build a GCC 4.7 toolchain for cross-compiling? and have successfully built a simple test program that works on my RPi. To do this, I had to run arm-unknown-linux-gnueabi-gcc hello.c -o hello on my x86 desktop and scp the…
Alex Chamberlain
  • 15,638
  • 15
  • 69
  • 113
10
votes
1 answer

Can I run hardfp software on a softfp kernel?

How to build a GCC 4.7 toolchain for cross-compiling? explains how to build a cross-compiling GCC and advises choosing softfp, but I understand that hardfp would be much faster. Will software compiled for hardfp work on a softfp kernel or is the ABI…
Alex Chamberlain
  • 15,638
  • 15
  • 69
  • 113
9
votes
2 answers

Will compiled binaries run on other Linux boxes?

I don't have a Linux box at home, so I'd like to use my Raspberry Pi to try out some development on Linux. Will binaries compiled on it run on other, more standard Linux boxes, or will they only run on the Raspberry Pi?
Tom Medley
  • 4,089
  • 8
  • 33
  • 46
9
votes
2 answers

How can I cross-compile to the Raspberry Pi using Clang/LLVM?

I would like to cross-compile C-family languages (C, C++, Objective-C, and Objective-C++) to the Raspberry Pi using Clang and LLVM on a build computer of a different architecture. How may I do this?
fouric
  • 1,809
  • 4
  • 18
  • 26
8
votes
1 answer

Crosscompiling: exact archictecture for all models

I would like to crosscompile some piece of C++ software in a way that I can run on every Raspberry Pi. I am confused about the parameter -march. I've found a great deal of resources recommending to use armv6zk to be compatible with all versions of…
Pietro Saccardi
  • 296
  • 1
  • 8
8
votes
2 answers

How to cross-compile Python 3.6 for the Raspberry Pi

I am trying to cross-compile Python 3.6 for my Raspberry Pi based on the instructions on this post, which boil down to setup then env vars so we use the linaro toolchain: export CC=arm-bcm2708hardfp-linux-gnueabi-gcc export…
arielnmz
  • 221
  • 1
  • 2
  • 10
8
votes
3 answers

What's causing these crashes after cross-compiling?

I'm trying to cross-compile a large library (TensorFlow) using gcc on Ubuntu. I've installed the g++-arm-linux-gnueabihf toolchain, and was able to successfully build my binary. The process I'm using to build is documented…
Pete Warden
  • 181
  • 1
  • 4
7
votes
1 answer

libstdc++ Error: `GLIBCXX_3.4.22' not found

I was trying to cross-compile dlib for Raspberry Pi, using the arm-linux-gnueabihf compiler. After successful runs of cmake and make -j4, I ran python setup.py bdist_wheel --repackage, which created the nencessary .so files which I later copied to…
code
  • 211
  • 1
  • 2
  • 4
7
votes
1 answer

tutorial on crosscompiling .deb packages?

I'd really like to get to know debian packaging for the RPi I have read several useful tutorials on how to crosscompile with tools from https://github.com/raspberrypi/tools/tree/master/arm-bcm2708 and some on setting up crosstool-ng This lets me…
1
2 3
12 13