Has anyone tried to port Mono to RTEMS

Russell Haley russ.haley at gmail.com
Tue Jul 25 03:17:01 UTC 2017


On Mon, Jul 24, 2017 at 7:42 PM, xuelin.tian at qkmtech.com
<xuelin.tian at qkmtech.com> wrote:
> I do not know, and I just comment the check function in configure.ac.
> And another error comes up... still working on it...
>
> ________________________________
> Best wishes,
> xuelin.tian at qkmtech.com
>
>
> From: Chris Johns
> Date: 2017-07-25 10:02
> To: xuelin.tian at qkmtech.com; Russell Haley; Joel Sherrill
> CC: users at rtems.org
> Subject: Re: Has anyone tried to port Mono to RTEMS
> On 25/07/2017 11:53, xuelin.tian at qkmtech.com wrote:
>> This is the config log, https://pastebin.com/Nc4EQy7D
>> You can start from Line 11218.
>>
>> And the check function from configure.ac is shown below:
>> dnl ********************************
>> dnl *** Checks for timezone stuff **
>> dnl ********************************
>> AC_CACHE_CHECK(for tm_gmtoff in struct tm, ac_cv_struct_tm_gmtoff,
>> AC_TRY_COMPILE([
>> #include <time.h>
>> ], [
>> struct tm tm;
>> tm.tm_gmtoff = 1;
>> ], ac_cv_struct_tm_gmtoff=yes, ac_cv_struct_tm_gmtoff=no))
>> if test $ac_cv_struct_tm_gmtoff = yes; then
>> AC_DEFINE(HAVE_TM_GMTOFF, 1, [Have tm_gmtoff])
>> else
>> AC_CACHE_CHECK(for timezone variable, ac_cv_var_timezone,
>> AC_TRY_COMPILE([
>> #include <time.h>
>> ], [
>> timezone = 1;
>> ], ac_cv_var_timezone=yes, ac_cv_var_timezone=no))
>> if test $ac_cv_var_timezone = yes; then
>> AC_DEFINE(HAVE_TIMEZONE, 1, [Have timezone variable])
>> else
>> AC_ERROR(unable to find a way to determine timezone)
>> fi
>> fi
>
> The log says (saving everyone from pastebin ads):
>
> configure:22637: result: no
> configure:22647: checking for tm_gmtoff in struct tm
> configure:22668: arm-rtems4.11-gcc -c -qrtems
> -B/opt/rtems-4.11.1-release/4.11-bsp/arm-rtems4.11/lib
> -B/opt/rtems-4.11.1-release/4.11-bsp/arm-rtems4.11/xilinx_zynq_zedboard/lib/
> --specs bsp_specs -march=armv7-a -mthumb -mfpu=neon -mfloat-abi=hard
> -mtune=cortex-a9 -std=gnu99 -fno-strict-aliasing -fwrapv
> -Wno-zero-length-array
> -DMONO_DLL_EXPORT -Wno-unused-but-set-variable -g -Wall -Wunused
> -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes
> -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-cast-qual
> -Wwrite-strings -Wno-switch -Wno-switch-enum -Wno-unused-value
> -Wno-attributes
> -DGC_LINUX_THREADS -D_GNU_SOURCE -D_REENTRANT -DUSE_MMAP -DUSE_MUNMAP -g
> -Wall
> -Wunused -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes
> -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-cast-qual
> -Wwrite-strings -Wno-switch -Wno-switch-enum -Wno-unused-value
> -Wno-attributes
> conftest.c >&5
> conftest.c:81:1: warning: function declaration isn't a prototype
> [-Wstrict-prototypes]
> main ()
> ^
> conftest.c: In function 'main':
> conftest.c:85:6: error: 'struct tm' has no member named 'tm_gmtoff'
>     tm.tm_gmtoff = 1;
>       ^
> It looks like we do not have __TM_GMTOFF defined so do not currently have
> this
> field supported. The second test is for `timezone`:

Not ISO C apparently:
https://www.gnu.org/software/libc/manual/html_node/Broken_002ddown-Time.html

"...The tm_gmtoff field is derived from BSD and is a GNU library
extension; it is not visible in a strict ISO C environment."

> configure:22675: result: no
> configure:22682: checking for timezone variable
> configure:22702: arm-rtems4.11-gcc -c -qrtems
> -B/opt/rtems-4.11.1-release/4.11-bsp/arm-rtems4.11/lib
> -B/opt/rtems-4.11.1-release/4.11-bsp/arm-rtems4.11/xilinx_zynq_zedboard/lib/
> --specs bsp_specs -march=armv7-a -mthumb -mfpu=neon -mfloat-abi=hard
> -mtune=cortex-a9 -std=gnu99 -fno-strict-aliasing -fwrapv
> -Wno-zero-length-array
> -DMONO_DLL_EXPORT -Wno-unused-but-set-variable -g -Wall -Wunused
> -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes
> -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-cast-qual
> -Wwrite-strings -Wno-switch -Wno-switch-enum -Wno-unused-value
> -Wno-attributes
> -DGC_LINUX_THREADS -D_GNU_SOURCE -D_REENTRANT -DUSE_MMAP -DUSE_MUNMAP -g
> -Wall
> -Wunused -Wmissing-prototypes -Wmissing-declarations -Wstrict-prototypes
> -Wmissing-prototypes -Wnested-externs -Wpointer-arith -Wno-cast-qual
> -Wwrite-strings -Wno-switch -Wno-switch-enum -Wno-unused-value
> -Wno-attributes
> conftest.c >&5
> conftest.c:81:1: warning: function declaration isn't a prototype
> [-Wstrict-prototypes]
> main ()
> ^
> conftest.c: In function 'main':
> conftest.c:84:5: error: 'timezone' undeclared (first use in this function)
>      timezone = 1;
>      ^
> conftest.c:84:5: note: each undeclared identifier is reported only once for
> each
> function it appears in
>
> I am not sure about this one.
>
> Chris



More information about the users mailing list