> s-osinte.ads:445:07: warning: formal parameter "attr" is not referenced
Hello. Why does a simple warning lets the build fail? A quick search seems to show that pthread_mutex_* functions are now available on freeBSD. If so, replacing debian/patches/ada-kfreebsd.diff with the attached version may fix the issue. Else, it is sufficient to remove the short implementation in the specification ("is (0)" in s-osint-freebsd.ads) with normal implementations in the body declaring that the formal parameters are not used: function Pthread_Mutex_Foo (Bla : in Int) is pragma Unreferenced (Bla); begin return 0; end Pthread_Mutex_Foo; in s-osint-freebsd.adb. Ada requires no specific place in the body, but gnat often sorts the implementations by alphabetical order.
Description: add support for GNU/kFreeBSD and GNU/Hurd. For now, it seems that BSD requires -lrt. It will be ignored on other platforms thanks to --as-needed. Author: Ludovic Brenta <lbre...@debian.org> Author: Nicolas Boulenguez <nico...@debian.org> --- a/src/gcc/ada/libgnarl/s-osinte__kfreebsd-gnu.ads +++ b/src/gcc/ada/libgnarl/s-osinte__kfreebsd-gnu.ads @@ -45,6 +45,7 @@ package System.OS_Interface is pragma Preelaborate; pragma Linker_Options ("-lpthread"); + pragma Linker_Options ("-lrt"); subtype int is Interfaces.C.int; subtype char is Interfaces.C.char; --- a/src/gcc/ada/gsocket.h +++ b/src/gcc/ada/gsocket.h @@ -253,6 +253,7 @@ #endif #if defined (__FreeBSD__) || defined (__vxworks) || defined(__rtems__) \ + || defined (__FreeBSD_kernel__) || defined(__GNU__) \ || defined (__DragonFly__) || defined (__NetBSD__) || defined (__OpenBSD__) # define Has_Sockaddr_Len 1 #else --- a/src/gcc/ada/s-oscons-tmplt.c +++ b/src/gcc/ada/s-oscons-tmplt.c @@ -1705,6 +1705,7 @@ CND(CLOCK_THREAD_CPUTIME_ID, "Thread CPU #if defined(__linux__) || defined(__FreeBSD__) \ || (defined(_AIX) && defined(_AIXVERSION_530)) \ + || defined(__FreeBSD_kernel__) \ || defined(__DragonFly__) || defined(__QNX__) /** On these platforms use system provided monotonic clock instead of ** the default CLOCK_REALTIME. We then need to set up cond var attributes