From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail-ed1-f44.google.com (mail-ed1-f44.google.com [209.85.208.44]) by mx.groups.io with SMTP id smtpd.web10.19400.1680161460507918521 for ; Thu, 30 Mar 2023 00:31:00 -0700 Authentication-Results: mx.groups.io; dkim=pass header.i=@9elements.com header.s=google header.b=KZiXtvHB; spf=pass (domain: 9elements.com, ip: 209.85.208.44, mailfrom: sheng.tan@9elements.com) Received: by mail-ed1-f44.google.com with SMTP id cn12so72880664edb.4 for ; Thu, 30 Mar 2023 00:31:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=9elements.com; s=google; t=1680161458; x=1682753458; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:from:to:cc:subject:date:message-id:reply-to; bh=3BZ6NIna2Vtfwlt9qV2fGrmenj7s9WjagK27nAQSTBQ=; b=KZiXtvHBtflmkswjCFVNh1rMhoqrAlcTudoG7K3MZ5cqD/sBb82Pb2xk4h0A3imjON OfBG8t0u24in7GsVScDQFxfvQNIzxuO9gWqZsZuFrKhAn0k3YaS5O9JfJ81l3wDdmm+I VQCXENeVC4i4FrcVI+bv3FpujVdJ4KmnWjMYBO0HRHooYCJ7AGTjwfEk01QZE500EQSu HhRNLrdsem9jEM/s79dEj6q9TfXu/mXXhkPcdrSOh4VypFYOCTkeS2DVaCKeLy/scBqu i0AQfrftm9TePaGyppnl4myM7HtkVKexA7tIOpCgqy2plxwQ6FRWCdWei30+gEakdxcd rZXA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; t=1680161458; x=1682753458; h=cc:to:subject:message-id:date:from:in-reply-to:references :mime-version:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=3BZ6NIna2Vtfwlt9qV2fGrmenj7s9WjagK27nAQSTBQ=; b=V6EayNIsJIlRCNWRY2leInVAlJwHzIM35yEZPYI3Ms4Zz/W7QWgxJchSgjaTmnyxiB QsUMzdWxxDLcgXmGCb5PrxfMoigwFMHsWijwplBN/sYn91L9oRH4P0CGAeleOqunbuI+ r+POMALZwBTE/scYT9Ay5VZfE9IvZmzP6kcOylfLFv4Eqls27mdLhv+cKBaPD7b+4/cL SuDdOyha8uTgNJbedjt1N47m7Icb+o7HFKPgIx57JW9sOX9cZmHSHQheQDr8SyXujpX8 igUxrcUdTFPltEwqNj1Iur8kgMvHKWwnO9zHZr30isuS0gytBr7byuuGXziYorcoL4vY 8t+w== X-Gm-Message-State: AAQBX9dKpNcUmrwtNDSkzvpz3EOHco3GTUMuOgSezBCq6XMHO1B6vkxQ U9F3VQbUAhdSbNZyUtc2DZ4f+wdyUHkTVM/yUQ6Rg0WaywCkLQzw X-Google-Smtp-Source: AKy350byVwCq9OAibD9qxp2olEVJUkBKHi8SN0tb9FFLsVplzhT4aWx28IIECYDfxVlcjvqEmNdLEQVlwBtnXozvhv8= X-Received: by 2002:a17:906:2a15:b0:933:7658:8b44 with SMTP id j21-20020a1709062a1500b0093376588b44mr9912054eje.15.1680161458462; Thu, 30 Mar 2023 00:30:58 -0700 (PDT) MIME-Version: 1.0 References: <20230317140627.1033739-1-patrick.rudolph@9elements.com> <023901d96138$06eeb3b0$14cc1b10$@byosoft.com.cn> In-Reply-To: <023901d96138$06eeb3b0$14cc1b10$@byosoft.com.cn> From: "Sheng Lean Tan" Date: Thu, 30 Mar 2023 09:30:22 +0200 Message-ID: Subject: Re: [edk2-devel] [PATCH 1/3] BaseTools/Conf/tools_def: Fix linking using CLANGDWARF_IA32 To: devel@edk2.groups.io, gaoliming@byosoft.com.cn, rebecca@bsdio.com, "Feng, Bob C" , yuwei.chen@intel.com Cc: patrick.rudolph@9elements.com, gua.guo@intel.com, james.lu@intel.com, mhaeuser@posteo.de, ardb@kernel.org Content-Type: multipart/alternative; boundary="000000000000e5b56c05f8191247" --000000000000e5b56c05f8191247 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable HI Liming, If no further concern, would you mind to help get this patch merged? Thanks! Best Regards, *Lean Sheng Tan* On Tue, 28 Mar 2023 at 07:42, gaoliming via groups.io wrote: > Reviewed-by: Liming Gao > > > -----=E9=82=AE=E4=BB=B6=E5=8E=9F=E4=BB=B6----- > > =E5=8F=91=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io =E4=BB=A3=E8=A1=A8 Patrick > > Rudolph > > =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2023=E5=B9=B43=E6=9C=8817=E6=97= =A5 22:06 > > =E6=8A=84=E9=80=81: devel@edk2.groups.io; guo.dong@intel.com; gua.guo@i= ntel.com; > > james.lu@intel.com; ray.ni@intel.com; mhaeuser@posteo.de; > > ardb@kernel.org > > =E4=B8=BB=E9=A2=98: [edk2-devel] [PATCH 1/3] BaseTools/Conf/tools_def: = Fix linking using > > CLANGDWARF_IA32 > > > > The clang toolchain might default to fPIE/fPIC, which prevents > > lld from linking the objects into a binary. > > > > Specify -fno-pie -fno-pic as done on GCC to fix linking. > > > > Test: > > Building the Universal Payload using the command > > 'python UefiPayloadPkg/UniversalPayloadBuild.py -a IA32' actually > > works. > > > > Signed-off-by: Patrick Rudolph > > Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=3D4356 > > --- > > BaseTools/Conf/tools_def.template | 14 +++++++------- > > 1 file changed, 7 insertions(+), 7 deletions(-) > > > > diff --git a/BaseTools/Conf/tools_def.template > > b/BaseTools/Conf/tools_def.template > > index 471eb67c0c..9b59bd75c3 100755 > > --- a/BaseTools/Conf/tools_def.template > > +++ b/BaseTools/Conf/tools_def.template > > @@ -2888,7 +2888,7 @@ DEFINE CLANGDWARF_X64_DLINK2_FLAGS > > =3D -Wl,--defsym=3DPECOFF_HEADER_SIZE=3D0x22 > > *_CLANGDWARF_IA32_RC_PATH =3D > > DEF(CLANGDWARF_IA32_PREFIX)llvm-rc > > > > > > > > *_CLANGDWARF_IA32_ASLCC_FLAGS =3D DEF(GCC_ASLCC_FLAGS) > > -m32 -fno-lto DEF(CLANG38_IA32_TARGET) > > > > -*_CLANGDWARF_IA32_ASLDLINK_FLAGS =3D > > DEF(CLANGDWARF_IA32_X64_ASLDLINK_FLAGS) -Wl,-m,elf_i386 -fuse-ld=3Dlld > > > > +*_CLANGDWARF_IA32_ASLDLINK_FLAGS =3D > > DEF(CLANGDWARF_IA32_X64_ASLDLINK_FLAGS) -Wl,-m,elf_i386 -fuse-ld=3Dlld > > -no-pie > > > > *_CLANGDWARF_IA32_ASM_FLAGS =3D DEF(GCC5_ASM_FLAGS) > > -m32 -march=3Di386 DEF(CLANG38_IA32_TARGET) > > > > *_CLANGDWARF_IA32_RC_FLAGS =3D > > DEF(GCC_IA32_RC_FLAGS) > > > > *_CLANGDWARF_IA32_OBJCOPY_FLAGS =3D > > > > @@ -2897,17 +2897,17 @@ DEFINE CLANGDWARF_X64_DLINK2_FLAGS > > =3D -Wl,--defsym=3DPECOFF_HEADER_SIZE=3D0x22 > > *_CLANGDWARF_IA32_ASLPP_FLAGS =3D DEF(GCC_ASLPP_FLAGS) > > DEF(CLANG38_IA32_TARGET) > > > > *_CLANGDWARF_IA32_VFRPP_FLAGS =3D DEF(GCC_VFRPP_FLAGS) > > DEF(CLANG38_IA32_TARGET) > > > > > > > > -DEBUG_CLANGDWARF_IA32_CC_FLAGS =3D > > DEF(CLANG38_ALL_CC_FLAGS) -m32 -Oz -flto -march=3Di586 > > DEF(CLANG38_IA32_TARGET) -g -malign-double > > > > +DEBUG_CLANGDWARF_IA32_CC_FLAGS =3D > > DEF(CLANG38_ALL_CC_FLAGS) -fno-pic -fno-pie -m32 -Oz -flto -march=3Di58= 6 > > DEF(CLANG38_IA32_TARGET) -g -malign-double > > > > DEBUG_CLANGDWARF_IA32_DLINK_FLAGS =3D > > DEF(CLANGDWARF_IA32_X64_DLINK_FLAGS) -flto -Wl,-O3 -Wl,-melf_i386 > > -Wl,--oformat,elf32-i386 > > > > -DEBUG_CLANGDWARF_IA32_DLINK2_FLAGS =3D > > DEF(CLANGDWARF_IA32_DLINK2_FLAGS) -O3 -fuse-ld=3Dlld > > > > +DEBUG_CLANGDWARF_IA32_DLINK2_FLAGS =3D > > DEF(CLANGDWARF_IA32_DLINK2_FLAGS) -O3 -fuse-ld=3Dlld -no-pie > > > > > > > > -RELEASE_CLANGDWARF_IA32_CC_FLAGS =3D > > DEF(CLANG38_ALL_CC_FLAGS) -m32 -Oz -flto -march=3Di586 > > DEF(CLANG38_IA32_TARGET) -malign-double > > > > +RELEASE_CLANGDWARF_IA32_CC_FLAGS =3D > > DEF(CLANG38_ALL_CC_FLAGS) -fno-pic -fno-pie -m32 -Oz -flto -march=3Di58= 6 > > DEF(CLANG38_IA32_TARGET) -malign-double > > > > RELEASE_CLANGDWARF_IA32_DLINK_FLAGS =3D > > DEF(CLANGDWARF_IA32_X64_DLINK_FLAGS) -flto -Wl,-O3 -Wl,-melf_i386 > > -Wl,--oformat,elf32-i386 > > > > -RELEASE_CLANGDWARF_IA32_DLINK2_FLAGS =3D > > DEF(CLANGDWARF_IA32_DLINK2_FLAGS) -O3 -fuse-ld=3Dlld > > > > +RELEASE_CLANGDWARF_IA32_DLINK2_FLAGS =3D > > DEF(CLANGDWARF_IA32_DLINK2_FLAGS) -O3 -fuse-ld=3Dlld -no-pie > > > > > > > > -NOOPT_CLANGDWARF_IA32_CC_FLAGS =3D > > DEF(CLANG38_ALL_CC_FLAGS) -m32 -O0 -march=3Di586 > > DEF(CLANG38_IA32_TARGET) -g -malign-double > > > > +NOOPT_CLANGDWARF_IA32_CC_FLAGS =3D > > DEF(CLANG38_ALL_CC_FLAGS) -fno-pic -fno-pie -m32 -O0 -march=3Di586 > > DEF(CLANG38_IA32_TARGET) -g -malign-double > > > > NOOPT_CLANGDWARF_IA32_DLINK_FLAGS =3D > > DEF(CLANGDWARF_IA32_X64_DLINK_FLAGS) -Wl,-O0 -Wl,-melf_i386 > > -Wl,--oformat,elf32-i386 > > > > -NOOPT_CLANGDWARF_IA32_DLINK2_FLAGS =3D > > DEF(CLANGDWARF_IA32_DLINK2_FLAGS) -O0 -fuse-ld=3Dlld > > > > +NOOPT_CLANGDWARF_IA32_DLINK2_FLAGS =3D > > DEF(CLANGDWARF_IA32_DLINK2_FLAGS) -O0 -fuse-ld=3Dlld -no-pie > > > > > > > > ########################## > > > > # CLANGDWARF X64 definitions > > > > -- > > 2.39.1 > > > > > > > > -=3D-=3D-=3D-=3D-=3D-=3D > > Groups.io Links: You receive all messages sent to this group. > > View/Reply Online (#101340): > > https://edk2.groups.io/g/devel/message/101340 > > Mute This Topic: https://groups.io/mt/97673648/4905953 > > Group Owner: devel+owner@edk2.groups.io > > Unsubscribe: https://edk2.groups.io/g/devel/unsub > > [gaoliming@byosoft.com.cn] > > -=3D-=3D-=3D-=3D-=3D-=3D > > > > > > > >=20 > > > --000000000000e5b56c05f8191247 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable
HI Liming,
If no further=C2=A0concern, would you mind = to help get this patch merged?
Thanks!
<= div dir=3D"ltr">

