From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from sin.source.kernel.org (sin.source.kernel.org [145.40.73.55]) by mx.groups.io with SMTP id smtpd.web10.9268.1653497161928010869 for ; Wed, 25 May 2022 09:46:02 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=tcbvbh0f; spf=pass (domain: kernel.org, ip: 145.40.73.55, mailfrom: ardb@kernel.org) Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by sin.source.kernel.org (Postfix) with ESMTPS id DFE1ECE1FDC for ; Wed, 25 May 2022 16:45:58 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4ADC9C34119 for ; Wed, 25 May 2022 16:45:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1653497157; bh=SAPDDds8oY7gKOw74wPjYTQAeQdbEhrJl9p2EDDzX8I=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=tcbvbh0fpi1QtJ6/ewE0NBoA/KHakuKh77SDNocO3DnQoPN3jJ7UjKHgLdqh76vs9 0hrA36vX2l4hkuYjJG+R8C/bGcPdh0yvMD1ErCOEAY8RWIrIQmghbH79C70gyZeq9Y 6qJPqgNJFV5vozwWWvF4AtQWpz18PpLhCVmWaDhq4E5eMt7OtvvvEizhN0z1NH+g2k kOKgo1iM1yuOebGTSbF87cNUNIbK+a8o5FTtHx1kMEcdUUtf9J7GzD+qBPdW7uTWQ5 m2QxfeqUDuK4cscHz2uNvhpSN4aG+j6wSekG8LqXQP8gYx13J4hlXcqwJEIvGQ7ygO VCZbrhDqQ4KrA== Received: by mail-ot1-f42.google.com with SMTP id t14-20020a9d66ce000000b0060af9ed4b87so9412138otm.9 for ; Wed, 25 May 2022 09:45:57 -0700 (PDT) X-Gm-Message-State: AOAM530COdezz8JXeJdHiZm0GQ98AXWjjD5QIg9x6EfJ8k/na+9gNT9j KThJBdTCTwKOqkfKRXSoTC7Ym9LqjoGhDhL+RYo= X-Google-Smtp-Source: ABdhPJymSUOcLzyM9a9es8PknZfybBloV/QKUPBIRiA/ostb4LNfnZ3fAlbUHIfhuZV7WtACesu3hBSrGAMxjlswau8= X-Received: by 2002:a05:6830:9c2:b0:606:1e0a:cc8d with SMTP id y2-20020a05683009c200b006061e0acc8dmr12892492ott.265.1653497155571; Wed, 25 May 2022 09:45:55 -0700 (PDT) MIME-Version: 1.0 References: <19fda580-50da-302b-4c4e-0457fb28174b@quicinc.com> In-Reply-To: From: "Ard Biesheuvel" Date: Wed, 25 May 2022 18:45:44 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [edk2-devel] OvmfPkgX64 doesn't build with CLANG38 (clang 14.0.3) NOOPT - undefined reference to `memcpy' To: Pedro Falcato Cc: edk2-devel-groups-io , Rebecca Cran , Ard Biesheuvel , Jiewen Yao , Jordan Justen , Gerd Hoffmann Content-Type: text/plain; charset="UTF-8" On Wed, 25 May 2022 at 18:44, Pedro Falcato wrote: > > > > On Wed, May 25, 2022 at 4:50 PM Ard Biesheuvel wrote: >> >> On Wed, 25 May 2022 at 17:08, Rebecca Cran 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 >> > (07c0c2eb0a5970db614ebce1060fc79d6904bdfd): >> > >> > make: Nothing to be done for 'tbuild'. >> > /usr/bin/ld: /usr/bin/ld: DWARF error: invalid or unhandled FORM value: >> > 0x23 >> > /home/bcran/src/upstream/uefi/edk2/Build/OvmfX64/NOOPT_CLANG38/X64/OvmfPkg/VirtioGpuDxe/VirtioGpu/OUTPUT/VirtioGpuDxe.lib(Gop.obj): >> > 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: https://github.com/tianocore/edk2/blob/916f90baa547b3ebef8fa87c530e2f0c8e35e1e3/OvmfPkg/VirtioGpuDxe/Gop.c#L512 Indeed. We don't support struct assignment in Tianocore code, exactly for this reason.