[Bug 1238] New: testsuites/samples/nsecs/init.c breaks --disable-posix

rtems-bugs at rtems.org rtems-bugs at rtems.org
Thu Apr 12 10:59:32 UTC 2007


           Summary: testsuites/samples/nsecs/init.c breaks --disable-posix
           Product: RTEMS
           Version: 4.8
          Platform: All
        OS/Version: RTEMS
            Status: NEW
          Severity: normal
          Priority: P3
         Component: cpukit
        AssignedTo: joel.sherrill at oarcorp.com
        ReportedBy: ralf.corsepius at rtems.org

gmake[3]: Entering directory
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':
undefined reference to `clock_gettime'
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.

Configure bugmail: http://www.rtems.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

More information about the bugs mailing list