小编Tex*_*066的帖子

构建 gcc 8.3 [Makefile:955: all] 错误 2

我一直在尝试在新的 Ubuntu 20.04 机器上构建特定版本的 GCC (8.3.0)。但是,当我按照以下链接中的步骤操作时:https://gcc.gnu.org/wiki/InstallingGCC我遇到了 Makefile 错误。

脚步:

wget https://ftp.gnu.org/gnu/gcc/gcc-8.3.0/gcc-8.3.0.tar.xz
tar xf gcc-8.3.0.tar.xz
cd gcc-8.3.0
./contrib/download_prerequisites
cd .. ; mkdir build ; cd build
../gcc-8.3.0/configure --prefix=/opt/gcc-8.3 --enable-languages=c,c++,fortran --disable-multilib
Run Code Online (Sandbox Code Playgroud)

配置输出:

checking build system type... x86_64-pc-linux-gnu
checking host system type... x86_64-pc-linux-gnu
checking target system type... x86_64-pc-linux-gnu
checking for a BSD-compatible install... /usr/bin/install -c
checking whether ln works... yes
checking whether ln -s works... yes
checking for a sed that does not truncate output... /usr/bin/sed
checking for gawk... no
checking …
Run Code Online (Sandbox Code Playgroud)

gcc makefile build gcc8

4
推荐指数
1
解决办法
3175
查看次数

Apple Clang12 LLVM - 未知的 AArch64 修复类型

我正在尝试将一些 Linux C 代码移植到 Apple M1 Mac,但遇到了一些内联汇编的问题。这让我难住了。

我有以下内联汇编块:

#define TEST asm volatile(\    
    "adr x0, label9 \n"\                                                                                                                                                          
    : : : "x0");
Run Code Online (Sandbox Code Playgroud)

并且遇到了以下错误:

test.c:73:5: error: unknown AArch64 fixup kind!
    TEST
    ^
./ARM_branch_macros.h:2862:7: note: expanded from macro 'TEST'
      "adr x0, label9 \n"\
      ^
<inline asm>:1:2: note: instantiated into assembly here
        adr x0, label9 
        ^
1 error generated.
make: *** [indirect_branch_latency.o] Error 1
Run Code Online (Sandbox Code Playgroud)

我正在使用以下编译器:

Apple clang version 12.0.0 (clang-1200.0.32.27)
Target: arm64-apple-darwin20.1.0
Thread model: posix
InstalledDir: /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin
Run Code Online (Sandbox Code Playgroud)

使用命令行:

clang -c -o test.o test.c -I. -w …
Run Code Online (Sandbox Code Playgroud)

macos clang arm64

4
推荐指数
1
解决办法
2540
查看次数

标签 统计

arm64 ×1

build ×1

clang ×1

gcc ×1

gcc8 ×1

macos ×1

makefile ×1