Browse Source

Rename HOSTxxx make variables to xxx_FOR_BUILD

As pointed out by Eli Schwartz, autotools uses "host" (from
build/host/target) to mean "machine the compiled program will run on"
rather than "the machine that performs the build". Thus HOSTCXX could be
mistaken for meaning the opposite of what it does.

So, use CXX_FOR_BUILD instead of HOSTCXX (for example). It's not an
ideal name, but it's what autotools uses, and I can't come up with
anything better.
Davin McCall 1 year ago
parent
commit
4ea7d5ddaa
2 changed files with 9 additions and 8 deletions
  1. 4 3
      BUILD
  2. 5 5
      build/tools/Makefile

+ 4 - 3
BUILD

@@ -37,9 +37,10 @@ appropriate values for the configuration variables defined within. In particular
   
 Additionally, for cross-compilation, the following can be specified:
 
-  HOST_CXX : C++ compiler for compiling code to run on the build host
-  HOST_CXXFLAGS  : any options for compiling code to run on the host
-  HOST_LDFLAGS   : any options for linking code to run on the host
+  CXX_FOR_BUILD : C++ compiler for compiling code to run on the build host
+  CXXFLAGS_FOR_BUILD  : any options for compiling code to run on the build host
+  CPPFLAGS_FOR_BUILD  : any preprocessor options for code to run on the build host
+  LDFLAGS_FOR_BUILD   : any options for linking code to run on the build host
 
 Note that the "eg++" or "clang++" package must be installed on OpenBSD as the default "g++"
 compiler is too old. Clang is part of the base system in recent releases.

+ 5 - 5
build/tools/Makefile

@@ -1,12 +1,12 @@
 -include ../../mconfig
 
-HOSTCXX ?= $(CXX)
-HOSTCXXFLAGS ?= $(CXXFLAGS) $(CXXFLAGS_EXTRA)
-HOSTCPPFLAGS ?= $(CPPFLAGS)
-HOSTLDFLAGS ?= $(LDFLAGS) $(LDFLAGS_EXTRA)
+CXX_FOR_BUILD ?= $(CXX)
+CXXFLAGS_FOR_BUILD ?= $(CXXFLAGS) $(CXXFLAGS_EXTRA)
+CPPFLAGS_FOR_BUILD ?= $(CPPFLAGS)
+LDFLAGS_FOR_BUILD ?= $(LDFLAGS) $(LDFLAGS_EXTRA)
 
 mconfig-gen: mconfig-gen.cc
-	$(HOSTCXX) $(HOSTCPPFLAGS) $(HOSTCXXFLAGS) -o mconfig-gen mconfig-gen.cc $(HOSTLDFLAGS)
+	$(CXX_FOR_BUILD) $(CPPFLAGS_FOR_BUILD) $(CXXFLAGS_FOR_BUILD) -o mconfig-gen mconfig-gen.cc $(LDFLAGS_FOR_BUILD)
 
 clean:
 	rm -f mconfig-gen