From owner-dev-commits-ports-main@freebsd.org Wed Aug 25 10:58:00 2021 Return-Path: Delivered-To: dev-commits-ports-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 8D51367216E; Wed, 25 Aug 2021 10:58:00 +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 4Gvjcm3K6jz3FHf; Wed, 25 Aug 2021 10:58:00 +0000 (UTC) (envelope-from git@FreeBSD.org) 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 4CB321AEEA; Wed, 25 Aug 2021 10:58:00 +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 17PAw09Y051599; Wed, 25 Aug 2021 10:58:00 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 17PAw0nD051598; Wed, 25 Aug 2021 10:58:00 GMT (envelope-from git) Date: Wed, 25 Aug 2021 10:58:00 GMT Message-Id: <202108251058.17PAw0nD051598@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Alexey Dokuchaev Subject: git: abc8ea44a217 - main - lang/gforth: attempt to unbreak the port on i386, armv6, and armv7 MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 8bit X-Git-Committer: danfe X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: abc8ea44a2171da6cd0f97b44b854e1428d37535 Auto-Submitted: auto-generated X-BeenThere: dev-commits-ports-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commits to the main branch of the FreeBSD ports repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 Aug 2021 10:58:00 -0000 The branch main has been updated by danfe: URL: https://cgit.FreeBSD.org/ports/commit/?id=abc8ea44a2171da6cd0f97b44b854e1428d37535 commit abc8ea44a2171da6cd0f97b44b854e1428d37535 Author: Alexey Dokuchaev AuthorDate: 2021-08-25 10:56:26 +0000 Commit: Alexey Dokuchaev CommitDate: 2021-08-25 10:56:54 +0000 lang/gforth: attempt to unbreak the port on i386, armv6, and armv7 - Partially apply upstream commit 9f35279358 to unbreak the build on i386 - With a recent update of devel/libffcall in 58a8a0aa37a8, the port is no longer ignored on armv6 and armv7. Amend the word size check so it can be built on these architectures PR: 258003 --- lang/gforth/Makefile | 5 ++--- lang/gforth/files/patch-engine_main.c | 29 +++++++++++++++++++++++++++++ 2 files changed, 31 insertions(+), 3 deletions(-) diff --git a/lang/gforth/Makefile b/lang/gforth/Makefile index 2b2f188b06d8..360cbcf671da 100644 --- a/lang/gforth/Makefile +++ b/lang/gforth/Makefile @@ -10,10 +10,9 @@ MASTER_SITES= http://www.complang.tuwien.ac.at/forth/gforth/ \ MAINTAINER= danfe@FreeBSD.org COMMENT= Fast and portable Forth system -LICENSE= GPLv3 +LICENSE= GPLv3+ LICENSE_FILE= ${WRKSRC}/COPYING -BROKEN_i386= Assertion failed: (pi->restlength >=0), function check_prims, file ./main.c, line 1049. BROKEN_powerpc64= fails to package: Unable to access file usr/local/share/gforth/0.7.3/kernl64l.fi:No such file or directory LIB_DEPENDS= libavcall.so:devel/libffcall \ @@ -45,7 +44,7 @@ OPTIONS_DEFINE= DOCS .include -.if ${ARCH} == i386 || ${ARCH} == powerpc +.if ${ARCH} == i386 || ${ARCH} == powerpc || ${ARCH} == armv6 || ${ARCH} == armv7 WORDSIZE=32 .else WORDSIZE=64 diff --git a/lang/gforth/files/patch-engine_main.c b/lang/gforth/files/patch-engine_main.c new file mode 100644 index 000000000000..4767de3e2451 --- /dev/null +++ b/lang/gforth/files/patch-engine_main.c @@ -0,0 +1,29 @@ +--- engine/main.c.orig 2013-10-11 21:31:28 UTC ++++ engine/main.c +@@ -976,7 +976,8 @@ static void check_prims(Label symbols1[]) + goto_len = goto_p[1]-goto_p[0]; + debugp(stderr, "goto * %p %p len=%ld\n", + goto_p[0],symbols2[goto_p-symbols1],(long)goto_len); +- if (memcmp(goto_p[0],symbols2[goto_p-symbols1],goto_len)!=0) { /* unequal */ ++ if ((goto_len < 0) || ++ memcmp(goto_p[0],symbols2[goto_p-symbols1],goto_len)!=0) { /* unequal */ + no_dynamic=1; + debugp(stderr," not relocatable, disabling dynamic code generation\n"); + init_ss_cost(); +@@ -1045,8 +1046,14 @@ static void check_prims(Label symbols1[]) + nonrelocs++; + continue; + } +- assert(pi->length>=0); +- assert(pi->restlength >=0); ++ if((pi->length<0) || (pi->restlength<0)) { ++ pi->length = endlabel-symbols1[i]; ++ pi->restlength = 0; ++#ifndef BURG_FORMAT ++ debugp(stderr,"\n adjust restlen: len/restlen < 0, %d/%d", ++ pi->length, pi->restlength); ++#endif ++ }; + while (j<(pi->length+pi->restlength)) { + if (s1[j]==s3[j]) { + if (s1[j] != s2[j]) {