bug#13550: [PATCH] libtool: handle the -pthread{,s} options for g++
Mihai Moldovan <[email protected]>
| Newsgroups | gmane.comp.gnu.libtool.bugs |
|---|---|
| Message-ID | <[email protected]> |
Hi Pavel I am afraid this patch WILL lead to breakage on systems that do not have a library called "pthread" and use the GCC suite/g++. Another point of discussion might be if libtool should catch situations in which users explicitly(!) set both the -nostdlib and -pthread(s) compiler flags and add appropriate library dependencies, but that might be too much magic. Finding the actual library implementing portable threads support is non-trivial, which is why helpers like AX_PTHREAD exist. For instance, some systems put the implementation in libpthread.sharedext, while others put it in libpthreads.sharedext (note the additional s) and even others put it into libc directly without a special library (e.g., Darwin). Worse, there are systems out there (or have existed historically) like DEC UNIX that have both a libpthread.sharedext and libpthreads.sharedext library, with the former implementing the proper portable threads standard, while the latter implements... something called DECthreads based on the CMA (Compaq-proprietary) and DCE threaded (some early POSIX draft(!)) interfaces. I'll submit a patch to the GNU Autoconf Archive to work around that bug in AX_PTHREAD by adding the first found pthread library to PTHREAD_LIBS if gcc is being used (as the C compiler, anyway, because AX_PTHREAD always checks using C, which should be mostly fine, but that's a different topic) and the -pthread compiler flag is being checked as candidate for enabling pthread support. Nevertheless, this bug has been around for more than 10 years now and I'd really like to finally see it fixed, because working around it is getting really old. Mihai _______________________________________________ Bug-libtool mailing list [email protected] https://lists.gnu.org/mailman/listinfo/bug-libtool
signature.asc
(application/pgp-signature, 899 B)
-----BEGIN PGP SIGNATURE----- Comment: Using GnuPG with Thunderbird - https://www.enigmail.net/ iQIzBAEBCgAdFiEEbhHQj3UzgcdE8cg8H9Yu2W4lOocFAlynJJoACgkQH9Yu2W4l OoeDcg//f96mxkX7KnXCas8d2iXqlW8eVn7Ou9xRsgUHwRzLeerI9CYiUS1mmJ6J EpIR4HUvF+8KYN2H0Lcj9X4GqgXyGqk9y0s88/brgy8uarLg6F92McP6Mz/jAHeq 5kbQOTxNMxEta1NMrfblDfSd75vJxLNehuj6erMKRHOAiZogxuac9YLpW3fqFrvK uM4Gk9wiPdEFxzQjK+b+/ADQQv1YHSmPU1WcwSwpZoDRbjcLLds9kucrA8WVVKMZ Gan9DbcUQ4a0Im2q7asS1cXT3pTibEhSXaZdpUOHB2f0ptUZ3GqzTACT8+xhHCye HkfzLa6uZwX/IjRFdCivAx5O+brgYClO6ZP0E45xo9sJ54DnJb5+0KnS+oYKEtBM zXa7Ru0Y3hyroLO/1z1N2N7GzNxtTAb1KopD+nYljqK2fmkpA+w2QNApBa94HkMb QOHYhq31DuVlkixv504EPsC07LLDv/5Wkjor0iz1cgI7OPiDW7PFQpDB1VaVJ56M MuaWyBMbXSde3pUPkw8v28f5JaY9+swghNvCiL1d+xy6/SCqwj/W3vyKOUAPlgqP 0q9dV27AvdDMkqq4Fh3qCDohfAGk2FQWKES7DBNTZ+KSs6t7JW1YSy8UQ9zPLp4n AZRFmBNL2YdfmTyu1X1E3sH6Ya4K7ulSwnnVOS1AYgQFTeRbk80= =604l -----END PGP SIGNATURE-----