On Sun, Mar 19, 2017 at 02:01:42PM +0000, Antti Kantee wrote: > On 19/03/17 13:20, Francesco Lattanzio wrote: > > librumpuser's configure script checks the availability of the 2 and 3 > > arguments versions of the pthread_setname_np() function. The checks rely > > on the compiler ability to emit a warning when an undefined function in > > invoked. > > This works on Clang and recent versions of GCC, but older versions of > > GCC (e.g., 4.9.x) don't emit -- by default -- the warning, making the > > checks to succeed unconditionally. > > > > The fix is as simple as adding -Wimplicit-function-declaration along > > side the -Werror option to the CFLAGS variable. > > So what's the failure mode? Both checks succeed? Because if you're > building in a env without pthread_setname_np() at all, the link phase of > the test should fail, making the compiler warnings irrelevant. So what > the test actually relies on is throwing an error for a prototype mismatch. > > Or are you building for an env with pthread_setname_np() in libpthread, > but no prototype for it in pthread.h? > > I'm reluctant to change configure.ac in src-netbsd unless I'm absolutely > sure -Wimplicit-function-declaration is the right thing for your env, > and has no side effects for other compilers (e.g. it's not a supported > flag for some). > > Can you post the relevant output from config.log under obj/tooldir/autoconf?
Please, forget the AC_TRY_LINK thing -- it was a stupid idea. -- Francesco Lattanzio
