public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
From: Andrew Fish <afish@apple.com>
To: Leif Lindholm <leif.lindholm@linaro.org>
Cc: edk2-devel@lists.01.org
Subject: Re: CLANG cross-compilation issue
Date: Wed, 07 Sep 2016 08:34:47 -0700	[thread overview]
Message-ID: <16C7C619-A87D-4FCD-AD7C-145E554C91C1@apple.com> (raw)
In-Reply-To: <20160907152701.GG16080@bivouac.eciton.net>


> On Sep 7, 2016, at 8:27 AM, Leif Lindholm <leif.lindholm@linaro.org> wrote:
> 
> Hi all,
> 
> This is a report for the archive, rather than anything easily fixable.
> While testing one of Ard's sets against CLANG, I tripped over a
> behaviour exposed by commit a1b8baccc30b
> (BaseTools GCC: use 'gcc' as the linker command for GCC44 and later).
> 
> This commit changes the CLANG profiles to invoke the linker via the
> 'clang' command, rather than as previously directly calling ld (with
> appropriate cross toolchain prefix where needed).
> 
> Turns out clang, at least the one packaged in Debian 'Jessie', does
> not scan the PATH when looking for cross-variants of GNU ld, but
> rather goes and looks for it in some commonly used locations. Failing
> to find any, it then falls back to the system-provided ld.
> 
> The symptom is a failed link step with the message:
> /usr/bin/ld: unrecognised emulation mode: aarch64linux
> 
> As a workaround, I was able to get my build functional again by
> creating a symbolic link /usr/bin/aarch64-linux-gnueabi-ld pointing at
> the actual location of my cross-ld.
> 

Leif,

I'm not sure it works the same as Xcode, but one of the search paths is often relative to the current location of the tools. This could be macOS specific as the tools don't install in /usr/bin anymore, and those locations just contain a reflector to the active toolchain. 

Thanks,

Andrew Fish

> /
>    Leif
> _______________________________________________
> edk2-devel mailing list
> edk2-devel@lists.01.org
> https://lists.01.org/mailman/listinfo/edk2-devel



  reply	other threads:[~2016-09-07 15:34 UTC|newest]

Thread overview: 3+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-09-07 15:27 CLANG cross-compilation issue Leif Lindholm
2016-09-07 15:34 ` Andrew Fish [this message]
2016-09-15  9:49   ` Leif Lindholm

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-list from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=16C7C619-A87D-4FCD-AD7C-145E554C91C1@apple.com \
    --to=devel@edk2.groups.io \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox