Re: [edk2] [PATCH 26/26] Revert "MdePkg: avoid __builtin_unreachable() on GCC v4.4"
> -Original Message- > From: Laszlo Ersek > Sent: Thursday, January 3, 2019 3:48 AM > To: edk2-devel-01 > Cc: Ard Biesheuvel ; Liming Gao > ; Marvin Haeuser ; > Michael D Kinney > Subject: [PATCH 26/26] Revert "MdePkg: avoid __builtin_unreachable() on > GCC v4.4" > > This reverts commit 357cec385d4f ("MdePkg: avoid __builtin_unreachable() > on GCC v4.4", 2016-07-21). > > We've removed BaseTools support for GCC44..GCC47, therefore we need > not catch the GCC44 corner case for __builtin_unreachable(). > > No GCC44..GCC47 references remain under MdePkg after this patch. > > Cc: Ard Biesheuvel > Cc: Liming Gao > Cc: Marvin Haeuser Reviewed-by: Marvin Haeuser > Cc: Michael D Kinney > Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1377 > Signed-off-by: Laszlo Ersek > --- > > Notes: > I build-tested this change by building ArmVirtQemu with the GCC5 > toolchain (gcc-6.1.1), and OVMF with the GCC48 toolchain (gcc-4.8.5). > > Namely, the PeiCore() function > [MdeModulePkg/Core/Pei/PeiMain/PeiMain.c] > and the DxeMain() function > [MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c] > use UNREACHABLE(). > > MdePkg/Include/Base.h | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h index > bc877d8125a5..d6b04baeaf8b 100644 > --- a/MdePkg/Include/Base.h > +++ b/MdePkg/Include/Base.h > @@ -112,11 +112,10 @@ VERIFY_SIZE_OF (__VERIFY_UINT32_ENUM_SIZE, > 4); // warnings. > // > #ifndef UNREACHABLE > - #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 4) > + #ifdef __GNUC__ > /// > /// Signal compilers and analyzers that this call is not reachable. It > is > /// up to the compiler to remove any code past that point. > -/// Not implemented by GCC 4.4 or earlier. > /// > #define UNREACHABLE() __builtin_unreachable () >#elif defined (__has_feature) > -- > 2.19.1.3.g30247aa5d201 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
Re: [edk2] [PATCH 26/26] Revert "MdePkg: avoid __builtin_unreachable() on GCC v4.4"
On Thu, 3 Jan 2019 at 03:49, Laszlo Ersek wrote: > > This reverts commit 357cec385d4f ("MdePkg: avoid __builtin_unreachable() > on GCC v4.4", 2016-07-21). > > We've removed BaseTools support for GCC44..GCC47, therefore we need not > catch the GCC44 corner case for __builtin_unreachable(). > > No GCC44..GCC47 references remain under MdePkg after this patch. > > Cc: Ard Biesheuvel > Cc: Liming Gao > Cc: Marvin Haeuser > Cc: Michael D Kinney > Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1377 > Signed-off-by: Laszlo Ersek Reviewed-by: Ard Biesheuvel > --- > > Notes: > I build-tested this change by building ArmVirtQemu with the GCC5 > toolchain (gcc-6.1.1), and OVMF with the GCC48 toolchain (gcc-4.8.5). > > Namely, the PeiCore() function [MdeModulePkg/Core/Pei/PeiMain/PeiMain.c] > and the DxeMain() function [MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c] > use UNREACHABLE(). > > MdePkg/Include/Base.h | 3 +-- > 1 file changed, 1 insertion(+), 2 deletions(-) > > diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h > index bc877d8125a5..d6b04baeaf8b 100644 > --- a/MdePkg/Include/Base.h > +++ b/MdePkg/Include/Base.h > @@ -112,11 +112,10 @@ VERIFY_SIZE_OF (__VERIFY_UINT32_ENUM_SIZE, 4); > // warnings. > // > #ifndef UNREACHABLE > - #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 4) > + #ifdef __GNUC__ > /// > /// Signal compilers and analyzers that this call is not reachable. It > is > /// up to the compiler to remove any code past that point. > -/// Not implemented by GCC 4.4 or earlier. > /// > #define UNREACHABLE() __builtin_unreachable () >#elif defined (__has_feature) > -- > 2.19.1.3.g30247aa5d201 > ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel
[edk2] [PATCH 26/26] Revert "MdePkg: avoid __builtin_unreachable() on GCC v4.4"
This reverts commit 357cec385d4f ("MdePkg: avoid __builtin_unreachable() on GCC v4.4", 2016-07-21). We've removed BaseTools support for GCC44..GCC47, therefore we need not catch the GCC44 corner case for __builtin_unreachable(). No GCC44..GCC47 references remain under MdePkg after this patch. Cc: Ard Biesheuvel Cc: Liming Gao Cc: Marvin Haeuser Cc: Michael D Kinney Ref: https://bugzilla.tianocore.org/show_bug.cgi?id=1377 Signed-off-by: Laszlo Ersek --- Notes: I build-tested this change by building ArmVirtQemu with the GCC5 toolchain (gcc-6.1.1), and OVMF with the GCC48 toolchain (gcc-4.8.5). Namely, the PeiCore() function [MdeModulePkg/Core/Pei/PeiMain/PeiMain.c] and the DxeMain() function [MdeModulePkg/Core/Dxe/DxeMain/DxeMain.c] use UNREACHABLE(). MdePkg/Include/Base.h | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/MdePkg/Include/Base.h b/MdePkg/Include/Base.h index bc877d8125a5..d6b04baeaf8b 100644 --- a/MdePkg/Include/Base.h +++ b/MdePkg/Include/Base.h @@ -112,11 +112,10 @@ VERIFY_SIZE_OF (__VERIFY_UINT32_ENUM_SIZE, 4); // warnings. // #ifndef UNREACHABLE - #if __GNUC__ > 4 || (__GNUC__ == 4 && __GNUC_MINOR__ > 4) + #ifdef __GNUC__ /// /// Signal compilers and analyzers that this call is not reachable. It is /// up to the compiler to remove any code past that point. -/// Not implemented by GCC 4.4 or earlier. /// #define UNREACHABLE() __builtin_unreachable () #elif defined (__has_feature) -- 2.19.1.3.g30247aa5d201 ___ edk2-devel mailing list edk2-devel@lists.01.org https://lists.01.org/mailman/listinfo/edk2-devel