Home
build: Fix OpenBSD build - scc - simple c99 compiler HTML git clone git://git.simple-cc.org/scc DIR Log DIR Files DIR Refs DIR Submodules DIR README DIR LICENSE --- DIR commit 438fb6e08b28ac019fb017c5caf1967ef51d0e1f DIR parent 7541da3df27d27b30d7639c25dfbd0c192ddbd91 HTML Author: Roberto E. Vargas Caballero <k0ga@shike2.com> Date: Mon, 7 Oct 2024 12:00:59 +0200 build: Fix OpenBSD build OpenBSD lacks c99 compiler, and while it was handled correctly in the target build, it was not handled correctly from the point of view the host compiler and in the qbe build. Diffstat: A scripts/build/host/obsd.mk | 4 ++++ M scripts/config | 2 +- M src/cmd/Makefile | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) --- DIR diff --git a/scripts/build/host/obsd.mk b/scripts/build/host/obsd.mk @@ -0,0 +1,4 @@ +DRIVER = posix + +HOST_CPPFLAGS = -D_ISOC99_SOURCE -D_ANSI_SOURCE +HOSTCC = clang DIR diff --git a/scripts/config b/scripts/config @@ -2,7 +2,7 @@ case `uname` in OpenBSD) - echo TOOL=${TOOL:-clang} HOST=bsd ARFLAGS="${ARFLAGS:--rv}" NOPIE_LDFLAGS=-no-pie + echo TOOL=${TOOL:-clang} HOST=obsd ARFLAGS="${ARFLAGS:--rv}" NOPIE_LDFLAGS=-no-pie ;; NetBSD) #TODO: send a patch to NetBSD to solve this problem DIR diff --git a/src/cmd/Makefile b/src/cmd/Makefile @@ -1,7 +1,6 @@ .POSIX: DIRS =\ - qbe\ ld\ as\ cc\ @@ -27,7 +26,8 @@ qbe/.git: git submodule init qbe git submodule update qbe -qbe: qbe/.git +qbe: qbe/.git FORCE + +cd qbe && $(MAKE) CC=$(CC) CFLAGS='$(PROJ_CFLAGS)' qbe/qbe: qbe