raspberry:cross-platform-compile:check-architecture
This is an old revision of the document!
GCC and Linux Architectures
GCC is also used to cross compile Linux applications. Applications can be compiled for 32-bit or 64-bit Linux systems.
| Architecture | Compilers |
|---|---|
| 32-bit | arm-linux-gnueabihf-gcc arm-linux-gnueabihf-g++ |
| 64-bit | aarch64-linux-gnu-gcc aarch64-linux-gnu-g++ |
Check the current target architecture by logging into the Pi: To check if system is running a 32 (Raspberry) or 64 (X86) architecture, use one of the following commands:
# getconf LONG_BIT ------------------ 32 # file /lib/systemd/systemd ------------------------- /lib/systemd/systemd: ELF 32-bit LSB pie executable, ARM, EABI5 version 1 (SYSV), dynamically linked, interpreter /lib/ld-linux-armhf.so.3, BuildID[sha1]=1dc619f043235803cc3339a671c7f0821b733d93, for GNU/Linux 3.2.0, stripped
dpkg --print-architecture
armhf
raspberry/cross-platform-compile/check-architecture.1788508100.txt.gz · Last modified: by 127.0.0.1
