summaryrefslogtreecommitdiffstats
path: root/make
diff options
context:
space:
mode:
authorYuichiro NAITO <[email protected]>2018-08-21 10:42:30 +0900
committerBradley Sepos <[email protected]>2018-08-22 06:10:32 -0400
commit7767d0f28de1accae535d422cd295c46f0815c7d (patch)
tree88cfa8bf5ea8a5476b191250430e26406efdd552 /make
parent4b7a96048aa0ebef75079423b64549b763208f32 (diff)
build: Allows to use clang/clang++ compiler on FreeBSD.
LOCALBASE variable is used to indicate where FreeBSD ports are installed. default is /usr/local.
Diffstat (limited to 'make')
-rw-r--r--make/configure.py2
-rw-r--r--make/variant/freebsd.defs5
2 files changed, 6 insertions, 1 deletions
diff --git a/make/configure.py b/make/configure.py
index c3eeee34d..3a9d1c257 100644
--- a/make/configure.py
+++ b/make/configure.py
@@ -1512,7 +1512,7 @@ try:
class Tools:
ar = ToolProbe( 'AR.exe', 'ar', abort=True )
cp = ToolProbe( 'CP.exe', 'cp', abort=True )
- gcc = ToolProbe( 'GCC.gcc', 'gcc', IfHost( 'gcc-4', '*-*-cygwin*' ))
+ gcc = ToolProbe( 'GCC.gcc', 'gcc', IfHost( 'clang', '*-*-freebsd*' ), IfHost( 'gcc-4', '*-*-cygwin*' ))
if host.match( '*-*-darwin*' ):
gmake = ToolProbe( 'GMAKE.exe', 'make', 'gmake', abort=True )
diff --git a/make/variant/freebsd.defs b/make/variant/freebsd.defs
index f575c8bed..d8a7245f8 100644
--- a/make/variant/freebsd.defs
+++ b/make/variant/freebsd.defs
@@ -1,5 +1,10 @@
+# LOCALBASE is where FreeBSD ports are installed. default is '/usr/local'.
+LOCALBASE ?= /usr/local
+
TARGET.dylib.ext = .so
+GCC.I = $(LOCALBASE)/include
+GCC.L = $(LOCALBASE)/lib
GCC.D = LIBICONV_PLUG
GCC.args.dylib = -shared