[PATCH rtems-lwip] lwip.py: Install BSD compatibility headers

2022-08-26 Thread Kinsey Moore
---
 lwip.py | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lwip.py b/lwip.py
index 70c9471..a8248d9 100644
--- a/lwip.py
+++ b/lwip.py
@@ -155,7 +155,9 @@ def build(bld):
 bld.install_files("${PREFIX}/" + arch_lib_path + 
"/include/" + subpath,
 os.path.join(path,name))
 
-[install_headers(path) for path in (drv_incl + common_includes).split(' 
')[:-1]]
+[install_headers(path) for path in common_includes.split(' ')[:-1]]
+[install_headers(path) for path in drv_incl.split(' ')[:-1]]
+[install_headers(path) for path in bsd_compat_incl.split(' ')[:-1]]
 
 bld.program(features='c',
 target='networking01.exe',
-- 
2.30.2

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Weird Cygwin Build Failure

2022-08-26 Thread Joel Sherrill
Hi

https://lists.rtems.org/pipermail/build/2022-August/035493.html -- m68k on
Cygwin fails with this weird error.




rm gcc.pod
make[2]: Leaving directory
'/home/rtems-tester/rtems-cron-5/rtems-source-builder/rtems/build/m68k-rtems5-gcc-7.5.0-newlib-7947581-x86_64-pc-cygwin-1/build/gcc'
make[2]: write error: stdout
make[1]: *** [Makefile:4238: all-gcc] Error 1
make[1]: Leaving directory
'/home/rtems-tester/rtems-cron-5/rtems-source-builder/rtems/build/m68k-rtems5-gcc-7.5.0-newlib-7947581-x86_64-pc-cygwin-1/build'
make: *** [Makefile:903: all] Error 2
shell cmd failed: sh -ex
/home/rtems-tester/rtems-cron-5/rtems-source-builder/rtems/build/m68k-rtems5-gcc-7.5.0-newlib-7947581-x86_64-pc-cygwin-1/do-build
error: building m68k-rtems5-gcc-7.5.0-newlib-7947581-x86_64-pc-cygwin-1
  See error report:
rsb-report-m68k-rtems5-gcc-7.5.0-newlib-7947581-x86_64-pc-cygwin-1.txt



At least the arm fails with this also. Any ideas?

--joel
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH rtems-lwip] lwip.py: Install BSD compatibility headers

2022-08-26 Thread Kinsey Moore
Hold off on rewiewing this patch, there are some missing pieces attached 
to the NTP patches that need to be pulled out for this to be relevant.


On 8/26/2022 09:07, Kinsey Moore wrote:

---
  lwip.py | 4 +++-
  1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/lwip.py b/lwip.py
index 70c9471..a8248d9 100644
--- a/lwip.py
+++ b/lwip.py
@@ -155,7 +155,9 @@ def build(bld):
  bld.install_files("${PREFIX}/" + arch_lib_path + 
"/include/" + subpath,
  os.path.join(path,name))
  
-[install_headers(path) for path in (drv_incl + common_includes).split(' ')[:-1]]

+[install_headers(path) for path in common_includes.split(' ')[:-1]]
+[install_headers(path) for path in drv_incl.split(' ')[:-1]]
+[install_headers(path) for path in bsd_compat_incl.split(' ')[:-1]]
  
  bld.program(features='c',

  target='networking01.exe',

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH rtems-lwip v2] lwip.py: Build BSD compatibility as part of lwIP

2022-08-26 Thread Kinsey Moore
Include the BSD compatibility functions as part of lwIP to be provided
to consumers of this network stack and install the headers so they can
be compiled against.
---
 lwip.py | 7 ++-
 rtemslwip/bsd_compat/rtems-kernel-program.c | 5 +
 2 files changed, 7 insertions(+), 5 deletions(-)

diff --git a/lwip.py b/lwip.py
index 70c9471..4767910 100644
--- a/lwip.py
+++ b/lwip.py
@@ -68,6 +68,8 @@ def build(bld):
 common_includes = './lwip/src/include ./uLan/ports/os/rtems 
./rtemslwip/include '
 driver_source = []
 drv_incl = ' '
+bsd_compat_sources = ["rtemslwip/bsd_compat/netdb.c", 
"rtemslwip/bsd_compat/ifaddrs.c", "rtemslwip/bsd_compat/rtems-kernel-program.c"]
+bsd_compat_incl = './rtemslwip/bsd_compat_include '
 
 arch_lib_path = rtems.arch_bsp_lib_path(bld.env.RTEMS_VERSION,
 bld.env.RTEMS_ARCH_BSP)
@@ -81,6 +83,7 @@ def build(bld):
 source_files.append('./rtemslwip/common/syslog.c')
 source_files.append('./rtemslwip/common/rtems_lwip_io.c')
 source_files.append('./rtemslwip/common/network_compat.c')
+source_files.extend(bsd_compat_sources)
 
 def walk_sources(path):
 sources = []
@@ -155,7 +158,9 @@ def build(bld):
 bld.install_files("${PREFIX}/" + arch_lib_path + 
"/include/" + subpath,
 os.path.join(path,name))
 
-[install_headers(path) for path in (drv_incl + common_includes).split(' 
')[:-1]]
+[install_headers(path) for path in common_includes.split(' ')[:-1]]
+[install_headers(path) for path in drv_incl.split(' ')[:-1]]
+[install_headers(path) for path in bsd_compat_incl.split(' ')[:-1]]
 
 bld.program(features='c',
 target='networking01.exe',
diff --git a/rtemslwip/bsd_compat/rtems-kernel-program.c 
b/rtemslwip/bsd_compat/rtems-kernel-program.c
index ae80e51..6dd8028 100644
--- a/rtemslwip/bsd_compat/rtems-kernel-program.c
+++ b/rtemslwip/bsd_compat/rtems-kernel-program.c
@@ -30,10 +30,7 @@
 #include 
 #include 
 
-#undef printf
-#define RTEMS_BSD_PROGRAM_NO_STRDUP_WRAP
-#define RTEMS_BSD_PROGRAM_NO_STRNDUP_WRAP
-#include 
+#include 
 
 #include 
 #include 
-- 
2.30.2

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH rtems-lwip v3] lwip.py: Build BSD compatibility as part of lwIP

2022-08-26 Thread Kinsey Moore
Include the BSD compatibility functions as part of lwIP to be provided
to consumers of this network stack and install the headers so they can
be compiled against.
---
 lwip.py | 9 +++--
 rtemslwip/bsd_compat/rtems-kernel-program.c | 5 +
 2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/lwip.py b/lwip.py
index 70c9471..7ae63ae 100644
--- a/lwip.py
+++ b/lwip.py
@@ -68,6 +68,8 @@ def build(bld):
 common_includes = './lwip/src/include ./uLan/ports/os/rtems 
./rtemslwip/include '
 driver_source = []
 drv_incl = ' '
+bsd_compat_sources = ["rtemslwip/bsd_compat/netdb.c", 
"rtemslwip/bsd_compat/ifaddrs.c", "rtemslwip/bsd_compat/rtems-kernel-program.c"]
+bsd_compat_incl = './rtemslwip/bsd_compat_include '
 
 arch_lib_path = rtems.arch_bsp_lib_path(bld.env.RTEMS_VERSION,
 bld.env.RTEMS_ARCH_BSP)
@@ -81,6 +83,7 @@ def build(bld):
 source_files.append('./rtemslwip/common/syslog.c')
 source_files.append('./rtemslwip/common/rtems_lwip_io.c')
 source_files.append('./rtemslwip/common/network_compat.c')
+source_files.extend(bsd_compat_sources)
 
 def walk_sources(path):
 sources = []
@@ -128,7 +131,7 @@ def build(bld):
 bld(features ='c',
 target='lwip_obj',
 cflags='-g -Wall -O0',
-includes=drv_incl + common_includes,
+includes=drv_incl + bsd_compat_incl + common_includes,
 source=source_files,
 )
 
@@ -155,7 +158,9 @@ def build(bld):
 bld.install_files("${PREFIX}/" + arch_lib_path + 
"/include/" + subpath,
 os.path.join(path,name))
 
-[install_headers(path) for path in (drv_incl + common_includes).split(' 
')[:-1]]
+[install_headers(path) for path in common_includes.split(' ')[:-1]]
+[install_headers(path) for path in drv_incl.split(' ')[:-1]]
+[install_headers(path) for path in bsd_compat_incl.split(' ')[:-1]]
 
 bld.program(features='c',
 target='networking01.exe',
diff --git a/rtemslwip/bsd_compat/rtems-kernel-program.c 
b/rtemslwip/bsd_compat/rtems-kernel-program.c
index ae80e51..6dd8028 100644
--- a/rtemslwip/bsd_compat/rtems-kernel-program.c
+++ b/rtemslwip/bsd_compat/rtems-kernel-program.c
@@ -30,10 +30,7 @@
 #include 
 #include 
 
-#undef printf
-#define RTEMS_BSD_PROGRAM_NO_STRDUP_WRAP
-#define RTEMS_BSD_PROGRAM_NO_STRNDUP_WRAP
-#include 
+#include 
 
 #include 
 #include 
-- 
2.30.2

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH rtems-lwip v3] Add missing include

2022-08-26 Thread Kinsey Moore
The v2 patch would not compile under a fresh build due to a missing
include that was being masked by installed files at the BSP install
location. This resolves that issue and ensures that this builds from a
completely fresh build.


___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [PATCH rtems-lwip v3] lwip.py: Build BSD compatibility as part of lwIP

2022-08-26 Thread Chris Johns
On 27/8/2022 7:25 am, Kinsey Moore wrote:
> Include the BSD compatibility functions as part of lwIP to be provided
> to consumers of this network stack and install the headers so they can
> be compiled against.
> ---
>  lwip.py | 9 +++--
>  rtemslwip/bsd_compat/rtems-kernel-program.c | 5 +
>  2 files changed, 8 insertions(+), 6 deletions(-)
> 
> diff --git a/lwip.py b/lwip.py
> index 70c9471..7ae63ae 100644
> --- a/lwip.py
> +++ b/lwip.py
> @@ -68,6 +68,8 @@ def build(bld):
>  common_includes = './lwip/src/include ./uLan/ports/os/rtems 
> ./rtemslwip/include '
>  driver_source = []
>  drv_incl = ' '
> +bsd_compat_sources = ["rtemslwip/bsd_compat/netdb.c", 
> "rtemslwip/bsd_compat/ifaddrs.c", 
> "rtemslwip/bsd_compat/rtems-kernel-program.c"]
> +bsd_compat_incl = './rtemslwip/bsd_compat_include '

Line lengths. It would be good to have this code follow the coding procedures. I
am fine with this change as is if there is to be a clean up of this module.

Chris
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: [PATCH rtems-lwip v3] lwip.py: Build BSD compatibility as part of lwIP

2022-08-26 Thread Kinsey Moore



On 8/26/2022 17:13, Chris Johns wrote:

On 27/8/2022 7:25 am, Kinsey Moore wrote:

Include the BSD compatibility functions as part of lwIP to be provided
to consumers of this network stack and install the headers so they can
be compiled against.
---
  lwip.py | 9 +++--
  rtemslwip/bsd_compat/rtems-kernel-program.c | 5 +
  2 files changed, 8 insertions(+), 6 deletions(-)

diff --git a/lwip.py b/lwip.py
index 70c9471..7ae63ae 100644
--- a/lwip.py
+++ b/lwip.py
@@ -68,6 +68,8 @@ def build(bld):
  common_includes = './lwip/src/include ./uLan/ports/os/rtems 
./rtemslwip/include '
  driver_source = []
  drv_incl = ' '
+bsd_compat_sources = ["rtemslwip/bsd_compat/netdb.c", 
"rtemslwip/bsd_compat/ifaddrs.c", "rtemslwip/bsd_compat/rtems-kernel-program.c"]
+bsd_compat_incl = './rtemslwip/bsd_compat_include '

Line lengths. It would be good to have this code follow the coding procedures. I
am fine with this change as is if there is to be a clean up of this module.

Chris


This definitely needs a cleanup elsewhere, but I'll clean this up before 
commit.



Kinsey

___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


[PATCH RTEMS 5] cpukit/include: Fix including in C++

2022-08-26 Thread chrisj
From: Chris Johns 

Closes #4709
---
 cpukit/include/link_elf.h |  8 
 cpukit/include/linux/rbtree.h | 10 +-
 cpukit/include/rtems/capture.h|  4 ++--
 cpukit/include/rtems/posix/muteximpl.h|  7 +++
 cpukit/include/rtems/posix/pthreadattrimpl.h  |  2 +-
 cpukit/include/rtems/rtl/rtl-obj.h| 20 +++
 cpukit/include/rtems/rtl/rtl.h|  2 +-
 cpukit/include/rtems/score/priority.h |  4 ++--
 cpukit/include/rtems/score/priorityimpl.h |  2 +-
 cpukit/include/rtems/score/scheduleredfimpl.h |  4 ++--
 cpukit/include/rtems/score/tls.h  |  2 +-
 cpukit/include/rtems/score/watchdogimpl.h |  2 +-
 12 files changed, 47 insertions(+), 20 deletions(-)

diff --git a/cpukit/include/link_elf.h b/cpukit/include/link_elf.h
index 6cab3c2c7f..6483c021fd 100644
--- a/cpukit/include/link_elf.h
+++ b/cpukit/include/link_elf.h
@@ -13,6 +13,10 @@
 #include 
 #include 
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 enum sections
 {
   rap_text = 0,
@@ -76,4 +80,8 @@ int _rtld_linkmap_add (rtems_rtl_obj* obj);
  * Remove link map from the list.
  */
 void _rtld_linkmap_delete (rtems_rtl_obj* obj);
+
+#ifdef __cplusplus
+}
+#endif
 #endif /* _LINK_ELF_H_ */
diff --git a/cpukit/include/linux/rbtree.h b/cpukit/include/linux/rbtree.h
index 8fc575240f..ec0fac1af9 100644
--- a/cpukit/include/linux/rbtree.h
+++ b/cpukit/include/linux/rbtree.h
@@ -17,6 +17,10 @@
 
 #include 
 
+#ifdef __cplusplus
+extern "C" {
+#endif
+
 #define rb_node RBTree_Node
 
 #define rb_left Node.rbe_left
@@ -96,7 +100,7 @@ static inline struct rb_node *rb_last( struct rb_root *root )
 
 static inline void rb_replace_node(
   struct rb_node *victim,
-  struct rb_node *replacement, 
+  struct rb_node *replacement,
   struct rb_root *root
 )
 {
@@ -138,4 +142,8 @@ static inline struct rb_node *rb_parent( struct rb_node 
*node )
 node = next \
   )
 
+#ifdef __cplusplus
+}
+#endif
+
 #endif /* _LINUX_RBTREE_H */
diff --git a/cpukit/include/rtems/capture.h b/cpukit/include/rtems/capture.h
index c37d652211..4ab638ec24 100644
--- a/cpukit/include/rtems/capture.h
+++ b/cpukit/include/rtems/capture.h
@@ -838,7 +838,7 @@ rtems_capture_task_flags (rtems_tcb* tcb)
 static inline rtems_capture_control*
 rtems_capture_task_control (rtems_tcb* tcb)
 {
-  return tcb->Capture.control;
+  return (rtems_capture_control*) tcb->Capture.control;
 }
 
 /**
@@ -853,7 +853,7 @@ rtems_capture_task_control (rtems_tcb* tcb)
 static inline uint32_t
 rtems_capture_task_control_flags (rtems_tcb* tcb)
 {
-  rtems_capture_control*  control = tcb->Capture.control;
+  rtems_capture_control*  control = rtems_capture_task_control (tcb);
   if (!control)
 return 0;
   return control->flags;
diff --git a/cpukit/include/rtems/posix/muteximpl.h 
b/cpukit/include/rtems/posix/muteximpl.h
index 435b43634d..3d717420f2 100644
--- a/cpukit/include/rtems/posix/muteximpl.h
+++ b/cpukit/include/rtems/posix/muteximpl.h
@@ -2,8 +2,8 @@
  * @file
  *
  * @brief Private Inlined Routines for POSIX Mutex's.
- * 
- * This include file contains the static inline implementation of the private 
+ *
+ * This include file contains the static inline implementation of the private
  * inlined routines for POSIX mutex's.
  */
 
@@ -104,7 +104,7 @@ RTEMS_INLINE_ROUTINE POSIX_Mutex_Protocol 
_POSIX_Mutex_Get_protocol(
   unsigned long flags
 )
 {
-  return flags & POSIX_MUTEX_PROTOCOL_MASK;
+  return (POSIX_Mutex_Protocol) (flags & POSIX_MUTEX_PROTOCOL_MASK);
 }
 
 RTEMS_INLINE_ROUTINE bool _POSIX_Mutex_Is_recursive(
@@ -484,4 +484,3 @@ bool _POSIX_Mutex_Auto_initialization( POSIX_Mutex_Control 
*the_mutex );
 
 #endif
 /*  end of include file */
-
diff --git a/cpukit/include/rtems/posix/pthreadattrimpl.h 
b/cpukit/include/rtems/posix/pthreadattrimpl.h
index b5e02ec1c7..7cd69142a6 100644
--- a/cpukit/include/rtems/posix/pthreadattrimpl.h
+++ b/cpukit/include/rtems/posix/pthreadattrimpl.h
@@ -72,7 +72,7 @@ RTEMS_INLINE_ROUTINE void 
_POSIX_Threads_Get_sched_param_sporadic(
 #if defined(RTEMS_POSIX_API)
   const POSIX_API_Control *api;
 
-  api = the_thread->API_Extensions[ THREAD_API_POSIX ];
+  api = (const POSIX_API_Control*) the_thread->API_Extensions[ 
THREAD_API_POSIX ];
   param->sched_ss_low_priority = _POSIX_Priority_From_core(
 scheduler,
 api->Sporadic.Low_priority.priority
diff --git a/cpukit/include/rtems/rtl/rtl-obj.h 
b/cpukit/include/rtems/rtl/rtl-obj.h
index f27ae3259d..c1fe51306b 100644
--- a/cpukit/include/rtems/rtl/rtl-obj.h
+++ b/cpukit/include/rtems/rtl/rtl-obj.h
@@ -231,7 +231,7 @@ struct rtems_rtl_obj
   size_t  tramps_size;  /**< Size of the trampoline memory. */
   void*   tramp_brk;/**< Trampoline memory allocator. MD
  *   relocators can take memory from the
- *   break upto the size. */
+ *   break up to the size

Re: Weird Cygwin Build Failure

2022-08-26 Thread Chris Johns
On 27/8/2022 12:13 am, Joel Sherrill wrote:
> Hi
> 
> https://lists.rtems.org/pipermail/build/2022-August/035493.html
>  -- m68k on
> Cygwin fails with this weird error. 
> 
> 
> 
> 
> rm gcc.pod
> make[2]: Leaving directory 
> '/home/rtems-tester/rtems-cron-5/rtems-source-builder/rtems/build/m68k-rtems5-gcc-7.5.0-newlib-7947581-x86_64-pc-cygwin-1/build/gcc'
> make[2]: write error: stdout
> make[1]: *** [Makefile:4238: all-gcc] Error 1
> make[1]: Leaving directory 
> '/home/rtems-tester/rtems-cron-5/rtems-source-builder/rtems/build/m68k-rtems5-gcc-7.5.0-newlib-7947581-x86_64-pc-cygwin-1/build'
> make: *** [Makefile:903: all] Error 2
> shell cmd failed: sh -ex  
> /home/rtems-tester/rtems-cron-5/rtems-source-builder/rtems/build/m68k-rtems5-gcc-7.5.0-newlib-7947581-x86_64-pc-cygwin-1/do-build
> error: building m68k-rtems5-gcc-7.5.0-newlib-7947581-x86_64-pc-cygwin-1
>   See error report: 
> rsb-report-m68k-rtems5-gcc-7.5.0-newlib-7947581-x86_64-pc-cygwin-1.txt
> 
> 
> 
> At least the arm fails with this also. Any ideas?

Do the RTEMS 6 tools build?

Chris
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH RTEMS 5] cpukit/include: Fix including in C++

2022-08-26 Thread Joel Sherrill
I'm ok with these but which were actually causing trouble?

On Fri, Aug 26, 2022, 8:12 PM  wrote:

> From: Chris Johns 
>
> Closes #4709
> ---
>  cpukit/include/link_elf.h |  8 
>  cpukit/include/linux/rbtree.h | 10 +-
>  cpukit/include/rtems/capture.h|  4 ++--
>  cpukit/include/rtems/posix/muteximpl.h|  7 +++
>  cpukit/include/rtems/posix/pthreadattrimpl.h  |  2 +-
>  cpukit/include/rtems/rtl/rtl-obj.h| 20 +++
>  cpukit/include/rtems/rtl/rtl.h|  2 +-
>  cpukit/include/rtems/score/priority.h |  4 ++--
>  cpukit/include/rtems/score/priorityimpl.h |  2 +-
>  cpukit/include/rtems/score/scheduleredfimpl.h |  4 ++--
>  cpukit/include/rtems/score/tls.h  |  2 +-
>  cpukit/include/rtems/score/watchdogimpl.h |  2 +-
>  12 files changed, 47 insertions(+), 20 deletions(-)
>
> diff --git a/cpukit/include/link_elf.h b/cpukit/include/link_elf.h
> index 6cab3c2c7f..6483c021fd 100644
> --- a/cpukit/include/link_elf.h
> +++ b/cpukit/include/link_elf.h
> @@ -13,6 +13,10 @@
>  #include 
>  #include 
>
> +#ifdef __cplusplus
> +extern "C" {
> +#endif
> +
>  enum sections
>  {
>rap_text = 0,
> @@ -76,4 +80,8 @@ int _rtld_linkmap_add (rtems_rtl_obj* obj);
>   * Remove link map from the list.
>   */
>  void _rtld_linkmap_delete (rtems_rtl_obj* obj);
> +
> +#ifdef __cplusplus
> +}
> +#endif
>  #endif /* _LINK_ELF_H_ */
> diff --git a/cpukit/include/linux/rbtree.h b/cpukit/include/linux/rbtree.h
> index 8fc575240f..ec0fac1af9 100644
> --- a/cpukit/include/linux/rbtree.h
> +++ b/cpukit/include/linux/rbtree.h
> @@ -17,6 +17,10 @@
>
>  #include 
>
> +#ifdef __cplusplus
> +extern "C" {
> +#endif
> +
>  #define rb_node RBTree_Node
>
>  #define rb_left Node.rbe_left
> @@ -96,7 +100,7 @@ static inline struct rb_node *rb_last( struct rb_root
> *root )
>
>  static inline void rb_replace_node(
>struct rb_node *victim,
> -  struct rb_node *replacement,
> +  struct rb_node *replacement,
>struct rb_root *root
>  )
>  {
> @@ -138,4 +142,8 @@ static inline struct rb_node *rb_parent( struct
> rb_node *node )
>  node = next \
>)
>
> +#ifdef __cplusplus
> +}
> +#endif
> +
>  #endif /* _LINUX_RBTREE_H */
> diff --git a/cpukit/include/rtems/capture.h
> b/cpukit/include/rtems/capture.h
> index c37d652211..4ab638ec24 100644
> --- a/cpukit/include/rtems/capture.h
> +++ b/cpukit/include/rtems/capture.h
> @@ -838,7 +838,7 @@ rtems_capture_task_flags (rtems_tcb* tcb)
>  static inline rtems_capture_control*
>  rtems_capture_task_control (rtems_tcb* tcb)
>  {
> -  return tcb->Capture.control;
> +  return (rtems_capture_control*) tcb->Capture.control;
>  }
>
>  /**
> @@ -853,7 +853,7 @@ rtems_capture_task_control (rtems_tcb* tcb)
>  static inline uint32_t
>  rtems_capture_task_control_flags (rtems_tcb* tcb)
>  {
> -  rtems_capture_control*  control = tcb->Capture.control;
> +  rtems_capture_control*  control = rtems_capture_task_control (tcb);
>if (!control)
>  return 0;
>return control->flags;
> diff --git a/cpukit/include/rtems/posix/muteximpl.h
> b/cpukit/include/rtems/posix/muteximpl.h
> index 435b43634d..3d717420f2 100644
> --- a/cpukit/include/rtems/posix/muteximpl.h
> +++ b/cpukit/include/rtems/posix/muteximpl.h
> @@ -2,8 +2,8 @@
>   * @file
>   *
>   * @brief Private Inlined Routines for POSIX Mutex's.
> - *
> - * This include file contains the static inline implementation of the
> private
> + *
> + * This include file contains the static inline implementation of the
> private
>   * inlined routines for POSIX mutex's.
>   */
>
> @@ -104,7 +104,7 @@ RTEMS_INLINE_ROUTINE POSIX_Mutex_Protocol
> _POSIX_Mutex_Get_protocol(
>unsigned long flags
>  )
>  {
> -  return flags & POSIX_MUTEX_PROTOCOL_MASK;
> +  return (POSIX_Mutex_Protocol) (flags & POSIX_MUTEX_PROTOCOL_MASK);
>  }
>
>  RTEMS_INLINE_ROUTINE bool _POSIX_Mutex_Is_recursive(
> @@ -484,4 +484,3 @@ bool _POSIX_Mutex_Auto_initialization(
> POSIX_Mutex_Control *the_mutex );
>
>  #endif
>  /*  end of include file */
> -
> diff --git a/cpukit/include/rtems/posix/pthreadattrimpl.h
> b/cpukit/include/rtems/posix/pthreadattrimpl.h
> index b5e02ec1c7..7cd69142a6 100644
> --- a/cpukit/include/rtems/posix/pthreadattrimpl.h
> +++ b/cpukit/include/rtems/posix/pthreadattrimpl.h
> @@ -72,7 +72,7 @@ RTEMS_INLINE_ROUTINE void
> _POSIX_Threads_Get_sched_param_sporadic(
>  #if defined(RTEMS_POSIX_API)
>const POSIX_API_Control *api;
>
> -  api = the_thread->API_Extensions[ THREAD_API_POSIX ];
> +  api = (const POSIX_API_Control*) the_thread->API_Extensions[
> THREAD_API_POSIX ];
>param->sched_ss_low_priority = _POSIX_Priority_From_core(
>  scheduler,
>  api->Sporadic.Low_priority.priority
> diff --git a/cpukit/include/rtems/rtl/rtl-obj.h
> b/cpukit/include/rtems/rtl/rtl-obj.h
> index f27ae3259d..c1fe51306b 100644
> --- a/cpukit/include/rtems/rtl/rtl-obj.h
> +++ b/cpukit/include/rtems/rtl/rtl-obj.h
> @@ -231,7 +231,7 @@ s

Re: Weird Cygwin Build Failure

2022-08-26 Thread Joel Sherrill
On Fri, Aug 26, 2022, 8:14 PM Chris Johns  wrote:

> On 27/8/2022 12:13 am, Joel Sherrill wrote:
> > Hi
> >
> > https://lists.rtems.org/pipermail/build/2022-August/035493.html
> >  --
> m68k on
> > Cygwin fails with this weird error.
> >
> >
> > 
> >
> > rm gcc.pod
> > make[2]: Leaving directory
> '/home/rtems-tester/rtems-cron-5/rtems-source-builder/rtems/build/m68k-rtems5-gcc-7.5.0-newlib-7947581-x86_64-pc-cygwin-1/build/gcc'
> > make[2]: write error: stdout
> > make[1]: *** [Makefile:4238: all-gcc] Error 1
> > make[1]: Leaving directory
> '/home/rtems-tester/rtems-cron-5/rtems-source-builder/rtems/build/m68k-rtems5-gcc-7.5.0-newlib-7947581-x86_64-pc-cygwin-1/build'
> > make: *** [Makefile:903: all] Error 2
> > shell cmd failed: sh -ex
> /home/rtems-tester/rtems-cron-5/rtems-source-builder/rtems/build/m68k-rtems5-gcc-7.5.0-newlib-7947581-x86_64-pc-cygwin-1/do-build
> > error: building m68k-rtems5-gcc-7.5.0-newlib-7947581-x86_64-pc-cygwin-1
> >   See error report:
> rsb-report-m68k-rtems5-gcc-7.5.0-newlib-7947581-x86_64-pc-cygwin-1.txt
> >
> > 
> >
> > At least the arm fails with this also. Any ideas?
>
> Do the RTEMS 6 tools build?
>

That would be in the build list archive. But I doubt it .. at least
reliably. It seems like a cygwin fault

>
> Chris
>
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel

Re: [PATCH RTEMS 5] cpukit/include: Fix including in C++

2022-08-26 Thread Chris Johns
On 27/8/2022 11:13 am, Joel Sherrill wrote:
> I'm ok with these but which were actually causing trouble?

The watchdog, the left and the capture engine include cause the orginal problem.
I fixed those and some others on 6 then backported those that applied to 5.

OK to push?

Chris
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel


Re: Weird Cygwin Build Failure

2022-08-26 Thread Chris Johns
On 27/8/2022 11:15 am, Joel Sherrill wrote:
> On Fri, Aug 26, 2022, 8:14 PM Chris Johns  > wrote:
> 
> On 27/8/2022 12:13 am, Joel Sherrill wrote:
> > Hi
> >
> > https://lists.rtems.org/pipermail/build/2022-August/035493.html
> 
> >  > -- 
> m68k on
> > Cygwin fails with this weird error. 
> >
> >
> > 
> >
> > rm gcc.pod
> > make[2]: Leaving directory
> 
> '/home/rtems-tester/rtems-cron-5/rtems-source-builder/rtems/build/m68k-rtems5-gcc-7.5.0-newlib-7947581-x86_64-pc-cygwin-1/build/gcc'
> > make[2]: write error: stdout
> > make[1]: *** [Makefile:4238: all-gcc] Error 1
> > make[1]: Leaving directory
> 
> '/home/rtems-tester/rtems-cron-5/rtems-source-builder/rtems/build/m68k-rtems5-gcc-7.5.0-newlib-7947581-x86_64-pc-cygwin-1/build'
> > make: *** [Makefile:903: all] Error 2
> > shell cmd failed: sh -ex 
> 
> /home/rtems-tester/rtems-cron-5/rtems-source-builder/rtems/build/m68k-rtems5-gcc-7.5.0-newlib-7947581-x86_64-pc-cygwin-1/do-build
> > error: building m68k-rtems5-gcc-7.5.0-newlib-7947581-x86_64-pc-cygwin-1
> >   See error report:
> rsb-report-m68k-rtems5-gcc-7.5.0-newlib-7947581-x86_64-pc-cygwin-1.txt
> >
> > 
> >
> > At least the arm fails with this also. Any ideas?
> 
> Do the RTEMS 6 tools build?
> 
> That would be in the build list archive. But I doubt it .. at least reliably. 
> It
> seems like a cygwin fault 

Seems so or make as it's children and it have the issue. Note, the RSB captures
`stdout` of the child processes.

Chris
___
devel mailing list
devel@rtems.org
http://lists.rtems.org/mailman/listinfo/devel