Re: OvmfPkgX64 doesn't build with CLANG38 (clang 14.0.3) NOOPT - undefined reference to `memcpy'

Ard Biesheuvel

On Wed, 25 May 2022 at 18:44, Pedro Falcato <pedro.falcato@...> wrote:

On Wed, May 25, 2022 at 4:50 PM Ard Biesheuvel <ardb@...> wrote:

On Wed, 25 May 2022 at 17:08, Rebecca Cran <quic_rcran@...> wrote:

I noticed OvmfPkg/OvmfPkgX64.dsc doesn't build with `-t CLANG38 -b
NOOPT` (with clang version 14.0.2) with the latest edk2 master

make: Nothing to be done for 'tbuild'.
/usr/bin/ld: /usr/bin/ld: DWARF error: invalid or unhandled FORM value:
in function `GopSetMode':
Gop.c:(.text.GopSetMode+0x418): undefined reference to `memcpy'
Can you dump the object file to see where the memcpy() call is emitted?
I think I found the smoking gun:
Indeed. We don't support struct assignment in Tianocore code, exactly
for this reason.

Join { to automatically receive all group messages.