From nobody Wed Aug 10 17:22:11 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 4M2xZX1Vvpz4YXcD; Wed, 10 Aug 2022 17:22:12 +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 4M2xZX0vzBz4Prm; Wed, 10 Aug 2022 17:22:12 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660152132; 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=8gUBheJL9xn4migOh/dFXD0e2dYo9FrfDMCFa8FEzmg=; b=OiGMC1T6BH2wBZN66PTu0DQrezkfR1lkNtvrykso5XpsXODz304dBUCn+ZO64i3dq3FR1R iod/yn0FoNvjLC3To9auc9+LtxfCYY2JRKOaaX6jw3d+q1Tj6ueMvbG85xi0J7Gkg5dsJ/ /v9ToMIzSroqrJbvaLCXCFIpmf+nzcnO5XScmJO7Sx2G/XE4WcxZpBlgsHmmqspw2b5uNF UbkJspCim4wG2CS9difPYRupFxPSWgQgujZS4E/CM5oZouQ0ghQlNjKhG/AOmXFhgQdeUy FNvWqEu6mzIn3iJiJJw/FeBF76OaN4iII9rcmclcQkffYRYI/NocHjm+eeVUwA== 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 4M2xZW74pTzKYc; Wed, 10 Aug 2022 17:22:11 +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 27AHMBJS080559; Wed, 10 Aug 2022 17:22:11 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 27AHMB6Y080558; Wed, 10 Aug 2022 17:22:11 GMT (envelope-from git) Date: Wed, 10 Aug 2022 17:22:11 GMT Message-Id: <202208101722.27AHMB6Y080558@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Piotr Kubaj Subject: git: 31821073e950 - main - cad/nvc: fix build on powerpc* 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: pkubaj X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: 31821073e95009cdfd29e7c1dbeb3c1132d00421 Auto-Submitted: auto-generated ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1660152132; 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=8gUBheJL9xn4migOh/dFXD0e2dYo9FrfDMCFa8FEzmg=; b=sLmJJblpm9JEfhZH+BxfyD9muFadcx1p4c7c5rNlKGu+KWi7WXYR6hUTFmwdQjDDqWp8MZ NcikSYdei+lzIZg7ACqX7lpQZFsR3EbKcmokYMKVMb2sEqBvMos8IHeyp4We103i0U530k ECcEFvY+D3ICxmDqaMV9902og1kM9D+Ye+wk52LNi3QQNMf/a6Cki15W1tGEDy9cAzjCan HV685QYzmFTHh97FjISh0MuTNTt2ezTLf5Can6J4h2HuqHKoNL+69V1BSU4duZgNhS0FjK ukplk1k5MiGVs149Az7AeeVZ7+5aQR5CgPZY56ZsO802PQolWeTdOk+v+Ocwjg== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1660152132; a=rsa-sha256; cv=none; b=JDDugMttSOVl+pewSNohbEYHGI1i8L1leMb+0sjQLvu/q2Njv6BYr7gCakP+L1L1GeSo/r 2qWAMAF/IG83dZV0J7OcH10SfITm3r8jjxikN8wflhG9AI6sjBDwYaU0Y1X2h6ksytSIUB NxP9eeJA3C+lcYXV7JCeS5yHEDYQRDlzYllOyw8IHCMYXTFxelXFkahJU0Ns50m2AzuFuH DmO0V0AhH80XLwhTDpaQPbWwsd4wenl5XevlnqouAgQlDvNcHsmqKlQzaUFoKUiq0n67lY kAdBP2A/qoZOMHtwRlW9BBPVvRNyTUQ2tlCPFYpUjnGG5EziYg9Oug8HkDoypw== ARC-Authentication-Results: i=1; mx1.freebsd.org; none X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by pkubaj: URL: https://cgit.FreeBSD.org/ports/commit/?id=31821073e95009cdfd29e7c1dbeb3c1132d00421 commit 31821073e95009cdfd29e7c1dbeb3c1132d00421 Author: Piotr Kubaj AuthorDate: 2022-08-10 16:54:59 +0000 Commit: Piotr Kubaj CommitDate: 2022-08-10 17:20:22 +0000 cad/nvc: fix build on powerpc* 1. Add machine context for powerpc*. 2. Disable LTO on powerpc64. --- cad/nvc/Makefile | 6 ++++++ cad/nvc/files/patch-thirdparty_cpustate.c | 16 ++++++++++++++++ 2 files changed, 22 insertions(+) diff --git a/cad/nvc/Makefile b/cad/nvc/Makefile index 586bb2a20971..614134eb577c 100644 --- a/cad/nvc/Makefile +++ b/cad/nvc/Makefile @@ -45,6 +45,12 @@ CONFIGURE_WRKSRC= ${BUILD_DIR} INSTALL_WRKSRC= ${BUILD_DIR} CONFIGURE_CMD= ${WRKSRC}/configure +.include + +.if ${ARCH} == powerpc64 +CONFIGURE_ARGS+= --enable-lto=no +.endif + post-install: @${FIND} ${STAGEDIR}${PREFIX} -name "*.so" | ${XARGS} ${STRIP_CMD} diff --git a/cad/nvc/files/patch-thirdparty_cpustate.c b/cad/nvc/files/patch-thirdparty_cpustate.c new file mode 100644 index 000000000000..074770c7d712 --- /dev/null +++ b/cad/nvc/files/patch-thirdparty_cpustate.c @@ -0,0 +1,16 @@ +--- thirdparty/cpustate.c.orig 2022-08-10 16:48:11 UTC ++++ thirdparty/cpustate.c +@@ -103,6 +103,13 @@ void fill_cpu_state(struct cpu_state *cpu, ucontext_t + + for (int i = 0; i < 16; i++) + cpu->regs[i] = uc->uc_mcontext._gregs[i]; ++ ++#elif defined __FreeBSD__ && defined __powerpc__ ++ cpu->pc = uc->uc_mcontext.mc_srr0; ++ cpu->sp = uc->uc_mcontext.mc_gpr[1]; ++ ++ for (int i = 0; i < 31; i++) ++ cpu->regs[i] = uc->uc_mcontext.mc_gpr[i]; + #elif defined __OpenBSD__ && defined __x86_64__ + cpu->pc = uc->sc_rip; + cpu->sp = uc->sc_rsp;