From owner-freebsd-pkg@freebsd.org Mon Apr 27 14:28:38 2020 Return-Path: Delivered-To: freebsd-pkg@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 D138E2BA37C for ; Mon, 27 Apr 2020 14:28:38 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from mailman.nyi.freebsd.org (unknown [127.0.1.3]) by mx1.freebsd.org (Postfix) with ESMTP id 499nFf5Dj8z46Xt for ; Mon, 27 Apr 2020 14:28:38 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: by mailman.nyi.freebsd.org (Postfix) id B1C912BA37B; Mon, 27 Apr 2020 14:28:38 +0000 (UTC) Delivered-To: pkg@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 B18A22BA379 for ; Mon, 27 Apr 2020 14:28:38 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [IPv6:2610:1c1:1:606c::24b:4]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) server-signature RSA-PSS (4096 bits) client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "Let's Encrypt Authority X3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 499nFf4Cv9z46Xs for ; Mon, 27 Apr 2020 14:28:38 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from venus.codepro.be (venus.codepro.be [5.9.86.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.codepro.be", Issuer "Let's Encrypt Authority X3" (verified OK)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id 71C571EA21 for ; Mon, 27 Apr 2020 14:28:38 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: by venus.codepro.be (Postfix, authenticated sender kp) id 1FB4D3777C; Mon, 27 Apr 2020 16:28:37 +0200 (CEST) From: "Kristof Provost" To: pkg@FreeBSD.org Subject: pkg on RISC-V Date: Mon, 27 Apr 2020 16:28:31 +0200 X-Mailer: MailMate (1.13.1r5671) Message-ID: MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=_MailMate_5D0E7E8D-894B-4EDA-89A6-3F0DEE75C387_=" Content-Transfer-Encoding: 8bit X-BeenThere: freebsd-pkg@freebsd.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Binary package management and package tools discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 27 Apr 2020 14:28:38 -0000 --=_MailMate_5D0E7E8D-894B-4EDA-89A6-3F0DEE75C387_= Content-Type: text/plain; charset="UTF-8"; format=flowed; markup=markdown Content-Transfer-Encoding: 8bit Hi, I’ve been toying around with packages on RISC-V, and discovered that it failed to bootstrap. Autosetup tries to build jimsh0 but does not pass CFLAGS to cc, which won’t work on RISC-V. It requires extra flags for any compile. The attached patch fixes that for me. Best regards, Kristof --=_MailMate_5D0E7E8D-894B-4EDA-89A6-3F0DEE75C387_= Content-Disposition: attachment; filename=riscv.patch Content-Type: text/plain diff --git a/autosetup/autosetup-find-tclsh b/autosetup/autosetup-find-tclsh index dfe70f8a..12914edf 100755 --- a/autosetup/autosetup-find-tclsh +++ b/autosetup/autosetup-find-tclsh @@ -10,7 +10,7 @@ for tclsh in $autosetup_tclsh jimsh tclsh tclsh8.5 tclsh8.6; do done echo 1>&2 "No installed jimsh or tclsh, building local bootstrap jimsh0" for cc in ${CC_FOR_BUILD:-cc} gcc; do - { $cc -o "$d/jimsh0" "$d/jimsh0.c"; } 2>/dev/null || continue + { $cc ${CFLAGS} -o "$d/jimsh0" "$d/jimsh0.c"; } 2>/dev/null || continue "$d/jimsh0" "$d/autosetup-test-tclsh" && exit 0 done echo 1>&2 "No working C compiler found. Tried ${CC_FOR_BUILD:-cc} and gcc." --=_MailMate_5D0E7E8D-894B-4EDA-89A6-3F0DEE75C387_=--