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

Zhao, Weiming via cfe-dev cfe-dev at lists.llvm.org
Wed May 18 12:28:03 PDT 2016


Hi Renato,

Thanks a lot!

I need to add the GCC/bin into my $PATH.

Previously, I was using --gcc-toolchain, which doesn't require the 
toolchain be in my $PATH.

Thanks,

Weiming


On 5/18/2016 12:15 PM, Renato Golin wrote:
> 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

-- 
Qualcomm Innovation Center, Inc. is a member of Code Aurora Forum, hosted by The Linux Foundation

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.llvm.org/pipermail/cfe-dev/attachments/20160518/a794477f/attachment.html>


More information about the cfe-dev mailing list