在ARM64上构建binutils-使检查失败-节排序

问题描述 投票:0回答:1

为ARM64编译binutils-2.33.1(aarch64 *--。]

构建通过,但是在某些程序中我遇到了奇怪的问题。例如,GNU MP在构建其生成器时会进行核心转储。处理long的问题似乎已中断。

当我在binutils-2.33.1构建上运行make check时。只有3个意外故障。他们绝对脱颖而出:

Running /custom_toolchain/binutils-2.33.1/binutils/testsuite/binutils-all/aarch64/aarch64.exp ...
FAIL: Check if disassembler can handle all sections in default order                                                                                  
FAIL: Check if disassembler can handle all sections in different order than header

Running /custom_toolchain/binutils-2.33.1/binutils/testsuite/binutils-all/objdump.exp ...
Version /custom_toolchain/build/binutils/objdump 2.33.1
FAIL: build-id-debuglink (grepping for source file name in disassembly output)

我可以安全地忽略这些失败吗?如果没有,对原因有任何想法吗?

makefile arm64 toolchain binutils
1个回答
0
投票

您不应忽略这些失败。如果可以访问linux x86_64系统,则可以使用可以信任的工具链交叉编译binutils 2.33.1,例如来自LinaroArm的gcc工具链:根本原因可能是有缺陷的工具在您的Aarch64系统上。

在Linux x86_64系统上交叉编译binutils的过程为:

wget https://mirror.csclub.uwaterloo.ca/gnu/binutils/binutils-2.33.1.tar.xz
wget https://releases.linaro.org/components/toolchain/binaries/7.5-2019.12/aarch64-linux-gnu/gcc-linaro-7.5.0-2019.12-i686_aarch64-linux-gnu.tar.xz

tar Jxf binutils-2.33.1.tar.xz
tar Jxf aarch64-linux-gnu/gcc-linaro-7.5.0-2019.12-i686_aarch64-linux-gnu.tar.xz

export CROSS_COMPILE=$(pwd)/gcc-linaro-7.5.0-2019.12-i686_aarch64-linux-gnu/bin/aarch64-linux-gnu-
export PREFIX=$(pwd)/binutils-2.33.1-aarch64-linux-gnu

mkdir binutils
cd binutils
../binutils-2.33.1/configure --host=aarch64-linux-gnu --with-static-standard-libraries --program-prefix=aarch64-linux-gnu- --prefix=${PREFIX}
make all install
cd -

ls -Gg binutils-2.33.1-aarch64-linux-gnu/bin/
total 98316
-rwxr-xr-x 1 5744720 Dec 13 23:41 aarch64-linux-gnu-addr2line
-rwxr-xr-x 2 5926304 Dec 13 23:41 aarch64-linux-gnu-ar
-rwxr-xr-x 2 8713560 Dec 13 23:41 aarch64-linux-gnu-as
-rwxr-xr-x 1 5696976 Dec 13 23:41 aarch64-linux-gnu-c++filt
-rwxr-xr-x 1  108784 Dec 13 23:41 aarch64-linux-gnu-elfedit
-rwxr-xr-x 1 6314920 Dec 13 23:41 aarch64-linux-gnu-gprof
-rwxr-xr-x 4 9739912 Dec 13 23:42 aarch64-linux-gnu-ld
-rwxr-xr-x 4 9739912 Dec 13 23:42 aarch64-linux-gnu-ld.bfd
-rwxr-xr-x 2 5789736 Dec 13 23:41 aarch64-linux-gnu-nm
-rwxr-xr-x 2 6529712 Dec 13 23:41 aarch64-linux-gnu-objcopy
-rwxr-xr-x 2 9437264 Dec 13 23:41 aarch64-linux-gnu-objdump
-rwxr-xr-x 2 5926304 Dec 13 23:41 aarch64-linux-gnu-ranlib
-rwxr-xr-x 2 2980560 Dec 13 23:41 aarch64-linux-gnu-readelf
-rwxr-xr-x 1 5735096 Dec 13 23:41 aarch64-linux-gnu-size
-rwxr-xr-x 1 5732376 Dec 13 23:41 aarch64-linux-gnu-strings
-rwxr-xr-x 2 6529704 Dec 13 23:41 aarch64-linux-gnu-strip

然后,您可以将复制的binutils可执行文件替换到目标系统中:如果您的问题与binutils相关,则可以很好地解决它。

© www.soinside.com 2019 - 2024. All rights reserved.