Subject: gcc 3.2 + ada + cygwin: nanosleep unknown
From: Pierre Habraken <[email-masked]>
To: [email-masked], [email-masked]
Date: Mon, 14 Oct 2002 13:17:11 +0200

Hello,

When compiling an Ada program with gcc 3.2 in the Cygwin environment I
get the following error at link time:

$ gnatlink program.ali
/opt/gnu/ada/lib/gcc-lib/i686-pc-cygwin/3.2/adalib/libgnat.a(s-osprim.o):
In function `system__os_primitives__timed_delay':
/usr/local/src/build-cygwin/gcc-3.2-ada/gcc/ada/rts/s-osprim.adb:145:
undefined
reference to `_nanosleep'
collect2: ld returned 1 exit status
gnatlink: cannot call /opt/gnu/ada/bin/gcc.exe
gnatmake: *** link failed.

Apparently the emulation of the (Posix) nanosleep() system call is not
supported by Cygwin.
This function is called by the Ada multi-tasking runtime for the
execution of the 'delay' Ada statement.

I configured gcc 3.2 with following options:
$ srcdir/configure --prefix=/opt/gnu/ada --enable-languages=ada
--enable-threads=win32 --disable-win32-registry
I also tried a build with posix multi-threading instead of the win32
one, but the error still occured.
I used the bootstrap compiler (gcc-3.2) made available by David
(mailto:[email-masked]) a few weeks ago.

Does anyone have an idea about a workaround I could try ?

Thanks in advance for any help.

Pierre
-- 
________________________________________________________________________
Pierre HABRAKEN - mailto:[email-masked]
Tél: 04 76 82 72 83 - Fax: 04 76 82 72 87
IMAG-LSR BP72 38402 SAINT MARTIN D'HERES Cedex
________________________________________________________________________

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/