From 0726bbd5fba28af9c66cb66ae6c2e2a2474209b0 Mon Sep 17 00:00:00 2001 From: Chris Hettrick Date: Fri, 23 Feb 2024 11:43:50 -0700 Subject: [PATCH] README.md: BSD make on FreeBSD needs MAKESYSPATH set. Add the note that using BSD make on FreeBSD as a development host requires the system makefile include path set to /usr/share/mk and that it can be done either via command line or via the MAKESYSPATH environment variable. The regression this solves is that FreeBSD, by default, sets DEFAULT_SYS_PATH?= .../share/mk:/usr/share/mk for their BSD make (actually NetBSD make) system path to sys.mk. Changing DiscoBSD's system include Makefile from target.mk to share/mk/sys.mk caused FreeBSD's BSD make to pick it up, even for building the utilities in tools. There are no elegant ways to remedy this issue on FreeBSD besides requiring users to either use make -m or set MAKESYSPATH. GNU make does not have this issue, as it does not use /usr/share/mk. --- README.md | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/README.md b/README.md index b9e965aa..479616df 100644 --- a/README.md +++ b/README.md @@ -83,6 +83,8 @@ Building DiscoBSD is cross-built on UNIX-like host operating systems. +Currently supported host operating systems: OpenBSD, Linux, FreeBSD. + Instructions to configure an OpenBSD host development environment for Arm and MIPS targets is available [here][6]. @@ -103,6 +105,19 @@ which will build a file system image in the file `distrib/pic32/sdcard.img` and ELF-formatted kernels in the files `sys/pic32/${BOARD}/unix` and Intel HEX-formatted kernels in the files `sys/pic32/${BOARD}/unix.hex`. +Using BSD make on a FreeBSD host requires the system makefile include +directory to be specified on the command line or via the MAKESYSPATH +environment variable. For example: + + $ make -m /usr/share/mk + +or + + $ MAKESYSPATH=/usr/share/mk + $ export MAKESYSPATH + + $ make + [6]: tools/openbsd/README.md Debugging