boot/edk2: fix gcc 11 Werror
PATCH 1/1 boot/edk2: fix gcc 11 Werror
Backport a patch [1] included in edk2-stable202202 release.
Fixes:
https://gitlab.com/kubu93/buildroot/-/jobs/2510255569
[1] https://github.com/tianocore/edk2/commit/ae8272ef787d80950803c521a13a308651bdc62e
--- ...ePkg-UsbBusDxe-fix-NOOPT-build-error.patch | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 boot/edk2/0001-MdeModulePkg-UsbBusDxe-fix-NOOPT-build-error.patch
boot/edk2/0001-MdeModulePkg-UsbBusDxe-fix-NOOPT-build-error.patch new file +48 -0
@@ -0,0 +1,48 @@ +From 59aa67f7a4d8efc564b46fe467aaf6eccec17183 Mon Sep 17 00:00:00 2001 +From: Gerd Hoffmann <[email protected]> +Date: Mon, 20 Dec 2021 22:32:38 +0800 +Subject: [PATCH] MdeModulePkg/UsbBusDxe: fix NOOPT build error + +gcc-11 (fedora 35): + +/home/kraxel/projects/edk2/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c: In function ?UsbIoBulkTransfer?: +/home/kraxel/projects/edk2/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c:277:12: error: ?UsbHcBulkTransfer? accessing 80 bytes in a region of size 8 [-Werror=stringop-overflow=] + +Signed-off-by: Gerd Hoffmann <[email protected]> +Reviewed-by: Hao A Wu <[email protected]> +(cherry picked from commit ae8272ef787d80950803c521a13a308651bdc62e) +Signed-off-by: Romain Naour <[email protected]> +--- + MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.c | 2 +- + MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.h | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.c b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.c +index 7529e03e85..b2ce97ca37 100644 +--- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.c ++++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.c +@@ -285,7 +285,7 @@ UsbHcBulkTransfer ( + IN UINT8 DevSpeed, + IN UINTN MaxPacket, + IN UINT8 BufferNum, +- IN OUT VOID *Data[EFI_USB_MAX_BULK_BUFFER_NUM], ++ IN OUT VOID *Data[], + IN OUT UINTN *DataLength, + IN OUT UINT8 *DataToggle, + IN UINTN TimeOut, +diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.h b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.h +index 1d2b8a6174..1316a5981f 100644 +--- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.h ++++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.h +@@ -149,7 +149,7 @@ UsbHcBulkTransfer ( + IN UINT8 DevSpeed, + IN UINTN MaxPacket, + IN UINT8 BufferNum, +- IN OUT VOID *Data[EFI_USB_MAX_BULK_BUFFER_NUM], ++ IN OUT VOID *Data[], + IN OUT UINTN *DataLength, + IN OUT UINT8 *DataToggle, + IN UINTN TimeOut, +-- +2.35.3 +
Signature · 6 lines
2.35.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Yann E. MORIN
AppliedRomain, All,
On 2022-05-27 13:21 +0200, Romain Naour spake thusly:
Quoted 9 lines
Backport a patch [1] included in edk2-stable202202 release.
Fixes:
https://gitlab.com/kubu93/buildroot/-/jobs/2510255569[1] https://github.com/tianocore/edk2/commit/ae8272ef787d80950803c521a13a308651bdc62e
Signed-off-by Romain Naour <[email protected]>Cc Dick Olsson <[email protected]>
Applied to master, thanks.
Regards,
Yann E. MORIN.
Quoted 66 lines
--- ...ePkg-UsbBusDxe-fix-NOOPT-build-error.patch | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 boot/edk2/0001-MdeModulePkg-UsbBusDxe-fix-NOOPT-build-error.patchboot/edk2/0001-MdeModulePkg-UsbBusDxe-fix-NOOPT-build-error.patch new file +48
-0@@ -0,0 +1,48 @@ +From 59aa67f7a4d8efc564b46fe467aaf6eccec17183 Mon Sep 17 00:00:00 2001 +From: Gerd Hoffmann <[email protected]> +Date: Mon, 20 Dec 2021 22:32:38 +0800 +Subject: [PATCH] MdeModulePkg/UsbBusDxe: fix NOOPT build error + +gcc-11 (fedora 35): + +/home/kraxel/projects/edk2/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c: In function ?UsbIoBulkTransfer?: +/home/kraxel/projects/edk2/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c:277:12: error: ?UsbHcBulkTransfer? accessing 80 bytes in a region of size 8 [-Werror=stringop-overflow=] + +Signed-off-by: Gerd Hoffmann <[email protected]> +Reviewed-by: Hao A Wu <[email protected]> +(cherry picked from commit ae8272ef787d80950803c521a13a308651bdc62e) +Signed-off-by: Romain Naour <[email protected]> +--- + MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.c | 2 +- + MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.h | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.c b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.c +index 7529e03e85..b2ce97ca37 100644 +--- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.c ++++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.c +@@ -285,7 +285,7 @@ UsbHcBulkTransfer ( + IN UINT8 DevSpeed, + IN UINTN MaxPacket, + IN UINT8 BufferNum, +- IN OUT VOID *Data[EFI_USB_MAX_BULK_BUFFER_NUM], ++ IN OUT VOID *Data[], + IN OUT UINTN *DataLength, + IN OUT UINT8 *DataToggle, + IN UINTN TimeOut, +diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.h b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.h +index 1d2b8a6174..1316a5981f 100644 +--- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.h ++++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.h +@@ -149,7 +149,7 @@ UsbHcBulkTransfer ( + IN UINT8 DevSpeed, + IN UINTN MaxPacket, + IN UINT8 BufferNum, +- IN OUT VOID *Data[EFI_USB_MAX_BULK_BUFFER_NUM], ++ IN OUT VOID *Data[], + IN OUT UINTN *DataLength, + IN OUT UINT8 *DataToggle, + IN UINTN TimeOut, +-- +2.35.3 +Signature · 6 lines
2.35.3 _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Hello Yann,
Le 28/05/2022 à 12:05, Yann E. MORIN a écrit :
Quoted 8 lines
Romain, All,
On 2022-05-27 13:21 +0200, Romain Naour spake thusly:
Quoted 5 lines
Backport a patch [1] included in edk2-stable202202 release.
Quoted 6 lines
Quoted 4 lines
[1] https://github.com/tianocore/edk2/commit/ae8272ef787d80950803c521a13a308651bdc62e
Signed-off-by Romain Naour <[email protected]>Cc Dick Olsson <[email protected]>Applied to master, thanks.
It seems the patch file has been corrupted by patchwork:
https://gitlab.com/buildroot.org/buildroot/-/jobs/2520605886
https://gitlab.com/buildroot.org/buildroot/-/jobs/2520605881
https://gitlab.com/buildroot.org/buildroot/-/jobs/2520605757
The sha256 should be c07a0514942c886bbbe42645b8d10f65c4891f1d48a584c01cd92526fcfa04ca
not 296f7ef2e8da828487763a779d5154f1ab90add71aaf1150c9f262596cda0585
It's due to line ending.
See attachment file.
Best regards,
Romain
Quoted 66 lines
Regards,
Yann E. MORIN.Quoted 62 lines
--- ...ePkg-UsbBusDxe-fix-NOOPT-build-error.patch | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 boot/edk2/0001-MdeModulePkg-UsbBusDxe-fix-NOOPT-build-error.patchboot/edk2/0001-MdeModulePkg-UsbBusDxe-fix-NOOPT-build-error.patch new file +48
-0@@ -0,0 +1,48 @@ +From 59aa67f7a4d8efc564b46fe467aaf6eccec17183 Mon Sep 17 00:00:00 2001 +From: Gerd Hoffmann <[email protected]> +Date: Mon, 20 Dec 2021 22:32:38 +0800 +Subject: [PATCH] MdeModulePkg/UsbBusDxe: fix NOOPT build error + +gcc-11 (fedora 35): + +/home/kraxel/projects/edk2/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c: In function ?UsbIoBulkTransfer?: +/home/kraxel/projects/edk2/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbBus.c:277:12: error: ?UsbHcBulkTransfer? accessing 80 bytes in a region of size 8 [-Werror=stringop-overflow=] + +Signed-off-by: Gerd Hoffmann <[email protected]> +Reviewed-by: Hao A Wu <[email protected]> +(cherry picked from commit ae8272ef787d80950803c521a13a308651bdc62e) +Signed-off-by: Romain Naour <[email protected]> +--- + MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.c | 2 +- + MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.h | 2 +- + 2 files changed, 2 insertions(+), 2 deletions(-) + +diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.c b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.c +index 7529e03e85..b2ce97ca37 100644 +--- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.c ++++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.c +@@ -285,7 +285,7 @@ UsbHcBulkTransfer ( + IN UINT8 DevSpeed, + IN UINTN MaxPacket, + IN UINT8 BufferNum, +- IN OUT VOID *Data[EFI_USB_MAX_BULK_BUFFER_NUM], ++ IN OUT VOID *Data[], + IN OUT UINTN *DataLength, + IN OUT UINT8 *DataToggle, + IN UINTN TimeOut, +diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.h b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.h +index 1d2b8a6174..1316a5981f 100644 +--- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.h ++++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.h +@@ -149,7 +149,7 @@ UsbHcBulkTransfer ( + IN UINT8 DevSpeed, + IN UINTN MaxPacket, + IN UINT8 BufferNum, +- IN OUT VOID *Data[EFI_USB_MAX_BULK_BUFFER_NUM], ++ IN OUT VOID *Data[], + IN OUT UINTN *DataLength, + IN OUT UINT8 *DataToggle, + IN UINTN TimeOut, +-- +2.35.3 +Signature · 1 line
2.35.3
Quoted 5 lines
Quoted 4 lines
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
From ec9aebca61bee4fdd058f9985bbb602d2b16d490 Mon Sep 17 00:00:00 2001
From: Romain Naour <[email protected]>
Date: Mon, 30 May 2022 20:59:27 +0200
Subject: [PATCH] boot/edk2: fix patch line ending
The patch 0001 from [1] has been corrupted on the
ML or patchwork.
[1] http://patchwork.ozlabs.org/project/buildroot/patch/[email protected]/
--- ...ePkg-UsbBusDxe-fix-NOOPT-build-error.patch | 32 +++++++++---------- 1 file changed, 16 insertions(+), 16 deletions(-)
boot/edk2/0001-MdeModulePkg-UsbBusDxe-fix-NOOPT-build-error.patch +16 -16
@@ -22,27 +22,27 @@ index 7529e03e85..b2ce97ca37 100644 --- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.c +++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.c @@ -285,7 +285,7 @@ UsbHcBulkTransfer ( - IN UINT8 DevSpeed, - IN UINTN MaxPacket, - IN UINT8 BufferNum, -- IN OUT VOID *Data[EFI_USB_MAX_BULK_BUFFER_NUM], -+ IN OUT VOID *Data[], - IN OUT UINTN *DataLength, - IN OUT UINT8 *DataToggle, - IN UINTN TimeOut, + IN UINT8 DevSpeed, + IN UINTN MaxPacket, + IN UINT8 BufferNum, +- IN OUT VOID *Data[EFI_USB_MAX_BULK_BUFFER_NUM], ++ IN OUT VOID *Data[], + IN OUT UINTN *DataLength, + IN OUT UINT8 *DataToggle, + IN UINTN TimeOut, diff --git a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.h b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.h index 1d2b8a6174..1316a5981f 100644 --- a/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.h +++ b/MdeModulePkg/Bus/Usb/UsbBusDxe/UsbUtility.h @@ -149,7 +149,7 @@ UsbHcBulkTransfer ( - IN UINT8 DevSpeed, - IN UINTN MaxPacket, - IN UINT8 BufferNum, -- IN OUT VOID *Data[EFI_USB_MAX_BULK_BUFFER_NUM], -+ IN OUT VOID *Data[], - IN OUT UINTN *DataLength, - IN OUT UINT8 *DataToggle, - IN UINTN TimeOut, + IN UINT8 DevSpeed, + IN UINTN MaxPacket, + IN UINT8 BufferNum, +- IN OUT VOID *Data[EFI_USB_MAX_BULK_BUFFER_NUM], ++ IN OUT VOID *Data[], + IN OUT UINTN *DataLength, + IN OUT UINT8 *DataToggle, + IN UINTN TimeOut, -- 2.35.3
Signature · 1 line
2.35.3
_______________________________________________
buildroot mailing list
[email protected]
https://lists.buildroot.org/mailman/listinfo/buildroot
Romain, All,
On 2022-05-30 21:04 +0200, Romain Naour spake thusly:
Quoted 3 lines
Le 28/05/2022 à 12:05, Yann E. MORIN a écrit :
Quoted 2 lines
On 2022-05-27 13:21 +0200, Romain Naour spake thusly:
Quoted 1 line
Backport a patch [1] included in edk2-stable202202 release.
[--SNIP--]
Quoted 1 line
It seems the patch file has been corrupted by patchwork:
[--SNIP--]
Quoted 2 lines
It's due to line ending.
See attachment file.
As discussed on IRC: this is also borked somehow...
Regards,
Yann E. MORIN.
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Romain, All,
On 2022-05-30 22:23 +0200, Yann E. MORIN spake thusly:
Quoted 10 lines
On 2022-05-30 21:04 +0200, Romain Naour spake thusly:
Quoted 3 lines
Le 28/05/2022 à 12:05, Yann E. MORIN a écrit :
Quoted 2 lines
On 2022-05-27 13:21 +0200, Romain Naour spake thusly:
Quoted 1 line
Backport a patch [1] included in edk2-stable202202 release.
[--SNIP--]
Quoted 1 line
It seems the patch file has been corrupted by patchwork:
[--SNIP--]
Quoted 2 lines
It's due to line ending.
See attachment file.As discussed on IRC: this is also borked somehow...
We eventually managed to fix the thing with manual steps (I cherry-picked the patch from Romain's tree).
Regards,
Yann E. MORIN.
Signature · 10 lines
.-----------------.--------------------.------------------.--------------------. | Yann E. MORIN | Real-Time Embedded | /"\ ASCII RIBBON | Erics' conspiracy: | | +33 662 376 056 | Software Designer | \ / CAMPAIGN | ___ | | +33 561 099 427 `------------.-------: X AGAINST | \e/ There is no | | http://ymorin.is-a-geek.org/ | _/*\_ | / \ HTML MAIL | v conspiracy. | '------------------------------^-------^------------------^--------------------' _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot
Quoted 10 lines
Quoted 1 line
Quoted 1 line
Quoted 1 line
Quoted 1 line
"Romain" == Romain Naour <[email protected]> writes:
Backport a patch [1] included in edk2-stable202202 release. Fixes:
https://gitlab.com/kubu93/buildroot/-/jobs/2510255569[1] https://github.com/tianocore/edk2/commit/ae8272ef787d80950803c521a13a308651bdc62e
Signed-off-by Romain Naour <[email protected]>Cc Dick Olsson <[email protected]>
Committed to 2022.02.x, thanks.
Signature · 5 lines
Bye, Peter Korsgaard _______________________________________________ buildroot mailing list [email protected] https://lists.buildroot.org/mailman/listinfo/buildroot