Date: Mon, 27 Apr 2020 16:28:31 +0200 From: "Kristof Provost" <kp@FreeBSD.org> To: pkg@FreeBSD.org Subject: pkg on RISC-V Message-ID: <CD5E415B-E57E-480C-893A-7E5B30E68F6D@FreeBSD.org>
index | next in thread | raw e-mail
[-- Attachment #1 --]
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
[-- Attachment #2 --]
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."
help
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CD5E415B-E57E-480C-893A-7E5B30E68F6D>
