#1238 closed defect (fixed)

testsuites/samples/nsecs/init.c breaks --disable-posix

Reported by: Ralf Corsepius Owned by: Joel Sherrill
Priority: normal Milestone: 4.8
Component: score Version: 4.8
Severity: normal Keywords:
Cc: Blocked By:
Blocking:

Description

gmake[3]: Entering directory `/users/rtems/src/rtems-cvs/build/rtems-4.8/powerpc-rtems4.8/c/helas403/testsuites/samples/nsecs'
powerpc-rtems4.8-gcc -B../../../../../helas403/lib/ -specs bsp_specs -qrtems -mcpu=403 -D_OLD_EXCEPTIONS -Dppc403 -O2 -g -fno-keep-inline-functions -o nsecs.exe init.o
init.o: In function `Init':
../../../../../../../../rtems.orig/c/src/../../testsuites/samples/nsecs/init.c:77: undefined reference to `clock_gettime'
../../../../../../../../rtems.orig/c/src/../../testsuites/samples/nsecs/init.c:78: undefined reference to `clock_gettime'
collect2: ld returned 1 exit status

Possible work-arounds:

  1. Build posix/src/clockgettime.c independently from --disable/enable-posix.
  2. Disable the nsec test for --disable-posix

As clock_gettime is part of POSIX/SUSv (it is not part of the pthread specification) and unconditionally defined in newlib, I am in favor of 1.

The traditional RTEMS workaround would be to move clockgettime.c (And probably other clock*.c's) to libcsupport, but .. this breakdown (once more) exposes another issue: the semantics of "posix"/"libposix" in RTEMS.

I for one always understood "posix"/"libposix" as synonym for "pthread support" and interpreted "--enable/disable-posix" as configuration option to enable/disable anything that requires pthreads.

Change History (1)

comment:1 Changed on May 7, 2008 at 10:52:44 PM by Joel Sherrill

Resolution: fixed
Status: newclosed

Fixed on head.

Note: See TracTickets for help on using tickets.