aarch64 플랫폼 교차 컴파일strace 도구
11551 단어 교차 번역
/*********************************************************************
* Author : lile
* Modified : 2019 12 28 10:16:13
* Email : [email protected]
* HomePage : lile777.blog.csdn.net
* CopyRight : lile 。
* , 。
* 。
*********************************************************************/
카탈로그
1, 호스트 환경
root@ubuntu:~# lsb_release -a
No LSB modules are available.
Distributor ID: Ubuntu
Description: Ubuntu 14.04.5 LTS
Release: 14.04
Codename: trusty
root@ubuntu:~# cat /proc/version
Linux version 4.4.0-31-generic (buildd@lgw01-43) (gcc version 4.8.4 (Ubuntu 4.8.4-2ubuntu1~14.04.3) ) #50~14.04.1-Ubuntu SMP Wed Jul 13 01:07:32 UTC 2016
root@ubuntu:~# file /bin/busybox
/bin/busybox: ELF 64-bit LSB executable, x86-64, version 1 (SYSV), statically linked, for GNU/Linux 2.6.24, BuildID[sha1]=ae3cf83d83d4ed554fa7ba6d5f2b17c92c362710, stripped
root@ubuntu:~#
root@ubuntu:~# aarch64-himix100-linux-gcc -v
Using built-in specs.
COLLECT_GCC=aarch64-himix100-linux-gcc
COLLECT_LTO_WRAPPER=/opt/hisi-linux/x86-arm/aarch64-himix100-linux/host_bin/../libexec/gcc/aarch64-linux-gnu/6.3.0/lto-wrapper
Target: aarch64-linux-gnu
Configured with: /home/sying/SDK_CPU_UNIFIED/build/script/aarch64-himix100-linux/aarch64_himix100_build_dir/src/gcc-6.3.0/configure --build=i386-redhat-linux --host=i386-redhat-linux --target=aarch64-linux-gnu --with-arch=armv8-a --prefix=/home/sying/SDK_CPU_UNIFIED/build/script/aarch64-himix100-linux/aarch64_himix100_build_dir/install --with-specs='%{!ftree-coalesce-vars:-fno-tree-coalesce-vars}' --disable-libmudflap --disable-libssp --enable-gold=yes --disable-libstdcxx-pch --disable-multilib --enable-multiarch --with-gnu-as --with-gnu-ld --enable-libgomp --enable-gnu-indirect-function --enable-checking=yes --enable-lto --enable-c99 --enable-long-long --disable-nls --enable-fix-cortex-a53-835769 --enable-fix-cortex-a53-843419 --enable-shared --with-pkgversion='HC&C V100R002C00B027_20181107' --enable-languages=c,c++ --with-headers=/home/sying/SDK_CPU_UNIFIED/build/script/aarch64-himix100-linux/aarch64_himix100_build_dir/install/target/usr/include --with-sysroot=/home/sying/SDK_CPU_UNIFIED/build/script/aarch64-himix100-linux/aarch64_himix100_build_dir/install/target --with-build-sysroot=/home/sying/SDK_CPU_UNIFIED/build/script/aarch64-himix100-linux/aarch64_himix100_build_dir/install/target --with-gmp=/home/sying/SDK_CPU_UNIFIED/build/script/aarch64-himix100-linux/aarch64_himix100_build_dir/obj/host-libs/usr --with-mpfr=/home/sying/SDK_CPU_UNIFIED/build/script/aarch64-himix100-linux/aarch64_himix100_build_dir/obj/host-libs/usr --with-mpc=/home/sying/SDK_CPU_UNIFIED/build/script/aarch64-himix100-linux/aarch64_himix100_build_dir/obj/host-libs/usr --with-cloog=/home/sying/SDK_CPU_UNIFIED/build/script/aarch64-himix100-linux/aarch64_himix100_build_dir/obj/host-libs/usr --with-build-time-tools=/home/sying/SDK_CPU_UNIFIED/build/script/aarch64-himix100-linux/aarch64_himix100_build_dir/install/aarch64-linux-gnu/bin --libdir=/home/sying/SDK_CPU_UNIFIED/build/script/aarch64-himix100-linux/aarch64_himix100_build_dir/install/lib
Thread model: posix
gcc version 6.3.0 (HC&C V100R002C00B027_20181107)
2, 파일 다운로드
https://src.fedoraproject.org/repo/pkgs/strace/?C=M;O=D
https://strace.io
3, 환경 의존 및 준비
3.1 autoreconf 도구 설치
apt-get install autoconf automake libtool
3.2 컴파일 부트 파일 생성
./bootstrap
4, x86 컴파일 테스트
#
time ./configure --prefix=/opt/files/release/strace/x86_64 --enable-mpers=no
#
time make LDFLAGS+='-static -pthread'
#
time make install
root@ubuntu:/opt/files/strace-5.4# tree /opt/files/release/strace/x86_64/
/opt/files/release/strace/x86_64/
├── bin
│ ├── strace
│ ├── strace-graph
│ └── strace-log-merge
└── share
└── man
└── man1
├── strace.1
└── strace-log-merge.1
4 directories, 5 files
root@ubuntu:/opt/files/strace-5.4# file /opt/files/release/strace/x86_64/bin/strace*
/opt/files/release/strace/x86_64/bin/strace: ELF 64-bit LSB executable, x86-64, version 1 (GNU/Linux), statically linked, for GNU/Linux 2.6.24, BuildID[sha1]=2c8e6ab98c0963ae70eb9b7889beb0dae4d03939, not stripped
/opt/files/release/strace/x86_64/bin/strace-graph: Perl script, ASCII text executable
/opt/files/release/strace/x86_64/bin/strace-log-merge: POSIX shell script, ASCII text executable
#
make uninstall && make distclean
5, aarch64 플랫폼 교차 컴파일
#
time CC=aarch64-himix100-linux-gcc LD=aarch64-himix100-linux-ld RANLIB=aarch64-himix100-linux-ranlib ./configure --host=aarch64-linux --prefix=/opt/files/release/strace/aarch64/ --enable-mpers=no
#
time make LDFLAGS+='-static -pthread'
#
time make install
root@ubuntu:/opt/files/strace-5.4# tree /opt/files/release/strace/aarch64/
/opt/files/release/strace/aarch64/
├── bin
│ ├── strace
│ ├── strace-graph
│ └── strace-log-merge
└── share
└── man
└── man1
├── strace.1
└── strace-log-merge.1
4 directories, 5 files
root@ubuntu:/opt/files/strace-5.4# file /opt/files/release/strace/aarch64/bin/*
/opt/files/release/strace/aarch64/bin/strace: ELF 64-bit LSB executable, ARM aarch64, version 1 (SYSV), statically linked, for GNU/Linux 3.7.0, not stripped
/opt/files/release/strace/aarch64/bin/strace-graph: Perl script, ASCII text executable
/opt/files/release/strace/aarch64/bin/strace-log-merge: POSIX shell script, ASCII text executable
root@ubuntu:/opt/files/strace-5.4#
#
make uninstall && make distclean
6,Q&A
(1), ./bootstrap: line 40: autoreconf: command not found
apt-get install autoconf automake libtool
(2),configure: error: Cannot enable m32 personality support
Re: 4.21 build failure // https://sourceforge.net/p/strace/mailman/strace-devel/
From: Eugene Syromiatnikov - 2018-02-19 19:13:31
On Thu, Feb 15, 2018 at 12:39:15AM +0100, Andreas Schwab wrote:
> 4.21 fails to build for aarch64:
>
> checking gnu/stubs-32.h usability... no
> checking gnu/stubs-32.h presence... no
> checking for gnu/stubs-32.h... no
> configure: Created empty gnu/stubs-32.h
> checking for m32 personality compile support... no
> checking whether to enable m32 personality support... no
> configure: error: Cannot enable m32 personality support
As noted in NEWS, strace now enforces mpers support by default (in order
to make aware of the possibilty of incorrect non-native personality
decoding early); looks like your compiler doesn't support producing
binaries for the compat personality. You can either try to use another
compiler or provide --disable-mpers to the configure script.
As GCC for AArch64 doesn't support generating ARM EABI binaries at all,
this issue will probably be somehow tackled in the future.
7, 참조
https://sourceforge.net/p/strace/mailman/strace-devel/configure: error: Cannot enable m32 personality support
이 내용에 흥미가 있습니까?
현재 기사가 여러분의 문제를 해결하지 못하는 경우 AI 엔진은 머신러닝 분석(스마트 모델이 방금 만들어져 부정확한 경우가 있을 수 있음)을 통해 가장 유사한 기사를 추천합니다:
aarch64 플랫폼 교차 컴파일strace 도구카탈로그 1, 호스트 환경 2, 파일 다운로드 3, 환경 의존과 준비 3.1 autoreconf 도구를 설치합니다 3.2 컴파일 부트 파일 생성 4, x86 컴파일 테스트 5,aarch64 플랫폼 교차 컴파일 6,Q...
텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
CC BY-SA 2.5, CC BY-SA 3.0 및 CC BY-SA 4.0에 따라 라이센스가 부여됩니다.