问题标签 [gnu-toolchain]
For questions regarding programming in ECMAScript (JavaScript/JS) and its various dialects/implementations (excluding ActionScript). Note JavaScript is NOT the same as Java! Please include all relevant tags on your question; e.g., [node.js], [jquery], [json], [reactjs], [angular], [ember.js], [vue.js], [typescript], [svelte], etc.
android - 用于内核和用户空间的 Android 工具链
我了解 AOSP 带有一个预构建的工具链。还有其他可以使用的独立工具链。我知道我们可以使用这些工具链并编译 AOSP 代码(无内核)。
当我们为特定设备下载内核并想要编译内核时,我们是否需要使用与构建用户空间框架相同的工具链?
或者具体来说,我有一个基于 GNU 的arm-linux-*-gnueabi
用于编译内核的工具链。我是否需要使用相同的工具链来交叉编译 AOSP 代码?
tensorflow - Bazel 0.5.2 自定义工具链,在构建 tensorflow 时错误地调用存档程序(gcc“ar”)?
尝试使用自定义工具链来构建依赖于 tensorflow 的目标,我的 CROSSTOOL 和工具链 BUILD 文件似乎很好。但是,在构建目标(取决于 tensorflow)时,出现以下错误:
错误在于“ar”本身的调用,它应该用文件的内容调用,而不是文件本身。
现在猫
我得到了'ar'的参数应该是什么,那就是我得到:
应该运行的命令类似于:
我错过了什么?我正在使用 bazel 的最新版本 0.5.2
gcc - CC -I vs -isystem 命令行参数差异和具体行为
我已经看到了这个问题。
许多编译器和编译器工具链支持 -I < dir > 和 -isystem < dir > 命令行参数。我确实知道他们分别将目录添加到搜索路径和系统搜索路径,并且系统目录最后被搜索,并且 -isystem 可以帮助您覆盖默认系统库。
我也知道他们得到了 GCC 的特殊待遇“修复有缺陷的系统头文件”,但是 GCC 在这种“特殊待遇”中具体做了什么?
另外,我不清楚编译器是否只在指定的目录中查找而没有更深入,或者是否在某种程度上递归搜索这些目录。
如果我需要访问资源/path/to/lib
并且path/to/lib/aBitFurther
我只需要-I /path/to/lib
?
linux - Buildroot toolchain with openssl
I am using Buildroot (2017.02.5) to build a custom cross compilation toolchain. I have two buildroot configurations; one to build the RFS and one purely to build a toolchain. I have things configured this way because I don't want the toolchain to be rebuilt unless I intentionally rebuild it- the configuration which builds the RFS references this toolchain as an external toolchain.
Generally, the built toolchain works fine, but I have some existing applications (Linux userspace) which #include
's <openssl/md5.h>
. When I try to compile this, I get a "<openssl/md5.h>: No such file or directory"
error, which is expected because the sysroot dir of the generated toolchain does not contain an openssl directory.
How can I make buildroot include openssl in the toolchain? All searches I have done seem to point to cross compiling openssl for my embedded target, which is not an issue. The issue is that I need to include it in the toolchain.
I have Target packages --> Libraries --> Crypto --> openssl set to y, but I don't think this makes any difference in this scenario since I believe it relates only to the RFS (and the defconfig in question does not build an RFS, only a toolchain).
I could compile OpenSSL outside of the buildroot tree and install it to the sysroot dir, but this doesn't seem correct as it would pollute sysroot.
I'm sure I'm missing something simple here- any help would be appreciated.
c - 在 Apple MAC book 上为 STM 编译 ARM 二进制文件的问题
我正在尝试在 Mac 上编译一个项目,但我遇到了很多错误。它在 Linux 上编译得很好。我参考了 STM 研讨会中包含的工具包。
从 /build/debug运行cmake ../.. -DCMAKE_BUILD_TYPE=Debug -DCMAKE_TOOLCHAIN_FILE=../../tools/toolchain/nucleo_f746zg.cmake
时,我得到以下输出..
有人对此有建议吗?如何为 ARM 编译代码?我正在运行 ARM GNU 工具并使用 arm-none-eabi-g++ 和 arm-none-eabi-gcc 编译器。
c - 使用 GNU ToolChain 在 Windows 命令行上运行 ARM/C
所以当我问了一个关于在 IDE 中运行此代码的类似问题时,您可能会认出我。最终我得到的建议是我应该学会从命令行一起运行它们。因此,我接受了建议并从 Codesourcery Lite MentorGraphics 安装了 GNU 工具链(不确定这是否有意义)。我可以做的命令是
但是,我无法准确找出我应该如何使用这些命令。我试过了
但是我从 ARM 文件中得到一个语法错误。然后我试着做
但这不起作用,因为外部“add2”
这给了我一个文件“a.out”,但我不知道它是做什么的。
这是我的代码:
手臂
C
任何帮助,将不胜感激。我还在 Windows 上的 Ubuntu 上从 Bash 的 apt-get 安装了这个工具包,所以如果你有一个 BASH 解决方案也是可能的(https://packages.ubuntu.com/trusty/devel/gcc-arm-none-eabi )
gcc - 在没有 mpc、mpfr 和 gmp 的情况下构建 GCC
我需要使用较小版本的软件包来构建我的工具链。有没有办法通过禁用 mpc、mpfr 和 gmp 包来构建 gcc?
linux-kernel - 为arm交叉编译linux内核时如何确定编译器版本
我的问题可能听起来很愚蠢,但这是我过去 2 天面临的一个简单问题。在撰写此问题时,最新的内核版本是 4.14,但我想编译任何随机选择的旧版本(v3.2)。
我已经从主线仓库克隆了内核并检查了正确的版本
这引发了我的错误:
我的所有步骤都从这篇文章中得到了遵循,这应该是可行的。我所能弄清楚的(在参考了其他类似的文章和关于 SO 的问题之后)正在使用的编译器版本确实很重要。
我当前的编译器版本是:
我的问题是:在编译 linux 内核时我真的应该注意编译器版本(工具链)吗?如果是,我怎么知道最适合我的特定内核版本的工具链/编译器版本。
我认为任何最新的工具链都应该处理所有以前的内核版本。由于缺少编译器选项(如果使用),旧编译器可能无法编译较新的内核版本。然而,反之亦然不应该是一个问题。
编辑
这个问题的本质是为任何主流 linux 内核版本找到可靠的信息来源,在那里可以找到有关支持的编译器版本的信息,以便对其进行编译。
目标不是编译特定版本的内核。例如,我能够很好地用我现有的设置编译 v4.9。我只是随机选择了一个旧版本来验证我的学习。
embedded - Nandtest 实用程序正在损坏闪存中的数据
我使用 nandtest 实用程序来测试闪存。经测试,闪存数据损坏。第一个闪存卡数据被此命令损坏:
然后,我从 git 看到了 nandtest 的 C 资源,我发现这个调用应该对我有用:
但是,闪存数据又被损坏了。这是 nandtest 调用的输出:
有谁知道,为什么调用 nandtest 实用程序会损坏我卡上的数据?有什么方法可以调用 nandtest 实用程序来确保没有损坏的数据?
openwrt - 如何在 openwrt 的输出图像中添加工具链?
尝试为为树莓派开发的 openwrt 映像构建外部工具链时。
工具链目录 '/opt/cross/aarch64-unknown-linux-gnu' 不存在。make[3]: * [/home/source/build_dir/toolchain-aarch64-unknown-linux-gnu/wrapper-1/.prepared] 错误 1 make[2]:[工具链/包装器/编译] 错误 2 make[1]:[/home/source/staging_dir/toolchain-aarch64-unknown-linux-gnu/stamp/.toolchain_compile] 错误 2 make: * [world] 错误 2
如何在上述任何路径(/opt/cross/aarch64-unknown-linux-gnu)中的 openwrt 输出图像中引入工具链。