Message ID | 20220517014614.148223-1-raj.khem@gmail.com |
---|---|
State | New |
Headers | show |
Series | sbsa-acs: Refresh GCC 12 patches | expand |
On Mon, May 16, 2022 at 06:46:14PM -0700, Khem Raj wrote: > Current patches do not apply cleanly. This one fails for me as well https://gitlab.com/jonmason00/meta-arm/-/jobs/2467458095 I had one I was testing overnight that works. I'll send it out shortly. Thanks, Jon > > Signed-off-by: Khem Raj <raj.khem@gmail.com> > --- > .../0001-BaseTools-fix-gcc12-warning-1.patch | 35 ++++++++----------- > .../0001-BaseTools-fix-gcc12-warning.patch | 32 ++++++++--------- > 2 files changed, 31 insertions(+), 36 deletions(-) > > diff --git a/meta-arm/recipes-bsp/uefi/sbsa-acs/0001-BaseTools-fix-gcc12-warning-1.patch b/meta-arm/recipes-bsp/uefi/sbsa-acs/0001-BaseTools-fix-gcc12-warning-1.patch > index 565ba11..175dfa7 100644 > --- a/meta-arm/recipes-bsp/uefi/sbsa-acs/0001-BaseTools-fix-gcc12-warning-1.patch > +++ b/meta-arm/recipes-bsp/uefi/sbsa-acs/0001-BaseTools-fix-gcc12-warning-1.patch > @@ -27,25 +27,20 @@ Reviewed-by: Bob Feng <bob.c.feng@intel.com> > BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaEnc.c | 3 ++- > 1 file changed, 2 insertions(+), 1 deletion(-) > > -diff --git a/BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaEnc.c b/BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaEnc.c > -index 4e9b499f8d..4b9f5fa692 100644 > --- a/BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaEnc.c > +++ b/BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaEnc.c > -@@ -2825,12 +2825,13 @@ SRes LzmaEnc_CodeOneMemBlock(CLzmaEncHandle pp, BoolInt reInit, > - > - nowPos64 = p->nowPos64; > - RangeEnc_Init(&p->rc); > -- p->rc.outStream = &outStream.vt; > - > - if (desiredPackSize == 0) > - return SZ_ERROR_OUTPUT_EOF; > - > -+ p->rc.outStream = &outStream.vt; > - res = LzmaEnc_CodeOneBlock(p, desiredPackSize, *unpackSize); > -+ p->rc.outStream = NULL; > - > - *unpackSize = (UInt32)(p->nowPos64 - nowPos64); > - *destLen -= outStream.rem; > --- > -2.36.1 > - > +@@ -2825,12 +2825,13 @@ SRes LzmaEnc_CodeOneMemBlock(CLzmaEncHan > + > + nowPos64 = p->nowPos64; > + RangeEnc_Init(&p->rc); > +- p->rc.outStream = &outStream.vt; > + > + if (desiredPackSize == 0) > + return SZ_ERROR_OUTPUT_EOF; > + > ++ p->rc.outStream = &outStream.vt; > + res = LzmaEnc_CodeOneBlock(p, desiredPackSize, *unpackSize); > ++ p->rc.outStream = NULL; > + > + *unpackSize = (UInt32)(p->nowPos64 - nowPos64); > + *destLen -= outStream.rem; > diff --git a/meta-arm/recipes-bsp/uefi/sbsa-acs/0001-BaseTools-fix-gcc12-warning.patch b/meta-arm/recipes-bsp/uefi/sbsa-acs/0001-BaseTools-fix-gcc12-warning.patch > index f2142de..ebdc78b 100644 > --- a/meta-arm/recipes-bsp/uefi/sbsa-acs/0001-BaseTools-fix-gcc12-warning.patch > +++ b/meta-arm/recipes-bsp/uefi/sbsa-acs/0001-BaseTools-fix-gcc12-warning.patch > @@ -21,22 +21,22 @@ Reviewed-by: Bob Feng <bob.c.feng@intel.com> > --- a/BaseTools/Source/C/GenFfs/GenFfs.c > +++ b/BaseTools/Source/C/GenFfs/GenFfs.c > @@ -542,7 +542,7 @@ GetAlignmentFromFile(char *InFile, UINT3 > - PeFileBuffer = (UINT8 *) malloc (PeFileSize); > - if (PeFileBuffer == NULL) { > - fclose (InFileHandle); > -- Error(NULL, 0, 4001, "Resource", "memory cannot be allocated of %s", InFileHandle); > -+ Error(NULL, 0, 4001, "Resource", "memory cannot be allocated for %s", InFile); > - return EFI_OUT_OF_RESOURCES; > - } > - fread (PeFileBuffer, sizeof (UINT8), PeFileSize, InFileHandle); > + PeFileBuffer = (UINT8 *) malloc (PeFileSize); > + if (PeFileBuffer == NULL) { > + fclose (InFileHandle); > +- Error(NULL, 0, 4001, "Resource", "memory cannot be allocated of %s", InFileHandle); > ++ Error(NULL, 0, 4001, "Resource", "memory cannot be allocated for %s", InFile); > + return EFI_OUT_OF_RESOURCES; > + } > + fread (PeFileBuffer, sizeof (UINT8), PeFileSize, InFileHandle); > --- a/BaseTools/Source/C/GenSec/GenSec.c > +++ b/BaseTools/Source/C/GenSec/GenSec.c > @@ -1062,7 +1062,7 @@ GetAlignmentFromFile(char *InFile, UINT3 > - PeFileBuffer = (UINT8 *) malloc (PeFileSize); > - if (PeFileBuffer == NULL) { > - fclose (InFileHandle); > -- Error(NULL, 0, 4001, "Resource", "memory cannot be allocated of %s", InFileHandle); > -+ Error(NULL, 0, 4001, "Resource", "memory cannot be allocated for %s", InFile); > - return EFI_OUT_OF_RESOURCES; > - } > - fread (PeFileBuffer, sizeof (UINT8), PeFileSize, InFileHandle); > + PeFileBuffer = (UINT8 *) malloc (PeFileSize); > + if (PeFileBuffer == NULL) { > + fclose (InFileHandle); > +- Error(NULL, 0, 4001, "Resource", "memory cannot be allocated of %s", InFileHandle); > ++ Error(NULL, 0, 4001, "Resource", "memory cannot be allocated for %s", InFile); > + return EFI_OUT_OF_RESOURCES; > + } > + fread (PeFileBuffer, sizeof (UINT8), PeFileSize, InFileHandle); > -- > 2.36.1 > >
diff --git a/meta-arm/recipes-bsp/uefi/sbsa-acs/0001-BaseTools-fix-gcc12-warning-1.patch b/meta-arm/recipes-bsp/uefi/sbsa-acs/0001-BaseTools-fix-gcc12-warning-1.patch index 565ba11..175dfa7 100644 --- a/meta-arm/recipes-bsp/uefi/sbsa-acs/0001-BaseTools-fix-gcc12-warning-1.patch +++ b/meta-arm/recipes-bsp/uefi/sbsa-acs/0001-BaseTools-fix-gcc12-warning-1.patch @@ -27,25 +27,20 @@ Reviewed-by: Bob Feng <bob.c.feng@intel.com> BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaEnc.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) -diff --git a/BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaEnc.c b/BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaEnc.c -index 4e9b499f8d..4b9f5fa692 100644 --- a/BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaEnc.c +++ b/BaseTools/Source/C/LzmaCompress/Sdk/C/LzmaEnc.c -@@ -2825,12 +2825,13 @@ SRes LzmaEnc_CodeOneMemBlock(CLzmaEncHandle pp, BoolInt reInit, - - nowPos64 = p->nowPos64; - RangeEnc_Init(&p->rc); -- p->rc.outStream = &outStream.vt; - - if (desiredPackSize == 0) - return SZ_ERROR_OUTPUT_EOF; - -+ p->rc.outStream = &outStream.vt; - res = LzmaEnc_CodeOneBlock(p, desiredPackSize, *unpackSize); -+ p->rc.outStream = NULL; - - *unpackSize = (UInt32)(p->nowPos64 - nowPos64); - *destLen -= outStream.rem; --- -2.36.1 - +@@ -2825,12 +2825,13 @@ SRes LzmaEnc_CodeOneMemBlock(CLzmaEncHan + + nowPos64 = p->nowPos64; + RangeEnc_Init(&p->rc); +- p->rc.outStream = &outStream.vt; + + if (desiredPackSize == 0) + return SZ_ERROR_OUTPUT_EOF; + ++ p->rc.outStream = &outStream.vt; + res = LzmaEnc_CodeOneBlock(p, desiredPackSize, *unpackSize); ++ p->rc.outStream = NULL; + + *unpackSize = (UInt32)(p->nowPos64 - nowPos64); + *destLen -= outStream.rem; diff --git a/meta-arm/recipes-bsp/uefi/sbsa-acs/0001-BaseTools-fix-gcc12-warning.patch b/meta-arm/recipes-bsp/uefi/sbsa-acs/0001-BaseTools-fix-gcc12-warning.patch index f2142de..ebdc78b 100644 --- a/meta-arm/recipes-bsp/uefi/sbsa-acs/0001-BaseTools-fix-gcc12-warning.patch +++ b/meta-arm/recipes-bsp/uefi/sbsa-acs/0001-BaseTools-fix-gcc12-warning.patch @@ -21,22 +21,22 @@ Reviewed-by: Bob Feng <bob.c.feng@intel.com> --- a/BaseTools/Source/C/GenFfs/GenFfs.c +++ b/BaseTools/Source/C/GenFfs/GenFfs.c @@ -542,7 +542,7 @@ GetAlignmentFromFile(char *InFile, UINT3 - PeFileBuffer = (UINT8 *) malloc (PeFileSize); - if (PeFileBuffer == NULL) { - fclose (InFileHandle); -- Error(NULL, 0, 4001, "Resource", "memory cannot be allocated of %s", InFileHandle); -+ Error(NULL, 0, 4001, "Resource", "memory cannot be allocated for %s", InFile); - return EFI_OUT_OF_RESOURCES; - } - fread (PeFileBuffer, sizeof (UINT8), PeFileSize, InFileHandle); + PeFileBuffer = (UINT8 *) malloc (PeFileSize); + if (PeFileBuffer == NULL) { + fclose (InFileHandle); +- Error(NULL, 0, 4001, "Resource", "memory cannot be allocated of %s", InFileHandle); ++ Error(NULL, 0, 4001, "Resource", "memory cannot be allocated for %s", InFile); + return EFI_OUT_OF_RESOURCES; + } + fread (PeFileBuffer, sizeof (UINT8), PeFileSize, InFileHandle); --- a/BaseTools/Source/C/GenSec/GenSec.c +++ b/BaseTools/Source/C/GenSec/GenSec.c @@ -1062,7 +1062,7 @@ GetAlignmentFromFile(char *InFile, UINT3 - PeFileBuffer = (UINT8 *) malloc (PeFileSize); - if (PeFileBuffer == NULL) { - fclose (InFileHandle); -- Error(NULL, 0, 4001, "Resource", "memory cannot be allocated of %s", InFileHandle); -+ Error(NULL, 0, 4001, "Resource", "memory cannot be allocated for %s", InFile); - return EFI_OUT_OF_RESOURCES; - } - fread (PeFileBuffer, sizeof (UINT8), PeFileSize, InFileHandle); + PeFileBuffer = (UINT8 *) malloc (PeFileSize); + if (PeFileBuffer == NULL) { + fclose (InFileHandle); +- Error(NULL, 0, 4001, "Resource", "memory cannot be allocated of %s", InFileHandle); ++ Error(NULL, 0, 4001, "Resource", "memory cannot be allocated for %s", InFile); + return EFI_OUT_OF_RESOURCES; + } + fread (PeFileBuffer, sizeof (UINT8), PeFileSize, InFileHandle);
Current patches do not apply cleanly. Signed-off-by: Khem Raj <raj.khem@gmail.com> --- .../0001-BaseTools-fix-gcc12-warning-1.patch | 35 ++++++++----------- .../0001-BaseTools-fix-gcc12-warning.patch | 32 ++++++++--------- 2 files changed, 31 insertions(+), 36 deletions(-)