Be= st Regards,
Lean Sheng Tan


On Tue, 28 Mar 2023 at 07:42, gaoliming via= groups.io <gaoliming=3Dbyosoft.com.cn@groups.io> wrote:
Reviewed-by: Liming Ga= o <gaolimi= ng@byosoft.com.cn>

> -----=E9=82=AE=E4=BB=B6=E5=8E=9F=E4=BB=B6-----
> =E5=8F=91=E4=BB=B6=E4=BA=BA: devel@edk2.groups.io <devel@edk2.groups.io> =E4=BB=A3=E8=A1= =A8 Patrick
> Rudolph
> =E5=8F=91=E9=80=81=E6=97=B6=E9=97=B4: 2023=E5=B9=B43=E6=9C=8817=E6=97= =A5 22:06
> =E6=8A=84=E9=80=81: devel@edk2.groups.io; guo.dong@intel.com; gua.guo@intel.com;
> james.lu@intel= .com; ray.ni@inte= l.com; mhaeuser= @posteo.de;
> ardb@kernel.org
> =E4=B8=BB=E9=A2=98: [edk2-devel] [PATCH 1/3] BaseTools/Conf/tools_def:= Fix linking using
> CLANGDWARF_IA32
>
> The clang toolchain might default to fPIE/fPIC, which prevents
> lld from linking the objects into a binary.
>
> Specify -fno-pie -fno-pic as done on GCC to fix linking.
>
> Test:
> Building the Universal Payload using the command
> 'python UefiPayloadPkg/UniversalPayloadBuild.py -a IA32' actua= lly
> works.
>
> Signed-off-by: Patrick Rudolph <
patrick.rudolph@9elements.com>
> Ref: https://bugzilla.tianocore.org/show_b= ug.cgi?id=3D4356
> ---
>=C2=A0 BaseTools/Conf/tools_def.template | 14 +++++++-------
>=C2=A0 1 file changed, 7 insertions(+), 7 deletions(-)
>
> diff --git a/BaseTools/Conf/tools_def.template
> b/BaseTools/Conf/tools_def.template
> index 471eb67c0c..9b59bd75c3 100755
> --- a/BaseTools/Conf/tools_def.template
> +++ b/BaseTools/Conf/tools_def.template
> @@ -2888,7 +2888,7 @@ DEFINE CLANGDWARF_X64_DLINK2_FLAGS
> =3D -Wl,--defsym=3DPECOFF_HEADER_SIZE=3D0x22
>=C2=A0 *_CLANGDWARF_IA32_RC_PATH=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0 =3D
> DEF(CLANGDWARF_IA32_PREFIX)llvm-rc
>
>
>
>=C2=A0 *_CLANGDWARF_IA32_ASLCC_FLAGS=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =3D DEF(GCC_ASLCC_FLAGS)
> -m32 -fno-lto DEF(CLANG38_IA32_TARGET)
>
> -*_CLANGDWARF_IA32_ASLDLINK_FLAGS=C2=A0 =C2=A0 =C2=A0 =C2=A0=3D
> DEF(CLANGDWARF_IA32_X64_ASLDLINK_FLAGS) -Wl,-m,elf_i386 -fuse-ld=3Dlld=
>
> +*_CLANGDWARF_IA32_ASLDLINK_FLAGS=C2=A0 =C2=A0 =C2=A0 =C2=A0=3D
> DEF(CLANGDWARF_IA32_X64_ASLDLINK_FLAGS) -Wl,-m,elf_i386 -fuse-ld=3Dlld=
> -no-pie
>
>=C2=A0 *_CLANGDWARF_IA32_ASM_FLAGS=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =C2=A0 =3D DEF(GCC5_ASM_FLAGS)
> -m32 -march=3Di386 DEF(CLANG38_IA32_TARGET)
>
>=C2=A0 *_CLANGDWARF_IA32_RC_FLAGS=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2= =A0 =C2=A0=3D
> DEF(GCC_IA32_RC_FLAGS)
>
>=C2=A0 *_CLANGDWARF_IA32_OBJCOPY_FLAGS=C2=A0 =C2=A0 =C2=A0 =C2=A0 =3D >
> @@ -2897,17 +2897,17 @@ DEFINE CLANGDWARF_X64_DLINK2_FLAGS
> =3D -Wl,--defsym=3DPECOFF_HEADER_SIZE=3D0x22
>=C2=A0 *_CLANGDWARF_IA32_ASLPP_FLAGS=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =3D DEF(GCC_ASLPP_FLAGS)
> DEF(CLANG38_IA32_TARGET)
>
>=C2=A0 *_CLANGDWARF_IA32_VFRPP_FLAGS=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 = =3D DEF(GCC_VFRPP_FLAGS)
> DEF(CLANG38_IA32_TARGET)
>
>
>
> -DEBUG_CLANGDWARF_IA32_CC_FLAGS=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=3D > DEF(CLANG38_ALL_CC_FLAGS) -m32 -Oz -flto -march=3Di586
> DEF(CLANG38_IA32_TARGET) -g -malign-double
>
> +DEBUG_CLANGDWARF_IA32_CC_FLAGS=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=3D > DEF(CLANG38_ALL_CC_FLAGS) -fno-pic -fno-pie -m32 -Oz -flto -march=3Di5= 86
> DEF(CLANG38_IA32_TARGET) -g -malign-double
>
>=C2=A0 DEBUG_CLANGDWARF_IA32_DLINK_FLAGS=C2=A0 =C2=A0 =C2=A0 =3D
> DEF(CLANGDWARF_IA32_X64_DLINK_FLAGS) -flto -Wl,-O3 -Wl,-melf_i386
> -Wl,--oformat,elf32-i386
>
> -DEBUG_CLANGDWARF_IA32_DLINK2_FLAGS=C2=A0 =C2=A0 =C2=A0=3D
> DEF(CLANGDWARF_IA32_DLINK2_FLAGS) -O3 -fuse-ld=3Dlld
>
> +DEBUG_CLANGDWARF_IA32_DLINK2_FLAGS=C2=A0 =C2=A0 =C2=A0=3D
> DEF(CLANGDWARF_IA32_DLINK2_FLAGS) -O3 -fuse-ld=3Dlld -no-pie
>
>
>
> -RELEASE_CLANGDWARF_IA32_CC_FLAGS=C2=A0 =C2=A0 =C2=A0 =C2=A0=3D
> DEF(CLANG38_ALL_CC_FLAGS) -m32 -Oz -flto -march=3Di586
> DEF(CLANG38_IA32_TARGET) -malign-double
>
> +RELEASE_CLANGDWARF_IA32_CC_FLAGS=C2=A0 =C2=A0 =C2=A0 =C2=A0=3D
> DEF(CLANG38_ALL_CC_FLAGS) -fno-pic -fno-pie -m32 -Oz -flto -march=3Di5= 86
> DEF(CLANG38_IA32_TARGET) -malign-double
>
>=C2=A0 RELEASE_CLANGDWARF_IA32_DLINK_FLAGS=C2=A0 =C2=A0 =3D
> DEF(CLANGDWARF_IA32_X64_DLINK_FLAGS) -flto -Wl,-O3 -Wl,-melf_i386
> -Wl,--oformat,elf32-i386
>
> -RELEASE_CLANGDWARF_IA32_DLINK2_FLAGS=C2=A0 =C2=A0=3D
> DEF(CLANGDWARF_IA32_DLINK2_FLAGS) -O3 -fuse-ld=3Dlld
>
> +RELEASE_CLANGDWARF_IA32_DLINK2_FLAGS=C2=A0 =C2=A0=3D
> DEF(CLANGDWARF_IA32_DLINK2_FLAGS) -O3 -fuse-ld=3Dlld -no-pie
>
>
>
> -NOOPT_CLANGDWARF_IA32_CC_FLAGS=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=3D > DEF(CLANG38_ALL_CC_FLAGS) -m32 -O0 -march=3Di586
> DEF(CLANG38_IA32_TARGET) -g -malign-double
>
> +NOOPT_CLANGDWARF_IA32_CC_FLAGS=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=3D > DEF(CLANG38_ALL_CC_FLAGS) -fno-pic -fno-pie -m32 -O0 -march=3Di586
> DEF(CLANG38_IA32_TARGET) -g -malign-double
>
>=C2=A0 NOOPT_CLANGDWARF_IA32_DLINK_FLAGS=C2=A0 =C2=A0 =C2=A0 =3D
> DEF(CLANGDWARF_IA32_X64_DLINK_FLAGS) -Wl,-O0 -Wl,-melf_i386
> -Wl,--oformat,elf32-i386
>
> -NOOPT_CLANGDWARF_IA32_DLINK2_FLAGS=C2=A0 =C2=A0 =C2=A0=3D
> DEF(CLANGDWARF_IA32_DLINK2_FLAGS) -O0 -fuse-ld=3Dlld
>
> +NOOPT_CLANGDWARF_IA32_DLINK2_FLAGS=C2=A0 =C2=A0 =C2=A0=3D
> DEF(CLANGDWARF_IA32_DLINK2_FLAGS) -O0 -fuse-ld=3Dlld -no-pie
>
>
>
>=C2=A0 ##########################
>
>=C2=A0 # CLANGDWARF X64 definitions
>
> --
> 2.39.1
>
>
>
> -=3D-=3D-=3D-=3D-=3D-=3D
> Groups.io Links: You receive all messages sent to this group.
> View/Reply Online (#101340):
> https://edk2.groups.io/g/devel/message/101340<= br> > Mute This Topic: https://groups.io/mt/97673648/4905953=
> Group Owner: devel+owner@edk2.groups.io
> Unsubscribe: https://edk2.groups.io/g/devel/unsub
> [gaolimi= ng@byosoft.com.cn]
> -=3D-=3D-=3D-=3D-=3D-=3D
>








--000000000000e5b56c05f8191247--