반응형
cross-compile , toolchain
- Ubuntu 64비트 22.04
$ cat /etc/lsb-release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=22.04
DISTRIB_CODENAME=jammy
DISTRIB_DESCRIPTION="Ubuntu 22.04.2 LTS"
sudo apt-get install build-essential gcc-multilib gcc-powerpc-linux-gnu g++-powerpc-linux-gnu qemu-user-static
- ⚡ 설치하는 내용으로 하단의 단계가 수행이 안되는 경우 댓글 적어 주세요.
main.cpp
예제 파일
// main.cpp
#include <stdio.h>
int main() {
printf("Hello! \n");
return 0;
}
- 빌드 명령
powerpc-linux-gnu-g++ main.cpp -o powerpc_exec
/usr/bin/qemu-ppc-static -L /usr/powerpc-linux-gnu/ ./powerpc_exec
728x90
반응형
'Linux' 카테고리의 다른 글
VcXsrv X Server에서 한글 보기 (0) | 2024.07.07 |
---|---|
ProcDump 리눅스 dump 생성 (A Linux version of the ProcDump Sysinternals tool) (0) | 2024.04.09 |
WSL 에서 ssh 서버(server) 구동 (0) | 2022.04.15 |
lolcat 을 ls, cat, grep 명령어에만 적용하는 방법 (lolcat bashrc) (0) | 2022.03.17 |
30개의 무료 및 오픈 소스 Linux 게임 – 1부 (github blog) (0) | 2021.09.05 |