$OpenBSD: patch-gcc_config_openbsd-libpthread_h,v 1.1.1.1 2021/08/03 10:04:14 pascal Exp $
--- gcc/config/openbsd-libpthread.h.orig	Sun Sep 27 09:20:23 2009
+++ gcc/config/openbsd-libpthread.h	Sat Aug 25 09:50:23 2012
@@ -18,5 +18,5 @@
    along with GCC; see the file COPYING3.  If not see
    <http://www.gnu.org/licenses/>.  */
 
-#define OBSD_LIB_SPEC "%{!shared:%{pthread:-lpthread} -lc}"
+#define OBSD_LIB_SPEC "%{pthread:-lpthread%{!shared:%{p|pg:_p}}} %{!shared:-lc%{p:_p}%{!p:%{pg:_p}}}"
 
