Thank everyone for their consideration and responses. After reflecting on the challenges faced by the LTP project in building and running successfully on a wide variety of platforms, I realize that the conditional compilation is in fact required. Our cross-compilation environment is an unique situation and we need to handle the build-time problems at the local level. This patch is therefore not appropriate at the LTP project level and I consequently wish to withdraw it from further consideration on this mailing list. I will instead submit a new patch which ensures that all defined mutexes get default initialization at least, even if the conditional compilation results in omission of the code which would initialize them as PI mutexes.
On Tue, Jul 29, 2014 at 5:53 AM, <[email protected]> wrote: > Hi! > > LTP seems primarily intended to be built and run on the same machine, > > and thus uses autotools / autoconf to determine the features of the host > > machine's environment prior to compilation. However, when distributing > > precompiled binaries, or when building in a cross-compilation > environment, > > it is better not to disable features based on the compile-time > environment. > > > > This patch removes compile-time dependencies on priority-inheriting > mutexes > > and allows the code to attempt initialization of PI mutexes even > > if the runtime environment lacks that feature... in which case > > the associated test(s) should fail. > > > > Without this patch, init_pi_mutex() may be compiled as an empty function, > > allowing subsequent operations to be attempted on an un-inititalized > mutex. > > Likewise, testpi-3 may fail to initialize a mutex before starting > pthreads > > which attempt to use the mutex. > > As far as I can see the configure check tests if PTHREAD_PRIO_INHERIT is > defined in system headers. So if you just remove the ifdefs the > compilation will fail and if that is not the case, the check is broken. > > -- > Cyril Hrubis > [email protected] >
------------------------------------------------------------------------------
_______________________________________________ Ltp-list mailing list [email protected] https://lists.sourceforge.net/lists/listinfo/ltp-list
