scc

simple c99 compiler
git clone git://git.simple-cc.org/scc
Log | Files | Refs | Submodules | README | LICENSE

commit c51ac670f0c7765275beb7759785af52726a585e
parent 4b402b6bf10e290fb51d63f131a7bc644080dcf9
Author: Roberto E. Vargas Caballero <k0ga@shike2.com>
Date:   Sun, 18 Aug 2019 22:01:30 +0100

Simplify the HOST configuration

The trick done with env.sh was too clever and
obscure and it needed some additional flags from
the user. This new option is simpler and works
fine for the majority of the systems.

Diffstat:
MMakefile | 1-
MREADME | 10+++++++++-
Mconfig/host/bsd.mk | 3++-
Dconfig/host/darwin.mk | 1-
Dconfig/host/dragonfly.mk | 1-
Dconfig/host/linux.mk | 1-
Dconfig/host/netbsd.mk | 1-
Dconfig/host/openbsd.mk | 1-
Aconfig/host/plan9.mk | 3+++
9 files changed, 14 insertions(+), 8 deletions(-)

diff --git a/Makefile b/Makefile @@ -23,7 +23,6 @@ $(ENVIRON): @rm -f $@; \ trap 'r=$?;rm -f $$$$.tmp;exit $r' EXIT HUP INT QUIT TERM; \ echo PATH=$$PATH:$$PWD/$(SCRIPTDIR):. > $$$$.tmp && \ - echo HOST=`uname | tr 'A-Z' 'a-z'` >> $$$$.tmp && \ echo NM=\"$(NM)\" >> $$$$.tmp && \ echo AR=\"$(AR)\" >> $$$$.tmp && \ echo RL=\"$(RL)\" >> $$$$.tmp && \ diff --git a/README b/README @@ -2,12 +2,20 @@ Compiling ========= SCC is a portable toolchain that can be compiled on any UNIX system -out of the box. It supports three main configuration options that +out of the box. It supports four main configuration options that can be passed to the command line: - CROSS_COMPILE: Specify a prefix name for the tools called by the Makefile. + - HOST: + Specify the host system to be used. Possible supported + values are: + + - unix (by default) + - bsd + - plan9 + - CONF: Specify which version of libc to build. Once the build process completes only the target specified in CONF will be built. Supported values are: diff --git a/config/host/bsd.mk b/config/host/bsd.mk @@ -1,2 +1,3 @@ -DRIVER = posix +include $(PROJECTDIR)/config/host/unix.mk + HOSTCFLAGS = -D_ISOC99_SOURCE -D_ANSI_SOURCE diff --git a/config/host/darwin.mk b/config/host/darwin.mk @@ -1 +0,0 @@ -include $(PROJECTDIR)/config/host/bsd.mk diff --git a/config/host/dragonfly.mk b/config/host/dragonfly.mk @@ -1 +0,0 @@ -include $(PROJECTDIR)/config/host/bsd.mk diff --git a/config/host/linux.mk b/config/host/linux.mk @@ -1 +0,0 @@ -DRIVER = posix diff --git a/config/host/netbsd.mk b/config/host/netbsd.mk @@ -1 +0,0 @@ -include $(PROJECTDIR)/config/host/bsd.mk diff --git a/config/host/openbsd.mk b/config/host/openbsd.mk @@ -1 +0,0 @@ -include $(PROJECTDIR)/config/host/bsd.mk diff --git a/config/host/plan9.mk b/config/host/plan9.mk @@ -0,0 +1,3 @@ +include $(PROJECTDIR)/config/host/unix.mk + +HOSTCFLAGS = -D_SUSV2_SOURCE