From nobody Mon Jul 18 06:52:39 2022 X-Original-To: dev-commits-ports-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 4LmXhl5WZcz4WTsh; Mon, 18 Jul 2022 06:52: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 4LmXhl4s1Qz49bJ; Mon, 18 Jul 2022 06:52:39 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658127159; 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=qw40UeFo+t79Ghkds0HcLRF6cv2hBENxzfBONkmaUjI=; b=Ze/c8aGf1SrJ/i4gW58dkql/fVdGYMEb/KeQmnoEoQXKd+RfDPuuXfS61LRAYwTL1FJqcz +XSBU1h1w2Xw7RF2xJ4sJr1orJRMZzC0L6RlKIxllgwfDwCuuP8Ftt5ax78u3eR0Ffs03y 58JbjIsqJtRdBZhWr7x1bIiAX4HgKNjeKfWLXyDWfXx8nGJcCR4LuDpmP4bYELl3uKp3or +iYuU8mAYmg/ryVotmtld9ayGsmzCqkXUqxtksFhlXxD227qJp/g8hds/uwQuS8gQ2DyIW Y6QpuEoRqav/PKF9Djumi4nzDF69aD+d68NDFGHK6ZXoYr1cCRldykiyxU4klQ== 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 4LmXhl3wCCzWG6; Mon, 18 Jul 2022 06:52:39 +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 26I6qdDq099272; Mon, 18 Jul 2022 06:52:39 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 26I6qdoB099271; Mon, 18 Jul 2022 06:52:39 GMT (envelope-from git) Date: Mon, 18 Jul 2022 06:52:39 GMT Message-Id: <202207180652.26I6qdoB099271@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Yuri Victorovich Subject: git: c7fe2fd1f660 - main - math/elpa: Unbreak on systems prior to 13.1 List-Id: Commits to the main branch of the FreeBSD ports repository List-Archive: https://lists.freebsd.org/archives/dev-commits-ports-main List-Help: List-Post: List-Subscribe: List-Unsubscribe: Sender: owner-dev-commits-ports-main@freebsd.org X-BeenThere: dev-commits-ports-main@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/main X-Git-Reftype: branch X-Git-Commit: c7fe2fd1f66075a31d5b02046fea9e5ef583f2f6 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1658127159; 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=qw40UeFo+t79Ghkds0HcLRF6cv2hBENxzfBONkmaUjI=; b=T7rOky6jl4CXeuDW1vpMFpQ/+3o3W2k02MkRvBMo5LCJmLpKQllNwk4MZEsIJDMp38JJw9 /47Y4ADRGY+kcx2Ju6IfJEfLNOAm9V1BPGLGVx5PsV1jCE6x0RKRK6lNXuNZL5o3t39EgX tpPlDEr/a9EhP5lpEkqBaAkLtESG0y5e/AHUz1q69patxWTfIV9ooyAsRsHBP5emmmeEUW X2FURmjEnnxqcrz3nlmZ8a/9cTnAkRvVLdimhGwu0w9oKQNu58+KwwBTZf5NbvzXO/1HKo 6fvdFD13fNTUWWAG+tS1cCFJ1Q/DbL3KYhZl/3tdT0PO3GF4ZedBSf7J7U76EA== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1658127159; a=rsa-sha256; cv=none; b=QfkpekT/werPIknZbFhcyaPtDPNk2UnejGk1iqSjYgwtelPYmjorQbDqA69hhwebysGHNM bppoQ6znT7S9XAlbIFKTJQCmZJQxDvZsGLuOqf+Mj6R9uVMXgvvDFE6BU7OTtesUucfPhG TmIB1+SzhRoPpXoQ5lPwRp5NoBAP7hnow4RUZ8R+QN8aeeqZy+jDP8j4BLW+IaGpq2Wacy Mxsn0Se5tSk39LQaLF2OH8BhQCiyEIaDGsyxYdbq8WH3BZsUcBhbm5fhFPMkwQyQA5Zqk2 r4mTkczBa2Pc+SwOoLsiPRWjJgFlYQXAX7CgXeOLZNuYgfg3n3/juhhs6X7s9g== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by yuri: URL: https://cgit.FreeBSD.org/ports/commit/?id=c7fe2fd1f66075a31d5b02046fea9e5ef583f2f6 commit c7fe2fd1f66075a31d5b02046fea9e5ef583f2f6 Author: Yuri Victorovich AuthorDate: 2022-07-18 05:21:33 +0000 Commit: Yuri Victorovich CommitDate: 2022-07-18 06:52:35 +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 --- 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) {