Jordan, Andrew, I will defer to you to review the patch. Thanks, Ray
> -----Original Message----- > From: LiuYu <li...@greatwall.com.cn> > Sent: Friday, September 25, 2020 1:49 PM > To: Justen, Jordan L <jordan.l.jus...@intel.com>; af...@apple.com; Ni, Ray > <ray...@intel.com> > Cc: devel@edk2.groups.io; LiuYu <li...@greatwall.com.cn> > Subject: [edk2-devel][PATCH] EmulatorPkg/Unix Prevents the compiler form > optimizing unused variable > > gInXcode is only used by GDB script and if optimization is turned on then > compiler > treats this variable as unused so it can't been linked in the final object. > > Signed-off-by: LiuYu <li...@greatwall.com.cn> > --- > EmulatorPkg/Unix/Host/Host.c | 2 +- > 1 file changed, 1 insertion(+), 1 deletion(-) > > diff --git a/EmulatorPkg/Unix/Host/Host.c b/EmulatorPkg/Unix/Host/Host.c > index b4e5510613..b851264c8e 100644 > --- a/EmulatorPkg/Unix/Host/Host.c > +++ b/EmulatorPkg/Unix/Host/Host.c > @@ -54,7 +54,7 @@ IMAGE_CONTEXT_TO_MOD_HANDLE *mImageContextModHandleArray = > NULL; > EFI_PEI_PPI_DESCRIPTOR *gPpiList; > > > -int gInXcode = 0; > +int gInXcode __attribute__((used)) = 0; > > > /*++ > -- > 2.20.1 -=-=-=-=-=-=-=-=-=-=-=- Groups.io Links: You receive all messages sent to this group. View/Reply Online (#65619): https://edk2.groups.io/g/devel/message/65619 Mute This Topic: https://groups.io/mt/77074006/21656 Group Owner: devel+ow...@edk2.groups.io Unsubscribe: https://edk2.groups.io/g/devel/unsub [arch...@mail-archive.com] -=-=-=-=-=-=-=-=-=-=-=-