summaryrefslogtreecommitdiffstats
path: root/gtk
diff options
context:
space:
mode:
authorYuichiro NAITO <[email protected]>2018-11-17 17:23:53 +0900
committerBradley Sepos <[email protected]>2018-11-26 17:59:40 -0500
commit9e71ecc64729fa852e270e7f0b46827897603c74 (patch)
tree111c0779d0d686f8cfcd88d2eafae43a0ea44eaa /gtk
parentda1f90d8427d444386b269a3ae21a7420e9d81cb (diff)
build: Respect CC environment variable on FreeBSD.
Fixes #1674. We use the compiler that CC environment variable indicates. If CC is ommited, use gcc or clang which is installed. If gcc is chosen, we need to add `-Wl,-rpath` option to make runtime linker linking gcc's runtime libraries from installed path. For example, gcc7's runtime libraries are installed in `/usr/local/lib/gcc7` by default. And we also need to link libc++ first to make libc++ initializer is called on runtime.
Diffstat (limited to 'gtk')
-rw-r--r--gtk/module.rules2
1 files changed, 2 insertions, 0 deletions
diff --git a/gtk/module.rules b/gtk/module.rules
index eaebdb3f5..09d99b466 100644
--- a/gtk/module.rules
+++ b/gtk/module.rules
@@ -17,6 +17,8 @@ $(GTK.CONFIGURE.stamp): $(GTK.src/)configure.ac $(GTK.src/)src/Makefile.am
set -e; cd $(GTK.build/); $(call fn.ABSOLUTE,$(GTK.src/))configure \
$(GTK.CONFIGURE.extra) \
PKG_CONFIG_PATH=$(BUILD/)contrib/lib/pkgconfig:$(PKG_CONFIG_PATH) \
+ CC="$(GCC.gcc)" \
+ CXX="$(GCC.gxx)" \
CFLAGS="$(call fn.ARGS,GTK.GCC,.g .O *D ?extra)" \
LDFLAGS="$(call fn.ARGS,GTK.GCC,?strip .g .O ?extra.exe)" \
PYTHON="$(PYTHON.exe)" \