[cfe-dev] Cross compile for aarch64-elf baremetel

Renato Golin via cfe-dev cfe-dev at lists.llvm.org
Wed May 18 12:15:37 PDT 2016


On 18 May 2016 at 20:09, Zhao, Weiming via cfe-dev
<cfe-dev at lists.llvm.org> wrote:
> I set the --gcc-toolchain and -sysroot to the corresponding patsh but it
> still uses my host /usr/bin/ld instead of the one in my GCC. I find that, in
> getToolChain(), it gets Generic_ELF and the GCCInstallationDetector is only
> used by Linux toolchain.

Hi Weiming,

Did you use the -triple as "aarch64-elf"? On ARM, I found that this is
all you need to get the driver to find the right tools. I haven't
needed to use -gcc-tools or anything.

Also, be careful that bare-metal GNU toolchains are also bare. You'll
need to add -l* to all libraries that you need, maybe include paths,
etc.

cheers,
--renato



More information about the cfe-dev mailing list