From nobody Wed Feb 07 19:51:27 2024 X-Original-To: dev-commits-src-main@mlmmj.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mlmmj.nyi.freebsd.org (Postfix) with ESMTP id 4TVW2l5Pykz59y2l; Wed, 7 Feb 2024 19:51:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from mxrelay.nyi.freebsd.org (mxrelay.nyi.freebsd.org [IPv6:2610:1c1:1:606c::19:3]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "mxrelay.nyi.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4TVW2l4kFlz40M5; Wed, 7 Feb 2024 19:51:27 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707335487; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oT4iFzOpGeJ5ho6FQB0wlYMwhIl/7fIGrT8fDBUv+ew=; b=P5IIZGCgsr4WesVqbcWC1X4XdJCVJzYRUemv8lzvjMEYEnNgaIxIUi0fs+5GmO9V5UIGUr 7Sp94zFp2drn3pHRlIa7KWskZC8WnoRJ361ZTJ841RaW+m3obU13dw6/uZGPfEma6iDhMl AxpDzNVibjgPBTaj4zd+Cc0pDbrKftJzNb/eJWvvMfC0z9qusWO7KdMn2fgDY4H1m7bJxT OsFFfR9NV3NICmJFo2eZxEJuqLaCgea5QsmEb9QtP0X5eUXvAMKVlev7d6H/zZp7p3s0Xu u3I8LpXTmkHGEoWKENQl+roH2xmKD/WnAjuJIt/4HBglEG4HZNG2twdLNnuiBw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1707335487; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:mime-version:mime-version:content-type:content-type: content-transfer-encoding:content-transfer-encoding; bh=oT4iFzOpGeJ5ho6FQB0wlYMwhIl/7fIGrT8fDBUv+ew=; b=tl3m8g4Ik/BOx0ZPx4uEIeFgp83UyxQHRVtQut82WGxITeTe4rUHMV1hOZkRUwjrI/0lpM hxGmGDYkEY2sbXW1KC3zF6Cm5qNlrJoVuvFlygcc2jMV8wBFlF+G6GfYerr+25nZXfrv0r BYSK5mT2+ePT7qSDka5j33qMDjyZU05nmNtnHeiAMsrUSfMfJRDhniaYHY4eLxv3lEt2BB 61Mbhb7XTeyrQzWkN5iY+n9LPxIvTjNM7TQxeViDvyu9cQwseoSk4hnr9gQEFG0KQzdbEF oEtd0TG5m0nWdVUdYmHf95ruJVcgG1ovxF/Xljls1XiQiZV6HlH+UzG92P4Lpg== ARC-Authentication-Results: i=1; mx1.freebsd.org; none ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1707335487; a=rsa-sha256; cv=none; b=TzLrVdtt0hJ5NbSA1ath4aX56HamHdipDeHp/r7YGkNyV/DZDzMFXHZcnehhtSrk/EOg94 oJn+/Yneb3wT0EErA8Ky8Xv4xOLWZa1CAw93A7Lx68XY3GaEDof1Sb3wVhXBQcnlDxgXAJ G+FCIqlQmdwMgFenRiKbaT7i6VFSLuv5ntM421IPaT2SBGLZvlBK7OYDRyUF6mP3EQWFpc t6B+xHVz6n+7xra0E0WjibqxUgAB96QJ/GPRyUMmzjQpiIZJOEbrxQlsO/OuHU60jVg4eb mS5jlDOOsJVv7FQTngDr2bzWxKM/r22CVJgbDRzMlHVsac7RE62xIkozqkf22g== Received: from gitrepo.freebsd.org (gitrepo.freebsd.org [IPv6:2610:1c1:1:6068::e6a:5]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (Client did not present a certificate) by mxrelay.nyi.freebsd.org (Postfix) with ESMTPS id 4TVW2l3pdqzKFZ; Wed, 7 Feb 2024 19:51:27 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.17.1/8.17.1) with ESMTP id 417JpR9Z034982; Wed, 7 Feb 2024 19:51:27 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.17.1/8.17.1/Submit) id 417JpRgf034979; Wed, 7 Feb 2024 19:51:27 GMT (envelope-from git) Date: Wed, 7 Feb 2024 19:51:27 GMT Message-Id: <202402071951.417JpRgf034979@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Brooks Davis Subject: git: 49d684369c66 - main - libthr: filter rather than link with libsys List-Id: Commit messages for the main branch of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-main@freebsd.org X-BeenThere: dev-commits-src-main@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: brooks X-Git-Repository: src X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 49d684369c6682eebca325c55a6c96b7c03f5aeb Auto-Submitted: auto-generated The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/src/commit/?id=49d684369c6682eebca325c55a6c96b7c03f5aeb commit 49d684369c6682eebca325c55a6c96b7c03f5aeb Author: Brooks Davis AuthorDate: 2024-02-07 19:38:16 +0000 Commit: Brooks Davis CommitDate: 2024-02-07 19:50:47 +0000 libthr: filter rather than link with libsys The allows gcc + GNU ld to link programs with -m32 -pthread without erroring out due to _umtx_op_err being undefined (unless -lsys is added to the link command. We now always link _umtx_op_err into libthr (not just when it's static) and filter it with libsys so we call that implementation. The dynamic implementations (at least the assembly ones) should likely become stubs as a further refinement. Reviewed by: kib Differential Revision: https://reviews.freebsd.org/D43783 --- lib/libthr/Makefile | 5 ++--- lib/libthr/pthread.map | 3 +++ 2 files changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/libthr/Makefile b/lib/libthr/Makefile index 1d34f5cb5f09..932650885dea 100644 --- a/lib/libthr/Makefile +++ b/lib/libthr/Makefile @@ -13,8 +13,6 @@ MK_SSP= no LIB=thr SHLIB_MAJOR= 3 -LIBADD= sys - NO_WTHREAD_SAFETY=1 NO_WCAST_ALIGN.gcc=1 # for gcc 4.2 CFLAGS+=-DPTHREAD_KERNEL @@ -47,6 +45,7 @@ CFLAGS+=-D_PTHREAD_FORCED_UNWIND .endif LDFLAGS+=-Wl,-znodelete +LDFLAGS+=-Wl,--auxiliary,libsys.so.7 VERSION_DEF=${SRCTOP}/lib/libc/Versions.def SYMBOL_MAPS=${.CURDIR}/pthread.map @@ -76,7 +75,7 @@ LIBSYS_SRCTOP= ${.CURDIR:H}/libsys .else .PATH: ${LIBSYS_SRCTOP} .endif -STATICOBJS+= _umtx_op_err.o +OBJS+= _umtx_op_err.o .if ${MK_INSTALLLIB} != "no" SYMLINKS+=lib${LIB}.a ${LIBDIR}/libpthread.a diff --git a/lib/libthr/pthread.map b/lib/libthr/pthread.map index 348fd48df398..aa9abb7e6114 100644 --- a/lib/libthr/pthread.map +++ b/lib/libthr/pthread.map @@ -298,6 +298,9 @@ FBSDprivate_1.0 { /* ABI bug workaround, indicate that pli->rtli_version is valid */ _pli_rtli_version; + + /* Expose stub for libsys filter */ + _umtx_op_err; }; FBSD_1.1 {