public inbox for devel@edk2.groups.io
 help / color / mirror / Atom feed
* CLANG cross-compilation issue
@ 2016-09-07 15:27 Leif Lindholm
  2016-09-07 15:34 ` Andrew Fish
  0 siblings, 1 reply; 3+ messages in thread
From: Leif Lindholm @ 2016-09-07 15:27 UTC (permalink / raw)
  To: edk2-devel

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


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2016-09-15  9:49 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-09-07 15:27 CLANG cross-compilation issue Leif Lindholm
2016-09-07 15:34 ` Andrew Fish
2016-09-15  9:49   ` Leif Lindholm

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox