* [PATCH v3 1/2] newlib/configure.host: Remove obsolete definition of _I386MACH_ALLOW_HW_INTERRUPTS
@ 2017-10-27 21:32 Joel Sherrill
2017-10-31 13:34 ` [PATCH v3 2/2] newlib/.../getreent.c: Do not define if __DYNAMIC_REENT__ is enabled Joel Sherrill
2017-11-02 8:29 ` [PATCH v3 1/2] newlib/configure.host: Remove obsolete definition of _I386MACH_ALLOW_HW_INTERRUPTS Corinna Vinschen
0 siblings, 2 replies; 6+ messages in thread
From: Joel Sherrill @ 2017-10-27 21:32 UTC (permalink / raw)
To: newlib; +Cc: Joel Sherrill
The *-*-rtems* targets defined this even though the conditional
was no longer present in i386/setjmp.S.
---
newlib/configure.host | 2 --
1 file changed, 2 deletions(-)
diff --git a/newlib/configure.host b/newlib/configure.host
index ba2d8c6..fb3362b 100644
--- a/newlib/configure.host
+++ b/newlib/configure.host
@@ -608,8 +608,6 @@ case "${host}" in
newlib_cflags="${newlib_cflags} -DCLOCK_PROVIDED -DMALLOC_PROVIDED -DEXIT_PROVIDED -DSIGNAL_PROVIDED -DREENTRANT_SYSCALLS_PROVIDED -DHAVE_NANOSLEEP -DHAVE_BLKSIZE -DHAVE_FCNTL -DHAVE_ASSERT_FUNC"
# turn off unsupported items in posix directory
newlib_cflags="${newlib_cflags} -D_NO_GETLOGIN -D_NO_GETPWENT -D_NO_GETUT -D_NO_GETPASS -D_NO_SIGSET -D_NO_WORDEXP -D_NO_POPEN -D_NO_POSIX_SPAWN"
- # turn off using cli/sti in i386 setjmp/longjmp
- newlib_cflags="${newlib_cflags} -D_I386MACH_ALLOW_HW_INTERRUPTS"
;;
# VxWorks supplies its own version of malloc, and the newlib one
# doesn't work because VxWorks does not have sbrk.
--
1.8.3.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* [PATCH v3 2/2] newlib/.../getreent.c: Do not define if __DYNAMIC_REENT__ is enabled
2017-10-27 21:32 [PATCH v3 1/2] newlib/configure.host: Remove obsolete definition of _I386MACH_ALLOW_HW_INTERRUPTS Joel Sherrill
@ 2017-10-31 13:34 ` Joel Sherrill
2017-11-02 8:56 ` Corinna Vinschen
2017-11-02 12:08 ` Sebastian Huber
2017-11-02 8:29 ` [PATCH v3 1/2] newlib/configure.host: Remove obsolete definition of _I386MACH_ALLOW_HW_INTERRUPTS Corinna Vinschen
1 sibling, 2 replies; 6+ messages in thread
From: Joel Sherrill @ 2017-10-31 13:34 UTC (permalink / raw)
To: newlib; +Cc: Joel Sherrill
RTEMS provides the option to have a global or per-thread reentrancy
as part of application configuration. As part of this, RTEMS provides
the implementation of __getreent() as appropriate. Allow the target
to determine if this method is present in libc.a.
---
newlib/libc/reent/getreent.c | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/newlib/libc/reent/getreent.c b/newlib/libc/reent/getreent.c
index 60ae6fb..b42a88b 100644
--- a/newlib/libc/reent/getreent.c
+++ b/newlib/libc/reent/getreent.c
@@ -1,5 +1,13 @@
/* default reentrant pointer when multithread enabled */
+#include <reent.h>
+
+#ifdef __DYNAMIC_REENT__
+
+int _dummy_getreent;
+
+#else
+
#include <_ansi.h>
#include <reent.h>
@@ -12,3 +20,5 @@ _DEFUN_VOID(__getreent)
{
return _impure_ptr;
}
+
+#endif
--
1.8.3.1
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3 2/2] newlib/.../getreent.c: Do not define if __DYNAMIC_REENT__ is enabled
2017-10-31 13:34 ` [PATCH v3 2/2] newlib/.../getreent.c: Do not define if __DYNAMIC_REENT__ is enabled Joel Sherrill
@ 2017-11-02 8:56 ` Corinna Vinschen
2017-11-02 12:08 ` Sebastian Huber
1 sibling, 0 replies; 6+ messages in thread
From: Corinna Vinschen @ 2017-11-02 8:56 UTC (permalink / raw)
To: newlib
[-- Attachment #1: Type: text/plain, Size: 1099 bytes --]
On Oct 27 16:32, Joel Sherrill wrote:
> RTEMS provides the option to have a global or per-thread reentrancy
> as part of application configuration. As part of this, RTEMS provides
> the implementation of __getreent() as appropriate. Allow the target
> to determine if this method is present in libc.a.
> ---
> newlib/libc/reent/getreent.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/newlib/libc/reent/getreent.c b/newlib/libc/reent/getreent.c
> index 60ae6fb..b42a88b 100644
> --- a/newlib/libc/reent/getreent.c
> +++ b/newlib/libc/reent/getreent.c
> @@ -1,5 +1,13 @@
> /* default reentrant pointer when multithread enabled */
>
> +#include <reent.h>
> +
> +#ifdef __DYNAMIC_REENT__
> +
> +int _dummy_getreent;
> +
> +#else
> +
> #include <_ansi.h>
> #include <reent.h>
>
> @@ -12,3 +20,5 @@ _DEFUN_VOID(__getreent)
> {
> return _impure_ptr;
> }
> +
> +#endif
> --
> 1.8.3.1
NAK. Not without explanation why you need a dummy_getreent.
This looks wrong.
Corinna
--
Corinna Vinschen
Cygwin Maintainer
Red Hat
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3 2/2] newlib/.../getreent.c: Do not define if __DYNAMIC_REENT__ is enabled
2017-10-31 13:34 ` [PATCH v3 2/2] newlib/.../getreent.c: Do not define if __DYNAMIC_REENT__ is enabled Joel Sherrill
2017-11-02 8:56 ` Corinna Vinschen
@ 2017-11-02 12:08 ` Sebastian Huber
2017-11-02 17:56 ` Corinna Vinschen
1 sibling, 1 reply; 6+ messages in thread
From: Sebastian Huber @ 2017-11-02 12:08 UTC (permalink / raw)
To: Joel Sherrill, newlib
On 27/10/17 23:32, Joel Sherrill wrote:
> RTEMS provides the option to have a global or per-thread reentrancy
> as part of application configuration. As part of this, RTEMS provides
> the implementation of __getreent() as appropriate. Allow the target
> to determine if this method is present in libc.a.
> ---
> newlib/libc/reent/getreent.c | 10 ++++++++++
> 1 file changed, 10 insertions(+)
>
> diff --git a/newlib/libc/reent/getreent.c b/newlib/libc/reent/getreent.c
> index 60ae6fb..b42a88b 100644
> --- a/newlib/libc/reent/getreent.c
> +++ b/newlib/libc/reent/getreent.c
> @@ -1,5 +1,13 @@
> /* default reentrant pointer when multithread enabled */
>
> +#include <reent.h>
> +
> +#ifdef __DYNAMIC_REENT__
> +
> +int _dummy_getreent;
> +
> +#else
> +
> #include <_ansi.h>
> #include <reent.h>
>
> @@ -12,3 +20,5 @@ _DEFUN_VOID(__getreent)
> {
> return _impure_ptr;
> }
> +
> +#endif
__getreent() is only used if __DYNAMIC_REENT__ is defined:
#if defined(__DYNAMIC_REENT__) && !defined(__SINGLE_THREAD__)
#ifndef __getreent
struct _reent * _EXFUN(__getreent, (void));
#endif
# define _REENT (__getreent())
#else /* __SINGLE_THREAD__ || !__DYNAMIC_REENT__ */
# define _REENT _impure_ptr
#endif /* __SINGLE_THREAD__ || !__DYNAMIC_REENT__ */
Why can't we delete this file (newlib/libc/reent/getreent.c)?
--
Sebastian Huber, embedded brains GmbH
Address : Dornierstr. 4, D-82178 Puchheim, Germany
Phone : +49 89 189 47 41-16
Fax : +49 89 189 47 41-09
E-Mail : sebastian.huber@embedded-brains.de
PGP : Public key available on request.
Diese Nachricht ist keine geschäftliche Mitteilung im Sinne des EHUG.
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3 2/2] newlib/.../getreent.c: Do not define if __DYNAMIC_REENT__ is enabled
2017-11-02 12:08 ` Sebastian Huber
@ 2017-11-02 17:56 ` Corinna Vinschen
0 siblings, 0 replies; 6+ messages in thread
From: Corinna Vinschen @ 2017-11-02 17:56 UTC (permalink / raw)
To: newlib
[-- Attachment #1: Type: text/plain, Size: 833 bytes --]
On Nov 2 13:08, Sebastian Huber wrote:
> On 27/10/17 23:32, Joel Sherrill wrote:
> > [...]
> __getreent() is only used if __DYNAMIC_REENT__ is defined:
>
> #if defined(__DYNAMIC_REENT__) && !defined(__SINGLE_THREAD__)
> #ifndef __getreent
> struct _reent * _EXFUN(__getreent, (void));
> #endif
> # define _REENT (__getreent())
> #else /* __SINGLE_THREAD__ || !__DYNAMIC_REENT__ */
> # define _REENT _impure_ptr
> #endif /* __SINGLE_THREAD__ || !__DYNAMIC_REENT__ */
>
> Why can't we delete this file (newlib/libc/reent/getreent.c)?
It was meant as the default implementation I think. There may
even have been a time where Cygwin needed it, but AFAICS, this
doesn't apply anymore.
So, yeah, we may try to remove it and see what breaks...
Corinna
--
Corinna Vinschen
Cygwin Maintainer
Red Hat
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
* Re: [PATCH v3 1/2] newlib/configure.host: Remove obsolete definition of _I386MACH_ALLOW_HW_INTERRUPTS
2017-10-27 21:32 [PATCH v3 1/2] newlib/configure.host: Remove obsolete definition of _I386MACH_ALLOW_HW_INTERRUPTS Joel Sherrill
2017-10-31 13:34 ` [PATCH v3 2/2] newlib/.../getreent.c: Do not define if __DYNAMIC_REENT__ is enabled Joel Sherrill
@ 2017-11-02 8:29 ` Corinna Vinschen
1 sibling, 0 replies; 6+ messages in thread
From: Corinna Vinschen @ 2017-11-02 8:29 UTC (permalink / raw)
To: newlib
[-- Attachment #1: Type: text/plain, Size: 1205 bytes --]
On Oct 27 16:32, Joel Sherrill wrote:
> The *-*-rtems* targets defined this even though the conditional
> was no longer present in i386/setjmp.S.
> ---
> newlib/configure.host | 2 --
> 1 file changed, 2 deletions(-)
>
> diff --git a/newlib/configure.host b/newlib/configure.host
> index ba2d8c6..fb3362b 100644
> --- a/newlib/configure.host
> +++ b/newlib/configure.host
> @@ -608,8 +608,6 @@ case "${host}" in
> newlib_cflags="${newlib_cflags} -DCLOCK_PROVIDED -DMALLOC_PROVIDED -DEXIT_PROVIDED -DSIGNAL_PROVIDED -DREENTRANT_SYSCALLS_PROVIDED -DHAVE_NANOSLEEP -DHAVE_BLKSIZE -DHAVE_FCNTL -DHAVE_ASSERT_FUNC"
> # turn off unsupported items in posix directory
> newlib_cflags="${newlib_cflags} -D_NO_GETLOGIN -D_NO_GETPWENT -D_NO_GETUT -D_NO_GETPASS -D_NO_SIGSET -D_NO_WORDEXP -D_NO_POPEN -D_NO_POSIX_SPAWN"
> - # turn off using cli/sti in i386 setjmp/longjmp
> - newlib_cflags="${newlib_cflags} -D_I386MACH_ALLOW_HW_INTERRUPTS"
> ;;
> # VxWorks supplies its own version of malloc, and the newlib one
> # doesn't work because VxWorks does not have sbrk.
> --
> 1.8.3.1
Pushed.
Thanks,
Corinna
--
Corinna Vinschen
Cygwin Maintainer
Red Hat
[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 819 bytes --]
^ permalink raw reply [flat|nested] 6+ messages in thread
end of thread, other threads:[~2017-11-02 14:28 UTC | newest]
Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2017-10-27 21:32 [PATCH v3 1/2] newlib/configure.host: Remove obsolete definition of _I386MACH_ALLOW_HW_INTERRUPTS Joel Sherrill
2017-10-31 13:34 ` [PATCH v3 2/2] newlib/.../getreent.c: Do not define if __DYNAMIC_REENT__ is enabled Joel Sherrill
2017-11-02 8:56 ` Corinna Vinschen
2017-11-02 12:08 ` Sebastian Huber
2017-11-02 17:56 ` Corinna Vinschen
2017-11-02 8:29 ` [PATCH v3 1/2] newlib/configure.host: Remove obsolete definition of _I386MACH_ALLOW_HW_INTERRUPTS Corinna Vinschen
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).