When building an RTEMS 5 BSP for LEON3 we get the warnings below regarding missing _Timespec functions. These warnings result in linker errors when building an application that uses a rtems_bsdnet_ifconfig struct supplied as the network interface member of a rtems_bsdnet_config struct. We believe the fix is to add the following include in greth2.c: #include <rtems/score/timespec.h>. (Note there is also a trivial printf formatting warning that should also be fixed.)
For reference, we used the following as the arguments to configure: [rtems@localhost b-leon3]$ ../rtems/configure --target=sparc-rtems5 --enable-rtemsbsp=leon3 --enable-tests=samples --prefix=${HOME}/projects/rtems-devel/bsp-install Sincerely, Keith Morgan & Sam Larsen [rtems@localhost b-leon3]$ make Making all in sparc-rtems5/c [...] ../../../../../../../../rtems/c/src/lib/libbsp/sparc/leon3/../../../../../../bsps/shared/net/greth2.c: In function 'greth_initialize_hardware': ../../../../../../../../rtems/c/src/lib/libbsp/sparc/leon3/../../../../../../bsps/shared/net/greth2.c:329:5: warning: implicit declaration of function '_Timespec_Set_to_zero' [-Wimplicit-function-declaration] _Timespec_Set_to_zero(&sc->auto_neg_time); ^~~~~~~~~~~~~~~~~~~~~ ../../../../../../../../rtems/c/src/lib/libbsp/sparc/leon3/../../../../../../bsps/shared/net/greth2.c:329:5: warning: nested extern declaration of '_Timespec_Set_to_zero' [-Wnested-externs] ../../../../../../../../rtems/c/src/lib/libbsp/sparc/leon3/../../../../../../bsps/shared/net/greth2.c:338:21: warning: implicit declaration of function '_Timespec_Subtract'; did you mean 'timespecsub'? [-Wimplicit-function-declaration] _Timespec_Subtract(&tstart, &tnow, &sc->auto_neg_time); ^~~~~~~~~~~~~~~~~~ timespecsub ../../../../../../../../rtems/c/src/lib/libbsp/sparc/leon3/../../../../../../bsps/shared/net/greth2.c:338:21: warning: nested extern declaration of '_Timespec_Subtract' [-Wnested-externs] ../../../../../../../../rtems/c/src/lib/libbsp/sparc/leon3/../../../../../../bsps/shared/net/greth2.c:339:25: warning: implicit declaration of function '_Timespec_Greater_than' [-Wimplicit-function-declaration] if (_Timespec_Greater_than(&sc->auto_neg_time, &greth_tan)) { ^~~~~~~~~~~~~~~~~~~~~~ ../../../../../../../../rtems/c/src/lib/libbsp/sparc/leon3/../../../../../../bsps/shared/net/greth2.c:339:25: warning: nested extern declaration of '_Timespec_Greater_than' [-Wnested-externs] [...] -- Keith Shearl Morgan ISR-3, Space Data Systems Los Alamos National Laboratory
_______________________________________________ users mailing list users@rtems.org http://lists.rtems.org/mailman/listinfo/users