From nobody Tue Jul 19 08:11:42 2022 X-Original-To: dev-commits-ports-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 4LnBPV4S1Dz4Wh48; Tue, 19 Jul 2022 08:11:42 +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 4LnBPV3b3rz3vsR; Tue, 19 Jul 2022 08:11:42 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658218302; 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=GT0bK2w2jbWPA5lMyacYZshX8ZnypfO05ElbZAHrJw8=; b=MeRCrAZvLTR7jA2VR0GOmuIE5HVwO5giVhtTJqez7WIF/FVoXuOkCb0GDdNjOtxY4yi01D x0eXc6DwS5/kBVt7dWWEv6jJ4gndXVMDTmd0ijuEtOpSeWKjKsm2n+4Zy5d/0qCzlX5HFo rlNjJDGEOdhs7bpyIaJZiz8DivOn+BxsdqjU0OKsxPyeewujMHpRFBWsnAAqnOiYh6AV93 +Im9CJzvlbNA37B4v4qgMK7H2DJ02sfUkgYby0QNGxrklGxTWqpYbg8ALhe0Afor3lWPho WWfORBFpVEOyXsiC8r6o4YxfryvVluU0szzGejJhML3dloiYWRCzOm8hoBANRw== 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 4LnBPV2gmNz1BKf; Tue, 19 Jul 2022 08:11:42 +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 26J8BgNp075499; Tue, 19 Jul 2022 08:11:42 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26J8Bgac075498; Tue, 19 Jul 2022 08:11:42 GMT (envelope-from git) Date: Tue, 19 Jul 2022 08:11:42 GMT Message-Id: <202207190811.26J8Bgac075498@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-branches@FreeBSD.org From: Yuri Victorovich Subject: git: 21918bf7f11d - 2022Q3 - math/elpa: Unbreak on systems prior to 13.1 List-Id: Commit messages for all branches of the ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-all List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-all@freebsd.org X-BeenThere: dev-commits-ports-all@freebsd.org MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: yuri X-Git-Repository: ports X-Git-Refname: refs/heads/2022Q3 X-Git-Reftype: branch X-Git-Commit: 21918bf7f11d16819abd982aae2a8ad885b3d191 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658218302; 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=GT0bK2w2jbWPA5lMyacYZshX8ZnypfO05ElbZAHrJw8=; b=kdrSdn7+rKEASqmVpkLvNG1YLJiouPmAcR11t6ByrXmIhotCBhckSdlbNxEcT9civBBgP/ MgakvqCdKDsOn6d0Myf6AQbIOdfDJ7qijolSUDvT1P2JUE3tyXq07YTTUgsFbU+a65EbEg WB+mot2RxM+C4stLiLLVqvdG7iT2LZSrlNarOBem35wTIquG6HKVcu5yotopzDYeKkdDfR tQDMSyzEkqoLwFlHxqfbynTUmBizXO/Nyc8WBvnpRo7ME4cI4etYKwXAsJKug7EcglJbsN VSwu5r+SKAbAk1TGDF0Q6qOketx3qQgWO1nCMeVNO0/0Xqos9NKC/S135bJuSw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1658218302; a=rsa-sha256; cv=none; b=almHXRkUV6e8/JHaPYLO5F7D7YnszLCgqX/ojLdg95xQP3zOAOxkaDEPMJUtmN1iKekLoO mvAJvWl7ip0l8fZqz6qdeuBkFyijkCjMMwyC9wQYy7X+QshCIaKDuNt5WMVt6czg0sfB+b vHmKGatuxB3YaWXmYlJg8C/pR7I01TzrLoSudh9zDjHigm0yYq3+K/DDiA12phdrOdF8rT RVzTNKBZMLGTj3zUsd8IwsZhDUlt8pWMQkrGU2XqTlqOpA/wb14sz2HfFE5JMA5It5pZJY oeaQW+V7Qz5wJ29LxlKkZzmCiyZj87xs319BGhTKe+0nu4ALgcgp4Q4I5w5liQ== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch 2022Q3 has been updated by yuri: URL: https://cgit.FreeBSD.org/ports/commit/?id=21918bf7f11d16819abd982aae2a8ad885b3d191 commit 21918bf7f11d16819abd982aae2a8ad885b3d191 Author: Yuri Victorovich AuthorDate: 2022-07-18 05:21:33 +0000 Commit: Yuri Victorovich CommitDate: 2022-07-19 08:11:32 +0000 math/elpa: Unbreak on systems prior to 13.1 sched_getcpu() and sched_getaffinity() were added in 13.1 but the code used them unconditionally. Reported by: build failure (cherry picked from commit c7fe2fd1f66075a31d5b02046fea9e5ef583f2f6) --- math/elpa/Makefile | 1 + .../files/patch-src_helpers_check__thread__affinity.c | 19 +++++++++++++++++-- 2 files changed, 18 insertions(+), 2 deletions(-) diff --git a/math/elpa/Makefile b/math/elpa/Makefile index bce7ed9c98b6..4be23de3c3c6 100644 --- a/math/elpa/Makefile +++ b/math/elpa/Makefile @@ -23,6 +23,7 @@ CONFIGURE_ARGS= --disable-avx --disable-avx2 --disable-avx512 --disable-static \ --disable-c-tests CFLAGS+= -I${WRKSRC} -I${WRKSRC}/private_modules +CFLAGS+= -DFREEBSD_OSVERSION=${OSVERSION} FCFLAGS+= -I${WRKSRC} -I${WRKSRC}/private_modules LDFLAGS+= -lutil diff --git a/math/elpa/files/patch-src_helpers_check__thread__affinity.c b/math/elpa/files/patch-src_helpers_check__thread__affinity.c index 40db36a7cd7d..5561d206753e 100644 --- a/math/elpa/files/patch-src_helpers_check__thread__affinity.c +++ b/math/elpa/files/patch-src_helpers_check__thread__affinity.c @@ -1,6 +1,6 @@ --- src/helpers/check_thread_affinity.c.orig 2021-11-16 11:26:03 UTC +++ src/helpers/check_thread_affinity.c -@@ -47,11 +47,14 @@ +@@ -47,29 +47,41 @@ // // Author: Andreas Marek, MPCDF @@ -15,12 +15,21 @@ +#include #include ++#if FREEBSD_OSVERSION >= 1301000 ++# define HAVE_SCHED_FUNCS // sched_getcpu() and sched_getaffinity() were added in 13.1 ++#endif -@@ -60,11 +63,11 @@ void get_thread_affinity(int *cpu_id) { + void get_thread_affinity(int *cpu_id) { ++#if defined(HAVE_SCHED_FUNCS) + *cpu_id = sched_getcpu(); ++#else ++ *cpu_id = 0; ++#endif } void get_process_affinity(int cpu_id) { - cpu_set_t set; ++#if defined(HAVE_SCHED_FUNCS) + cpuset_t set; int ret, i; int cpu; @@ -30,3 +39,9 @@ for (i=0; i < CPU_SETSIZE; i++) { cpu = CPU_ISSET(i, &set); + if (cpu == 1) { cpu_id = i; } + } ++#endif + } + + void get_process_id(int *process_id, int *pprocess_id) {