From nobody Tue Mar 08 00:29:08 2022 X-Original-To: dev-commits-src-all@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 5B68319FE4DF; Tue, 8 Mar 2022 00:29:09 +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 4KCGR91Zgfz4rF4; Tue, 8 Mar 2022 00:29:09 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1646699349; 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=jjfkHsWN+Y1RaBzETBbZWPD0E/2Ej+NorvrvePuhM3g=; b=Uxqxeianz38FmkiVJMXUI1WW0rm4OK3kjfR9vZ0PAFcrw78pdp4iJi/XLBkWP6sbrHfOx6 39lpvCggjjAiyOGO3ktl/dehzUQtZaxiMpS2z3DMnGdIlBTj+De2Mw66ArBsAMCpTOfTPe 3KfzUuaudgmmo2tyE6QnNCqd7DxSumZGmYhbLvzzmu1Xko+0FZGGj24YtUDiHuEMsuX8bH LGkl82goBEVrpOt8rULaCD0lz4xdCsibKG7CzTaeq1v8kJNnOLpxDIjBhHG8BVebdj+Wip SjagBhMKuPbhXdu9HcHDFysBGjnXJfBpZxeWJxmRgw2kwmGh/drOA+otTKWKhA== 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 074A812B7F; Tue, 8 Mar 2022 00:29:09 +0000 (UTC) (envelope-from git@FreeBSD.org) Received: from gitrepo.freebsd.org ([127.0.1.44]) by gitrepo.freebsd.org (8.16.1/8.16.1) with ESMTP id 2280T82L076145; Tue, 8 Mar 2022 00:29:08 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2280T8HG076144; Tue, 8 Mar 2022 00:29:08 GMT (envelope-from git) Date: Tue, 8 Mar 2022 00:29:08 GMT Message-Id: <202203080029.2280T8HG076144@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-branches@FreeBSD.org From: Piotr Kubaj Subject: git: 137f2548ad71 - stable/13 - powerpc: enable initial-exec TLS List-Id: Commit messages for all branches of the src repository List-Archive: https://lists.freebsd.org/archives/dev-commits-src-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-src-all@freebsd.org X-BeenThere: dev-commits-src-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: pkubaj X-Git-Repository: src X-Git-Refname: refs/heads/stable/13 X-Git-Reftype: branch X-Git-Commit: 137f2548ad7131df9ea954be4e419127c428cb3e Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1646699349; 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=jjfkHsWN+Y1RaBzETBbZWPD0E/2Ej+NorvrvePuhM3g=; b=KvBABh0nFki94ClfxX6+E9SqJ1eYSlld9S2M6Q9HBffpbfQwPt0yy2y410VFJihR+hFvKu GurDOxzBIPRo2Z+Up2++kFqFe9cWDnZhMOJTFPAbhqbjXfqROTDUKnt1CaCBXcEFCohWGG XgzyGeU1Z//BQ176Z5/xIhD3Vdrd7rr59zE+ZyV+MlbDI8OUAKc5feYKf45cGsEP0oafPu zgDessKx39KunEcMoSbizEFt5ZoSXKds63ZmdyuGPPDupMz7DYO4h8YDx9NdTIpNLRCKoF 0IU38URQmvmEMMcq5bSnCcb8ex2jWOQolpvjY8D9vjpfuS0G3RZbENThq8jVnA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1646699349; a=rsa-sha256; cv=none; b=bPtyn+Z9OCU3luJw0Z4z0UV9EbIae16k6mTh6MNu5x7vd1+nODaojLPR9JY9D5ezBganjV SgAy4mZTCD/Fyqn7LH/EEo5XaEiF4nBs67FuVPqE9D1NfDJjTZWg0IYTAk1+oYq7BJuqVX byYZGJy6a4bvJWr/FqL1dLUkMYXrjO+EGBemerqa6UItE77KWgx/6yR8FHEwN3Mo9D9SRM YHFF9YV8jR6PmHgHlhHs1/jXgkTtkil8oDc5yLDTl4he0MAedqC14qftiyNoZP8i6ZxMhv luSBFsKKB+hZ7EDci+jKxc50P1xAFmn98GY6XNetjEnJIEPJ93z/TCg4/s6c6w== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch stable/13 has been updated by pkubaj (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=137f2548ad7131df9ea954be4e419127c428cb3e commit 137f2548ad7131df9ea954be4e419127c428cb3e Author: Piotr Kubaj AuthorDate: 2022-02-18 13:22:14 +0000 Commit: Piotr Kubaj CommitDate: 2022-03-08 00:28:33 +0000 powerpc: enable initial-exec TLS Summary: Use initial-exec, like other architectures. While here, switch MACHINE_ARCH in lib/libc/Makefile to LIBC_ARCH and consistently use powerpc. Subscribers: imp, #contributor_reviews_base Differential Revision: https://reviews.freebsd.org/D34315 Reviewed by: luporl MFC after: 2 weeks (cherry picked from commit 884ba43116d4456d5900d3c8824153c604f132b8) --- contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h | 2 ++ lib/libc/Makefile | 7 ++++--- 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h b/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h index 6ff0ce18d5da..00848c0c48e3 100644 --- a/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h +++ b/contrib/jemalloc/include/jemalloc/jemalloc_FreeBSD.h @@ -63,9 +63,11 @@ #ifdef __powerpc64__ # define LG_VADDR 64 # define LG_SIZEOF_PTR 3 +# define JEMALLOC_TLS_MODEL __attribute__((tls_model("initial-exec"))) #elif defined(__powerpc__) # define LG_VADDR 32 # define LG_SIZEOF_PTR 2 +# define JEMALLOC_TLS_MODEL __attribute__((tls_model("initial-exec"))) #endif #ifdef __riscv # define LG_VADDR 48 diff --git a/lib/libc/Makefile b/lib/libc/Makefile index fdf6aa49932b..2f2e07c03438 100644 --- a/lib/libc/Makefile +++ b/lib/libc/Makefile @@ -32,7 +32,7 @@ CFLAGS+=-DNO__SCCSID -DNO__RCSID LIB=c SHLIB_MAJOR= 7 .if ${MK_SSP} != "no" && \ - (${LIBC_ARCH} == "i386" || ${MACHINE_ARCH:Mpower*} != "") + (${LIBC_ARCH} == "i386" || ${LIBC_ARCH:Mpowerpc*} != "") SHLIB_LDSCRIPT=libc.ldscript .else SHLIB_LDSCRIPT=libc_nossp.ldscript @@ -57,7 +57,8 @@ CFLAGS+=${CANCELPOINTS_CFLAGS} # Use a more efficient TLS model for libc since we can reasonably assume that # it will be loaded during program startup. .if ${LIBC_ARCH} == "aarch64" || ${LIBC_ARCH} == "amd64" || \ - ${LIBC_ARCH} == "i386" || ${LIBC_ARCH} == "riscv" + ${LIBC_ARCH} == "i386" || ${LIBC_ARCH} == "riscv" || \ + ${LIBC_ARCH:Mpowerpc*} != "" CFLAGS+= -ftls-model=initial-exec .endif @@ -68,7 +69,7 @@ LDFLAGS+= -nodefaultlibs LIBADD+= compiler_rt .if ${MK_SSP} != "no" && \ - (${LIBC_ARCH} == "i386" || ${MACHINE_ARCH:Mpower*} != "") + (${LIBC_ARCH} == "i386" || ${LIBC_ARCH:Mpowerpc*} != "") LIBADD+= ssp_nonshared .endif