From nobody Wed Nov 09 21:27:37 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 4N6yjj2mnsz4dC8w; Wed, 9 Nov 2022 21:27:37 +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 4N6yjj1Qqvz4QlQ; Wed, 9 Nov 2022 21:27:37 +0000 (UTC) (envelope-from git@FreeBSD.org) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1668029257; 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=dFQ6zoY7dsOegIsLESIqNa3z8HboGgAoJn2XnUKstjI=; b=ouu0lp0HaQRAr15V824qD57LTrUu7RAqD2Fe3XEh740ly6ZhETdp5oG/iCQ23rwPCkowXK rNQ2t5azVtmveIcouid/iCHh0x6qPwR8eCNf+J8PAm4WY9ITNCOiXvIPJFX+tNIuwIE37u BHrVaN5AZIv8htQL1iXyun+0LrIvkYiXm1RZ8Y6MwhbK1dC+Be8yBwC56p5Z7fg1+vUzDH jnwCoh3XUxFDSYA9nVPjEk6DHTFQr4BHg0uo3uB9UxmF0vT98vi4137XOgHbDXzw7OzSlt nGlUS0np6EU3RsQKkjoS5zMN7ceWLqiFKTnVZ5jeSmG5eC1r/9cl8EyovAOxeA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=freebsd.org; s=dkim; t=1668029257; 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=dFQ6zoY7dsOegIsLESIqNa3z8HboGgAoJn2XnUKstjI=; b=IORxdGO5IEvtib+MO8dWz02h2tn8Q1KW60wevPeRYYQCzcYOqfZE5Lo9TnG5a76JmuSk98 J/LA1kh7BHi55tm283z/JqQ1LfT6BHfCLOQPsblHt9EFvKzFxQC5NddcE7R0tfJ0L5oT66 DYmT3LcMkecvhtPfb3Rho+Jv5qzPLfOaJ79ZZMF3/47AQknJ4S0WlEljxnm0/6wTbzfade ZUO42ZkMc4tA06owUFFxj9/JNxPz/fKJ5STbs0J7f3/ai5xQc51Gc+zyGINW779bZMofOa GjoipkUT55TnIZqwz8PZxuTQpfyxFId8v6N/LnJGkpKgcDvlN3aKahgv3sY8qw== ARC-Seal: i=1; s=dkim; d=freebsd.org; t=1668029257; a=rsa-sha256; cv=none; b=gREdEGb9hxVBvkmNLYxCCORZQEK2U5edR+ulLCdIUPKAu1bwjwq0M0zP0rpZYseWlfEQVV dKDUCELnwZFTQ+p4UBizFdUPQQMvq0pmKuBYp1H4bu1aLULMOhQCkKWLWJFDaaPrHm5YDM t0gA0sLZ13wnElixk367hXEUmYyxDoCUpILZuZWFs72bWKrT46cY6Ss9Zqlvd5Q+yStKI6 S5LN6PUO2kXdIDeEqUdCHQLRcc4+jXpfMyj48C2IehT7J5qjbmqr5brSrZi23ib7glsV6R Yn6LVBEatBjhZ2MGYjiUl+OcFjM867LJOdF8gDeRp8/jDf73xnj526LyiPRTKA== ARC-Authentication-Results: i=1; mx1.freebsd.org; none 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 4N6yjj0TLnzbtm; Wed, 9 Nov 2022 21:27:37 +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 2A9LRb0K040750; Wed, 9 Nov 2022 21:27:37 GMT (envelope-from git@gitrepo.freebsd.org) Received: (from git@localhost) by gitrepo.freebsd.org (8.16.1/8.16.1/Submit) id 2A9LRbdr040749; Wed, 9 Nov 2022 21:27:37 GMT (envelope-from git) Date: Wed, 9 Nov 2022 21:27:37 GMT Message-Id: <202211092127.2A9LRbdr040749@gitrepo.freebsd.org> To: ports-committers@FreeBSD.org, dev-commits-ports-all@FreeBSD.org, dev-commits-ports-main@FreeBSD.org From: Brooks Davis Subject: git: f9809df4c15f - main - devel/ksh93: remove sbrk() use 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: brooks X-Git-Repository: ports X-Git-Refname: refs/heads/main X-Git-Reftype: branch X-Git-Commit: f9809df4c15f6b0f3b0c5a236aa70374d9d1637c Auto-Submitted: auto-generated X-ThisMailContainsUnwantedMimeParts: N The branch main has been updated by brooks: URL: https://cgit.FreeBSD.org/ports/commit/?id=f9809df4c15f6b0f3b0c5a236aa70374d9d1637c commit f9809df4c15f6b0f3b0c5a236aa70374d9d1637c Author: Brooks Davis AuthorDate: 2022-11-09 21:27:29 +0000 Commit: Brooks Davis CommitDate: 2022-11-09 21:27:29 +0000 devel/ksh93: remove sbrk() use ksh supports multiple sources of heap memory. Completely disable the use of sbrk() as a memory source in favor of mmap(). This allows compilation on aarch64 (and presumably riscv64). Approved by: cy Differential Revision: https://reviews.freebsd.org/D37312 --- shells/ksh93/Makefile | 5 +---- .../files/patch-src_lib_libast_vmalloc_vmbest.c | 25 ++++++++++++++++++++++ 2 files changed, 26 insertions(+), 4 deletions(-) diff --git a/shells/ksh93/Makefile b/shells/ksh93/Makefile index 438365ce743d..9814c5114408 100644 --- a/shells/ksh93/Makefile +++ b/shells/ksh93/Makefile @@ -14,7 +14,7 @@ PORTNAME= ksh93 DISTVERSION= 93u -PORTREVISION= 1 +PORTREVISION= 2 PORTEPOCH= 2 CATEGORIES= shells DIST_SUBDIR= ksh93 @@ -25,9 +25,6 @@ WWW= http://www.kornshell.com/ LICENSE= EPL -BROKEN_aarch64= Fails to compile: needs sbrk -BROKEN_riscv64= Fails to compile: needs sbrk - USES= compiler:c11 USE_GITHUB= yes diff --git a/shells/ksh93/files/patch-src_lib_libast_vmalloc_vmbest.c b/shells/ksh93/files/patch-src_lib_libast_vmalloc_vmbest.c new file mode 100644 index 000000000000..07cfd72b922c --- /dev/null +++ b/shells/ksh93/files/patch-src_lib_libast_vmalloc_vmbest.c @@ -0,0 +1,25 @@ +--- src/lib/libast/vmalloc/vmbest.c.orig ++++ src/lib/libast/vmalloc/vmbest.c +@@ -1169,6 +1169,7 @@ + } + #endif /* _mem_win32 */ + ++#undef _mem_sbrk + #if _mem_sbrk /* getting space via brk/sbrk - not concurrent-ready */ + static Void_t* sbrkmem(Void_t* caddr, size_t csize, size_t nsize) + { +@@ -1265,10 +1266,13 @@ + } + } + else if(nsize == 0) +- { Vmuchar_t *addr = (Vmuchar_t*)sbrk(0); ++ { ++#if 0 ++ Vmuchar_t *addr = (Vmuchar_t*)sbrk(0); + if(addr < (Vmuchar_t*)caddr ) /* in sbrk space */ + return NIL(Void_t*); + else ++#endif + { (void)munmap(caddr, csize); + return caddr; + }