Questions tagged [crosstool-ng]

Questions on using and developing crosstool-NG, a project to build compilers and tools from the gcc source and other related packages.

crosstool-NG is a collection of scripts for building tool chains (mainly gcc and support tools) and only tool chains. With crosstool-NG, you can precisely control how each component is configured and built, so you can produce a tool chain custom tailor for your system. crosstool-NG can build generic general purpose tool chains, to dedicated system specific tool chains. Configuration is guided ia a kbuild menu configuration interface. Both native and cross compilers are supported.

Support is continually evolving and includes langagues like Ada, C++, Java, Objective-C, Objective-C++, Go, etc. Various libraries are also supported, including newlib, uClibc, eglibc and glibc.

crosstool-NG is very simple in structure, consisting of shell scripts, gnu makefiles, source patches, and a kbuild system which directs the shell script. Additional documentation is available in crosstool-NG source directory in the docs sub-directory.

crosstool-NG is used by many open source projects, such as Ubuntu, Linaro, and buildroot.

Related tags:

78 questions
2
votes
0 answers

error: linker `aarch64-unknown-linux-gnu-gcc` not found - M1 Mac

Trying to cross compile Rust for the Raspberry Pi and running into a lot of issues - I believe I've reduced it down to this 'linker not found' error. Only trouble is, I'm not sure how to go about installing this. I've started going down the rabbit…
2
votes
0 answers

Failing to download expat in crosstool-ng

I'm attempting to create a toolchain for my Raspberry Pi using my Ubuntu box. I've installed crosstool-ng 1.24.0. When I run ./ct-ng build, it says that it fails to download expat. Here's the output: [INFO ] Performing some trivial sanity…
Daniel Walker
  • 6,380
  • 5
  • 22
  • 45
2
votes
0 answers

Why doesn't GCC always emit the atomic builtins?

Using crosstool-ng, I built a GCC 10.2 cross toolchain for mips-unknown-linux-uclibc. It works flawlessly for the the legacy app I am compiling. I recently tried to compile the the same application for and embedded device running an RTOS using a…
Dani
  • 21
  • 3
2
votes
1 answer

Can't get U-boot running on Raspberry PI 4B. What are the absolute necessities?

I saw a few posts regarding this topic, but nothing really helped my cause, and so restating my problem here.  I would like to build my own toolchain, U-boot and the mainline Linux kernel to be ported on a particular processor. Since I currently am…
Sreedhar
  • 33
  • 1
  • 4
2
votes
0 answers

Strange error building crosstool-ng for mipsel architecture under Alpine in Docker

As the title says, I get a strange error building crosstool-ng for mipsel architecture under Alpine in Docker. Any ideas? To me it looks like some kind of incompatibility between the host toolchain and the target toolchain but I'm no expert in this…
Hypertable
  • 123
  • 8
2
votes
1 answer

Error compiling gcc with crosstool-ng

Does somebody can help me solve this error? I was trying build arm-unknown-linux-gnueabi using ct-ng (version 1.23.0). [ERROR] /home/tomas/crosstool-ng-1.23.0/.build/src/gcc-6.3.0/gcc/ubsan.c:1474:23: error: ISO C++ forbids comparison between…
tgonzalez89
  • 621
  • 1
  • 6
  • 26
2
votes
2 answers

Failed to build an ARM cross compiler with crosstool-ng

I'm doing a lab from Free Electron to building a cross-compilation toolchain But when I run the build command it fails shortly after downloading things... My stuff : xubuntu 14.04.3 | crosstool-ng-1.19.0 When I run ./ct-ng build [DEBUG] Entering…
jdc
  • 384
  • 4
  • 15
2
votes
0 answers

How do I configure gcc to search for crt1.o and other libc files in a specific location?

I'm trying to build a cross-compilation toolchain for Raspberry Pi using Crosstool-NG. And I have already done this. But when I try to use my toolchain with rootfs from Raspberry Pi using the --sysroot option (as it said in this answer) I get the…
anton_rh
  • 8,226
  • 7
  • 45
  • 73
2
votes
0 answers

missing execinfo .h in arm-unknown-linux-uclibcgnueabi

ng users, Does any body knows how to have execinfo.h header file while cross compiling arm-unknown-linux-uclibcgnueabi toolchain? Basically I have cross compiled arm-unknown-linux-uclibcgnueabi toolchain but it doesn't have execinfo.h header. I…
Neeraj Kumar
  • 836
  • 1
  • 10
  • 29
2
votes
0 answers

differences between gcc -mcpu at runtime vs. buildin --with-cpu

What are the differences between compiling for arm with the -mcpu option (e.g. -mcpu=cortex-a9) versus omitting the mcpu option and having build the toolchain by crosstool-ng with CT_ARCH_CPU (the --with-cpu option e.g. --with-cpu=cortex-a9). The…
MikeBergmann
  • 193
  • 2
  • 13
2
votes
0 answers

Crosstool-ng g++ not compiling c++11 std::current_exception

I build a gcc toolchain using Crosstool-ng, but the resulting g++ does not compile and/or link C++11 exceptions. If I try to compile: #include int main() { std::current_exception(); } via: arm-none-linux-gnueabihf-g++ -std=c++11…
MikeBergmann
  • 193
  • 2
  • 13
2
votes
1 answer

Trying to compile crosstool-ng-1.20.0

My first try to ./configure crosstool-ng looked like this: iMac:crosstool-ng-1.20.0 rand$ ./configure --prefix=/opt/local…
rand
  • 21
  • 1
  • 3
2
votes
0 answers

Problems with custom MIPS toolchain and abicall stuff

I'm working on a project focusing on the MIPS32 arch (little endian). The vendor gave me a GNU toolchain to compile my project targeting their embedded Linux version and everything works just fine. It's a GCC+Linux+uClibc toolchain. However,…
ivarec
  • 2,542
  • 2
  • 34
  • 57
2
votes
1 answer

Error when cross compiling Qt 5.0.1 for the Raspberry Pi

I'm trying to cross compile Qt 5.0.1 (latest release at the moment) for my Raspberry Pi. My set up is as follows: Operating System: Ubuntu 12.04 32-bit Cross compiler: Built from crosstool-NG program, using the exact instructions found…
oggmonster
  • 4,672
  • 10
  • 51
  • 73
1
vote
0 answers

Returning a struct fails to properly copy data members

I'm cross-compiling a program for a raspberry pi 3. Below is a minimal working example of something I've written that show's an issue I'm running into. I'm trying to fill a struct and then return that struct from a function. Importantly, one of the…
K. Shores
  • 875
  • 1
  • 18
  • 46