Re: [edk2-devel] [PATCH v1 1/1] StandaloneMmPkg: To support CLANGPDB build

2021-10-14 Thread Steven Shi
-Original Message- > > > > > From: devel@edk2.groups.io On Behalf Of > Marvin > > > > > Häuser > > > > > Sent: Thursday, October 14, 2021 4:05 PM > > > > > To: Yang, JiyangX ; devel@edk2.groups.io > > > > > Cc: A

Re: [edk2-devel] [PATCH v1 1/1] StandaloneMmPkg: To support CLANGPDB build

2021-10-14 Thread Marvin Häuser
Hey Ard, Thanks for commenting! On 14.10.21 11:09, Ard Biesheuvel wrote: On Thu, 14 Oct 2021 at 11:08, Marvin Häuser wrote: Hey Steven, As I said, I prefer my patch, but this would work too of course. I talked about the PIE stuff with Ard before, so maybe he has an opinion on this? :) (Smal

Re: [edk2-devel] [PATCH v1 1/1] StandaloneMmPkg: To support CLANGPDB build

2021-10-14 Thread Ard Biesheuvel
On Thu, 14 Oct 2021 at 11:08, Marvin Häuser wrote: > > Hey Steven, > > As I said, I prefer my patch, but this would work too of course. > I talked about the PIE stuff with Ard before, so maybe he has an opinion > on this? :) > > (Small correction for my last e-mail, of course we are not *guarantee

Re: [edk2-devel] [PATCH v1 1/1] StandaloneMmPkg: To support CLANGPDB build

2021-10-14 Thread Marvin Häuser
: Ard Biesheuvel ; Sami Mujawar > ; Yao, Jiewen ; Supreeth > Venkatesh ; Vitaly Cheptsov > ; Shi, Steven > Subject: Re: [edk2-devel] [PATCH v1 1/1] StandaloneMmPkg: To support > CLANGPDB build > > Hey Jiyang, > > NO! Please do not. :) > Yes, this fixes build, but

Re: [edk2-devel] [PATCH v1 1/1] StandaloneMmPkg: To support CLANGPDB build

2021-10-14 Thread Steven Shi
gX ; devel@edk2.groups.io > Cc: Ard Biesheuvel ; Sami Mujawar > ; Yao, Jiewen ; Supreeth > Venkatesh ; Vitaly Cheptsov > ; Shi, Steven > Subject: Re: [edk2-devel] [PATCH v1 1/1] StandaloneMmPkg: To support > CLANGPDB build > > Hey Jiyang, > > NO! Please do not. :)

Re: [edk2-devel] [PATCH v1 1/1] StandaloneMmPkg: To support CLANGPDB build

2021-10-14 Thread Marvin Häuser
Hey Jiyang, NO! Please do not. :) Yes, this fixes build, but the AARCH64 core (I did not check ARM) depends on self-relocation as it is loaded in-place at a location unknown at compile-time. PIE helps ensure there are no relocations in .text among other things. I know CLANGPDB does not support

[edk2-devel] [PATCH v1 1/1] StandaloneMmPkg: To support CLANGPDB build

2021-10-13 Thread Jiyang Yang
the flag "-fpie" is passed for all builds with a GCC family toolchain, including CLANGPDB, but CLANGPDB does not support this flag, it will report "clang: error: unsupported option '-fpie' for target 'x86_64-unknown-windows-gnu'". So we add the CLANGPDB option "-fno-pie" later to overwrite it. Cc: