* [PATCH v1 0/2] Fix StdLib compilation with XCODE5/CLANG38
@ 2018-12-18 4:25 Alex James
2018-12-18 4:25 ` [PATCH v1 1/2] StdLib/sys/termios: Define cc_t as unsigned Alex James
2018-12-18 4:25 ` [PATCH v1 2/2] StdLib/Environs: Avoid infinite recursion in _Exit Alex James
0 siblings, 2 replies; 5+ messages in thread
From: Alex James @ 2018-12-18 4:25 UTC (permalink / raw)
To: edk2-devel
Resolve various compilation errors when building StdLib with XCODE5
or CLANG38 toolchains.
Alex James (2):
StdLib/sys/termios: Define cc_t as unsigned
StdLib/Environs: Avoid infinite recursion in _Exit
StdLib/Include/sys/termios.h | 2 +-
StdLib/LibC/StdLib/Environs.c | 2 +-
2 files changed, 2 insertions(+), 2 deletions(-)
--
2.20.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* [PATCH v1 1/2] StdLib/sys/termios: Define cc_t as unsigned
2018-12-18 4:25 [PATCH v1 0/2] Fix StdLib compilation with XCODE5/CLANG38 Alex James
@ 2018-12-18 4:25 ` Alex James
2018-12-18 4:25 ` [PATCH v1 2/2] StdLib/Environs: Avoid infinite recursion in _Exit Alex James
1 sibling, 0 replies; 5+ messages in thread
From: Alex James @ 2018-12-18 4:25 UTC (permalink / raw)
To: edk2-devel; +Cc: Daryl McDaniel, Jaben Carsey
According to the POSIX standard, cc_t, speed_t, and tcflag_t should be
unsigned integer types. Define cc_t as unsigned to match POSIX and fix
an implicit conversion error when building StdLib with XCODE5/CLANG38.
Cc: Daryl McDaniel <edk2-lists@mc2research.org>
Cc: Jaben Carsey <jaben.carsey@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Alex James <theracermaster@gmail.com>
---
StdLib/Include/sys/termios.h | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/StdLib/Include/sys/termios.h b/StdLib/Include/sys/termios.h
index 75886065b7..f2d60d0025 100644
--- a/StdLib/Include/sys/termios.h
+++ b/StdLib/Include/sys/termios.h
@@ -152,7 +152,7 @@ typedef enum {
#define NOFLSH 0x0800 /* don't flush output on signal */
#define FLUSHO 0x1000 /* output being flushed (state) */
-typedef INT8 cc_t;
+typedef UINT8 cc_t;
typedef UINT16 tcflag_t;
typedef UINT32 speed_t;
--
2.20.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* [PATCH v1 2/2] StdLib/Environs: Avoid infinite recursion in _Exit
2018-12-18 4:25 [PATCH v1 0/2] Fix StdLib compilation with XCODE5/CLANG38 Alex James
2018-12-18 4:25 ` [PATCH v1 1/2] StdLib/sys/termios: Define cc_t as unsigned Alex James
@ 2018-12-18 4:25 ` Alex James
2019-01-02 19:28 ` Carsey, Jaben
2019-01-02 19:28 ` Carsey, Jaben
1 sibling, 2 replies; 5+ messages in thread
From: Alex James @ 2018-12-18 4:25 UTC (permalink / raw)
To: edk2-devel; +Cc: Daryl McDaniel, Jaben Carsey
Use __builtin_unreachable instead of infinite recursion to fix an
infinite recursion error when building StdLib with XCODE5/CLANG38.
Cc: Daryl McDaniel <edk2-lists@mc2research.org>
Cc: Jaben Carsey <jaben.carsey@intel.com>
Contributed-under: TianoCore Contribution Agreement 1.1
Signed-off-by: Alex James <theracermaster@gmail.com>
---
StdLib/LibC/StdLib/Environs.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/StdLib/LibC/StdLib/Environs.c b/StdLib/LibC/StdLib/Environs.c
index 15221a1260..a29cb9954c 100644
--- a/StdLib/LibC/StdLib/Environs.c
+++ b/StdLib/LibC/StdLib/Environs.c
@@ -120,7 +120,7 @@ _Exit(int status)
longjmp(gMD->MainExit, 0x55); // Get out of here. longjmp can't return 0. Use 0x55 for a non-zero value.
#ifdef __GNUC__
- _Exit(status); /* Keep GCC happy - never reached */
+ __builtin_unreachable (); // Keep GCC happy
#endif
}
--
2.20.1
^ permalink raw reply related [flat|nested] 5+ messages in thread
* Re: [PATCH v1 2/2] StdLib/Environs: Avoid infinite recursion in _Exit
2018-12-18 4:25 ` [PATCH v1 2/2] StdLib/Environs: Avoid infinite recursion in _Exit Alex James
@ 2019-01-02 19:28 ` Carsey, Jaben
2019-01-02 19:28 ` Carsey, Jaben
1 sibling, 0 replies; 5+ messages in thread
From: Carsey, Jaben @ 2019-01-02 19:28 UTC (permalink / raw)
To: Alex James, edk2-devel@lists.01.org; +Cc: Daryl McDaniel
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
And pushed.
> -----Original Message-----
> From: Alex James [mailto:theracermaster@gmail.com]
> Sent: Monday, December 17, 2018 8:25 PM
> To: edk2-devel@lists.01.org
> Cc: Daryl McDaniel <edk2-lists@mc2research.org>; Carsey, Jaben
> <jaben.carsey@intel.com>
> Subject: [PATCH v1 2/2] StdLib/Environs: Avoid infinite recursion in _Exit
> Importance: High
>
> Use __builtin_unreachable instead of infinite recursion to fix an
> infinite recursion error when building StdLib with XCODE5/CLANG38.
>
> Cc: Daryl McDaniel <edk2-lists@mc2research.org>
> Cc: Jaben Carsey <jaben.carsey@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Alex James <theracermaster@gmail.com>
> ---
> StdLib/LibC/StdLib/Environs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/StdLib/LibC/StdLib/Environs.c b/StdLib/LibC/StdLib/Environs.c
> index 15221a1260..a29cb9954c 100644
> --- a/StdLib/LibC/StdLib/Environs.c
> +++ b/StdLib/LibC/StdLib/Environs.c
> @@ -120,7 +120,7 @@ _Exit(int status)
> longjmp(gMD->MainExit, 0x55); // Get out of here. longjmp can't return
> 0. Use 0x55 for a non-zero value.
>
> #ifdef __GNUC__
> - _Exit(status); /* Keep GCC happy - never reached */
> + __builtin_unreachable (); // Keep GCC happy
> #endif
> }
>
> --
> 2.20.1
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH v1 2/2] StdLib/Environs: Avoid infinite recursion in _Exit
2018-12-18 4:25 ` [PATCH v1 2/2] StdLib/Environs: Avoid infinite recursion in _Exit Alex James
2019-01-02 19:28 ` Carsey, Jaben
@ 2019-01-02 19:28 ` Carsey, Jaben
1 sibling, 0 replies; 5+ messages in thread
From: Carsey, Jaben @ 2019-01-02 19:28 UTC (permalink / raw)
To: Alex James, edk2-devel@lists.01.org; +Cc: Daryl McDaniel
Reviewed-by: Jaben Carsey <jaben.carsey@intel.com>
And pushed.
> -----Original Message-----
> From: Alex James [mailto:theracermaster@gmail.com]
> Sent: Monday, December 17, 2018 8:25 PM
> To: edk2-devel@lists.01.org
> Cc: Daryl McDaniel <edk2-lists@mc2research.org>; Carsey, Jaben
> <jaben.carsey@intel.com>
> Subject: [PATCH v1 2/2] StdLib/Environs: Avoid infinite recursion in _Exit
> Importance: High
>
> Use __builtin_unreachable instead of infinite recursion to fix an
> infinite recursion error when building StdLib with XCODE5/CLANG38.
>
> Cc: Daryl McDaniel <edk2-lists@mc2research.org>
> Cc: Jaben Carsey <jaben.carsey@intel.com>
> Contributed-under: TianoCore Contribution Agreement 1.1
> Signed-off-by: Alex James <theracermaster@gmail.com>
> ---
> StdLib/LibC/StdLib/Environs.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
>
> diff --git a/StdLib/LibC/StdLib/Environs.c b/StdLib/LibC/StdLib/Environs.c
> index 15221a1260..a29cb9954c 100644
> --- a/StdLib/LibC/StdLib/Environs.c
> +++ b/StdLib/LibC/StdLib/Environs.c
> @@ -120,7 +120,7 @@ _Exit(int status)
> longjmp(gMD->MainExit, 0x55); // Get out of here. longjmp can't return
> 0. Use 0x55 for a non-zero value.
>
> #ifdef __GNUC__
> - _Exit(status); /* Keep GCC happy - never reached */
> + __builtin_unreachable (); // Keep GCC happy
> #endif
> }
>
> --
> 2.20.1
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2019-01-02 19:28 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2018-12-18 4:25 [PATCH v1 0/2] Fix StdLib compilation with XCODE5/CLANG38 Alex James
2018-12-18 4:25 ` [PATCH v1 1/2] StdLib/sys/termios: Define cc_t as unsigned Alex James
2018-12-18 4:25 ` [PATCH v1 2/2] StdLib/Environs: Avoid infinite recursion in _Exit Alex James
2019-01-02 19:28 ` Carsey, Jaben
2019-01-02 19:28 ` Carsey, Jaben
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox