From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by mx.groups.io with SMTP id smtpd.web09.36553.1634565176672958237 for ; Mon, 18 Oct 2021 06:52:56 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=djvmO5Ab; spf=pass (domain: kernel.org, ip: 198.145.29.99, mailfrom: ardb@kernel.org) Received: by mail.kernel.org (Postfix) with ESMTPSA id 9F53C60FDA for ; Mon, 18 Oct 2021 13:52:54 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1634565174; bh=nTtXD19mhKLcLBgwD05hvH9o2nozuXJ5ToWvHlYNHuk=; h=References:In-Reply-To:From:Date:Subject:To:Cc:From; b=djvmO5AbfwsBM/YWJdRrsQGH4POALX00MM6tAM8XJK8+icuVkDyyFmZ7TscsXAvdg q+CjaJshAoIgGxyWNsJ6bAkaEGm6jGExicEkMf8SxWZMEQ3kLRNOr6O9bXMS5Agwi2 C575NhrzKh8clChIirp4pZSVOnDVSk90QjMCM3b7Bc8DE9V1QdQpgTlc1Z5Z8BG34q 4qhlNsiFPUUXGEoEiCeBD+PpySLquM3agd7aZGsVPhpQIzbOwT7+PQPMCP/RoFY4x8 SQDf87we7/o8roc8JE9BsWVtk+l+auh1T/N5FvHvA2BMY+2ffn5SPd6XQaVq1TXXY/ zeO/N64KQ+IuA== Received: by mail-ot1-f50.google.com with SMTP id x33-20020a9d37a4000000b0054733a85462so4436929otb.10 for ; Mon, 18 Oct 2021 06:52:54 -0700 (PDT) X-Gm-Message-State: AOAM532ljKchdA66TfNsw2G9EZEJu2q8pqatoUSMKml/95xVOpdXmk6i vsAHJJmxUGV+dkwnzT3mpnGiLu4q2yLdq8wq+v4= X-Google-Smtp-Source: ABdhPJzMhzUVXb7z2x0oLzqAvTzyLYu05PdZMDOEoWnm0ApF07QYbAWA4b91dxY5HanaefHZu5yIJJUHBkB2pPwZU7g= X-Received: by 2002:a9d:7b48:: with SMTP id f8mr22377778oto.112.1634565173920; Mon, 18 Oct 2021 06:52:53 -0700 (PDT) MIME-Version: 1.0 References: <50b75bf3cb8e49f74b5522c68fc6d4d9d48f2998.1634238146.git.mhaeuser@posteo.de> In-Reply-To: From: "Ard Biesheuvel" Date: Mon, 18 Oct 2021 15:52:42 +0200 X-Gmail-Original-Message-ID: Message-ID: Subject: Re: [edk2-devel] [PATCH v2 1/1] StandaloneMmPkg: Support CLANGPDB builds To: edk2-devel-groups-io , "Shi, Steven" Cc: Ard Biesheuvel , "mhaeuser@posteo.de" , Sami Mujawar , "Yao, Jiewen" , Supreeth Venkatesh , Vitaly Cheptsov , "Yang, JiyangX" Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable On Mon, 18 Oct 2021 at 03:18, Steven Shi wrote: > > Acked-by: Shi Steven > > > Hello Ard, > Could you review and check-in this patch? It blocks our clang build. > > Merged as #2077 Thanks, Ard. > > > -----Original Message----- > > From: devel@edk2.groups.io On Behalf Of Marvin > > H=C3=A4user > > Sent: Friday, October 15, 2021 3:06 AM > > To: devel@edk2.groups.io > > Cc: Ard Biesheuvel ; Sami Mujawar > > ; Yao, Jiewen ; Supreeth > > Venkatesh ; Vitaly Cheptsov > > ; Shi, Steven ; Yang, > > JiyangX > > Subject: [edk2-devel] [PATCH v2 1/1] StandaloneMmPkg: Support > > CLANGPDB builds > > > > Currently, the flag "-fpie" is passed for all builds with a GCC > > family toolchain, including CLANGPDB. CLANGPDB however does not > > support this flag as it generates PE/COFF files directly. > > > > As the flag is mostly required for ARM-specific self-relocation, drop > > it for other architectures and document the limitation to enable e.g. > > X64 CLANGPDB builds of StandaloneMmCore. > > > > Cc: Ard Biesheuvel > > Cc: Sami Mujawar > > Cc: Jiewen Yao > > Cc: Supreeth Venkatesh > > Cc: Vitaly Cheptsov > > Cc: Steven Shi > > Cc: Jiyang Yang > > Signed-off-by: Marvin H=C3=A4user > > --- > > StandaloneMmPkg/Core/StandaloneMmCore.inf = | 12 > > ++++++++++-- > > > > StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMmC > > oreEntryPoint.inf | 9 ++++++++- > > 2 files changed, 18 insertions(+), 3 deletions(-) > > > > diff --git a/StandaloneMmPkg/Core/StandaloneMmCore.inf > > b/StandaloneMmPkg/Core/StandaloneMmCore.inf > > index 56042b7b39f4..c44b9ff33303 100644 > > --- a/StandaloneMmPkg/Core/StandaloneMmCore.inf > > +++ b/StandaloneMmPkg/Core/StandaloneMmCore.inf > > @@ -76,6 +76,14 @@ [Guids] > > gEfiEventExitBootServicesGuid > > > > gEfiEventReadyToBootGuid > > > > > > > > +# > > > > +# This configuration fails for CLANGPDB, which does not support PIE in= the > > GCC > > > > +# sense. Such however is required for ARM family StandaloneMmCore > > > > +# self-relocation, and thus the CLANGPDB toolchain is unsupported for = ARM > > and > > > > +# AARCH64 for this module. > > > > +# > > > > [BuildOptions] > > > > - GCC:*_*_*_CC_FLAGS =3D -fpie > > > > - GCC:*_*_*_DLINK_FLAGS =3D -Wl,-z,text,-Bsymbolic,-pie > > > > + GCC:*_*_ARM_CC_FLAGS =3D -fpie > > > > + GCC:*_*_ARM_DLINK_FLAGS =3D -Wl,-z,text,-Bsymbolic,-pie > > > > + GCC:*_*_AARCH64_CC_FLAGS =3D -fpie > > > > + GCC:*_*_AARCH64_DLINK_FLAGS =3D -Wl,-z,text,-Bsymbolic,-pie > > > > diff --git > > a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMm > > CoreEntryPoint.inf > > b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMm > > CoreEntryPoint.inf > > index 1762586cfa02..75cfb98c0e75 100644 > > --- > > a/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMm > > CoreEntryPoint.inf > > +++ > > b/StandaloneMmPkg/Library/StandaloneMmCoreEntryPoint/StandaloneMm > > CoreEntryPoint.inf > > @@ -54,5 +54,12 @@ [Guids] > > [FeaturePcd.ARM, FeaturePcd.AARCH64] > > > > gArmTokenSpaceGuid.PcdFfaEnable > > > > > > > > +# > > > > +# This configuration fails for CLANGPDB, which does not support PIE in= the > > GCC > > > > +# sense. Such however is required for ARM family StandaloneMmCore > > > > +# self-relocation, and thus the CLANGPDB toolchain is unsupported for = ARM > > and > > > > +# AARCH64 for this module. > > > > +# > > > > [BuildOptions] > > > > - GCC:*_*_*_CC_FLAGS =3D -fpie > > > > + GCC:*_*_ARM_CC_FLAGS =3D -fpie > > > > + GCC:*_*_AARCH64_CC_FLAGS =3D -fpie > > > > -- > > 2.31.1 > > > > > > > > > > > > > >=20 > >