bk: 52c743aatSh58iMpciUeJ4vU4ZBckg
+* [Bug 2332] Force reference to 'libgcc_s' when using GCC, because
+ threading+restricted user+locked memory otherwise fails on Linux.
* [Bug 2060] Warn about restrictions with "kod" but not "limited".
(4.2.7p408) 2013/12/29 Released by Harlan Stenn <stenn@ntp.org>
* [Bug 2187] Update version number generation scripts.
yes)
PTHREAD_LIBS="$LTHREAD_LIBS"
have_pthreads=yes
+ # bug 2332: With GCC we need to force a reference to libgcc_s, or the
+ # combination threads + setuid + mlockall does not work on linux
+ # because thread cancellation fails to load libgcc_s with dlopen().
+ # We have to pass this all as linker options to avoid argument
+ # reordering by libtool.
+ case "$GCC" in
+ yes)
+ PTHREAD_LIBS="$LTHREAD_LIBS -Wl,--no-as-needed,-lgcc_s,--as-needed"
+ ;;
+ esac
esac
esac
esac