From nobody Tue Feb 22 18:34:38 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 328ED19CF69A; Tue, 22 Feb 2022 18:34:39 +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 4K37B70p4Tz3tVY; Tue, 22 Feb 2022 18:34:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645554879; 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=Uind9Y5fV6HTbLe3NPc3jOCD0YIMfF0/2Ee1eAGv3VM=; b=InrliRovEtZyXv4N2gyXavPvyk6uvKaLCYBtHYxPf5Iew51+cPmF9ncfPmF1shljs4E/oo trZXUrdZdTAF8rpAdhIAbvPYNnonvKvO9sPFmyFDAt/nADEqlJm1nYyGrGotyJLm8aHOuU NOoBpPT5JXPKIjJy2ypqRl7lfsZDgMMsRqF9ysszSws0x3BIfMYpOo0R5sx6svA04oY7rW QUbVph/AvO5ajESvBXRV0+j5yKyHiQ/8ubVUbHM5WotI1uz1i3TTEk9P0MB/lon0hqv00c gYJceewV/S9A/Ja+MFsrN14HaYOKgbwA2NtRz5mZnUW5mOy51aySAJbxlv65Ww== 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 F0ACD10F6; Tue, 22 Feb 2022 18:34:38 +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 21MIYcXb017934; Tue, 22 Feb 2022 18:34:38 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 21MIYcsm017933; Tue, 22 Feb 2022 18:34:38 GMT (envelope-from git) Date: Tue, 22 Feb 2022 18:34:38 GMT Message-Id: <202202221834.21MIYcsm017933@gitrepo.freebsd.org> To: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org From: Piotr Kubaj Subject: git: 884ba43116d4 - main - 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/main X-Git-Reftype: branch X-Git-Commit: 884ba43116d4456d5900d3c8824153c604f132b8 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1645554879; 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=Uind9Y5fV6HTbLe3NPc3jOCD0YIMfF0/2Ee1eAGv3VM=; b=j/LyEZ2GJwdRQ0YLwDvbxztpq8mWZQY+4FJWLgk3kZU8iZIpcvdre82ydb8fYcZb56P/rB C1XfA7f3J5yeZd2ZZI8i3QhuZ6T1WFQsQ4safnIKPPZM+T1bqlQ36ECOdPbjmroDHZIX/a DnT/TLIHGhVicAiQ+mVJ3F3KaYOmbnlifwOV+S/k6CQO8GZOyD2Rn7FYX4W2DJKmxhftYg xbpovtlj0c0yBt9tfsIYUpwoSGziGykNpA++I2basrttmqJhrMKEOE2EteAQUhzFTmQoBf u9FHMcU1wtUKntPJ5LNWw3XkoIYO4hFYaXuYKMmv+6jDWtH7Fg2IBje89dPW1Q== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1645554879; a=rsa-sha256; cv=none; b=FICkasGqtBihCyKsW44yqNZswZTGk5b9xWTBgcRrgwT/eiPeCCiiBJO77zEipwDfA4fD0d hZQrBlqFQX+dQ/7LURxZf4jFUZbIeo2wSLEfXg2t2CuPLs4v4k49TVcvU6GNGv1Wsx61xC EBI/dMH1qedl2wx/VpIdZ876FDEXVTgcYDBpIUXvsZd3b2hvXJKOcRXSBHq5itqSYdk4Pf EUykuVGVpI8r91DDWAvdA2MahGaDOtLvXYjaXifvSRPSQmAu4PM5IN5aLj/6vUFpxoHy7P PriP8PXkMXA7P/TTba9RTspLWL/DSLXkTuFhIUj0RJ1iJsiy3psFKT3/d0HFew== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by pkubaj (ports committer): URL: https://cgit.FreeBSD.org/src/commit/?id=884ba43116d4456d5900d3c8824153c604f132b8 commit 884ba43116d4456d5900d3c8824153c604f132b8 Author: Piotr Kubaj AuthorDate: 2022-02-18 13:22:14 +0000 Commit: Piotr Kubaj CommitDate: 2022-02-22 18:34:28 +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 --- 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 b6e4dd1787b4..3667eea15307 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