0

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.

4

1 回答 1

1

在进一步阅读了 buildroot 文档(非常好)之后,我认为在Target packagesdo 下选择的包实际上会被推入sysroot工具链的(或至少应该),这是有道理的。这似乎不起作用的原因是因为我正在做一个make toolchain相对于make all(或只是一个简单的make)。这些包不是用前者构建的,所以它们不在sysroot工具链中。

于 2017-08-02T23:41:00.473 回答