Nicolas Boulenguez <nico...@debian.org> writes:

> PR ada/114065
>
> Hello.
> Any news about these patches?

Hello,

Sorry about the delay. Arnaud already replied on BZ, but I'll add a few
remarks.

In 0001-Ada-merge-all-timeval-and-timespec-definitions-and-c.patch:

> -   --  C timeval represent a duration (used in Select for example). This
> -   --  structure is composed of a number of seconds and a number of micro
> -   --  seconds. The timeval structure is not exposed here because its
> -   --  definition is target dependent. Interface to C programs is done via a
> -   --  pointer to timeval structure.
> +   function To_Duration (T : not null access timeval)
> +                        return System.C_Time.Non_Negative_Duration
> +     with Inline
> +   is (System.C_Time.To_Duration (T.all));
> +   --  Deprecated.  Please use C_Time directly.

The aspect "with Inline" is incorrect, it should be last, after the
return expression. The above does not build.

The obvious fix would be:

   function To_Duration (T : not null access timeval)
                        return System.C_Time.Non_Negative_Duration
   is (System.C_Time.To_Duration (T.all))
     with Inline;

In 0007-Ada-drop-unneeded-darwin-solaris-x32-variants-of-Sys.patch:

> diff --git a/gcc/ada/Makefile.rtl b/gcc/ada/Makefile.rtl
> index 82d01b2..1f339f3 100644
> @@ -2619,7 +2619,7 @@ ifeq ($(strip $(filter-out %x32 linux%,$(target_cpu) 
> $(target_os))),)
>    s-mudido.adb<libgnarl/s-mudido__affinity.adb \
>    s-osinte.ads<libgnarl/s-osinte__linux.ads \
>    s-osinte.adb<libgnarl/s-osinte__x32.adb \
> -  s-osprim.adb<libgnat/s-osprim__x32.adb \
> +  s-osprim.adb<libgnat/s-osprim__rtems.adb \
>    s-taprop.adb<libgnarl/s-taprop__linux.adb \
>    s-tasinf.ads<libgnarl/s-tasinf__linux.ads \
>    s-tasinf.adb<libgnarl/s-tasinf__linux.adb \
> @@ -2703,7 +2703,7 @@ ifeq ($(strip $(filter-out darwin%,$(target_os))),)
>    ifeq ($(strip $(filter-out %86,$(target_cpu))),)
>      LIBGNAT_TARGET_PAIRS += \
>        s-intman.adb<libgnarl/s-intman__susv3.adb \
> -      s-osprim.adb<libgnat/s-osprim__darwin.adb \
> +      s-osprim.adb<libgnat/s-osprim__rtems.adb \
>        $(ATOMICS_TARGET_PAIRS) \
>        system.ads<libgnat/system-darwin-x86.ads
>
> @@ -2722,7 +2722,7 @@ ifeq ($(strip $(filter-out darwin%,$(target_os))),)
>    ifeq ($(strip $(filter-out %x86_64,$(target_cpu))),)
>      LIBGNAT_TARGET_PAIRS += \
>        s-intman.adb<libgnarl/s-intman__susv3.adb \
> -      s-osprim.adb<libgnat/s-osprim__darwin.adb \
> +      s-osprim.adb<libgnat/s-osprim__rtems.adb \
>        a-exetim.ads<libgnarl/a-exetim__default.ads \
>        a-exetim.adb<libgnarl/a-exetim__darwin.adb \
>        $(ATOMICS_TARGET_PAIRS) \
> @@ -2769,7 +2769,7 @@ ifeq ($(strip $(filter-out darwin%,$(target_os))),)
>    ifeq ($(strip $(filter-out arm,$(target_cpu))),)
>      LIBGNAT_TARGET_PAIRS += \
>        s-intman.adb<libgnarl/s-intman__susv3.adb \
> -      s-osprim.adb<libgnat/s-osprim__darwin.adb \
> +      s-osprim.adb<libgnat/s-osprim__rtems.adb \
>        $(ATOMICS_TARGET_PAIRS) \
>        $(ATOMICS_BUILTINS_TARGET_PAIRS)
>
> @@ -2782,7 +2782,7 @@ ifeq ($(strip $(filter-out darwin%,$(target_os))),)
>        a-nallfl.ads<libgnat/a-nallfl__wraplf.ads \
>        s-intman.adb<libgnarl/s-intman__susv3.adb \
>        s-dorepr.adb<libgnat/s-dorepr__fma.adb \
> -      s-osprim.adb<libgnat/s-osprim__darwin.adb \
> +      s-osprim.adb<libgnat/s-osprim__rtems.adb \
>        $(ATOMICS_TARGET_PAIRS) \
>        $(ATOMICS_BUILTINS_TARGET_PAIRS) \
>        $(GNATRTL_128BIT_PAIRS)
>
> diff --git a/gcc/ada/libgnat/s-osprim__rtems.adb 
> b/gcc/ada/libgnat/s-osprim__rtems.adb
> index f7b607a..6116345 100644
> --- a/gcc/ada/libgnat/s-osprim__rtems.adb
> +++ b/gcc/ada/libgnat/s-osprim__rtems.adb
> @@ -29,7 +29,7 @@
>  --                                                                          
> --
>  
> ------------------------------------------------------------------------------
>
> ---  This version is for POSIX-like operating systems
> +--  This version is for POSIX-like operating systems, Darwin and Linux/x32.
>
>  with System.C_Time;

It may be surprising to have the RTEMS file used by other OS. The
original comment should have mentionned that in the first place, but the
file was only used with RTEMS. With your change, the file is effectively
shared, so it would be best to rename it.

Tests are running and I'll report any issue we may find.

Thank you for your patience,
Marc

Reply via email to