aboutsummaryrefslogtreecommitdiff
path: root/depends/hosts
diff options
context:
space:
mode:
Diffstat (limited to 'depends/hosts')
-rw-r--r--depends/hosts/android.mk9
-rw-r--r--depends/hosts/darwin.mk10
-rw-r--r--depends/hosts/freebsd.mk10
-rw-r--r--depends/hosts/linux.mk10
-rw-r--r--depends/hosts/mingw32.mk10
-rw-r--r--depends/hosts/netbsd.mk10
-rw-r--r--depends/hosts/openbsd.mk10
7 files changed, 58 insertions, 11 deletions
diff --git a/depends/hosts/android.mk b/depends/hosts/android.mk
index fcc1c4f5c3..b53966dcf8 100644
--- a/depends/hosts/android.mk
+++ b/depends/hosts/android.mk
@@ -5,6 +5,15 @@ else
android_CXX=$(ANDROID_TOOLCHAIN_BIN)/$(HOST)$(ANDROID_API_LEVEL)-clang++
android_CC=$(ANDROID_TOOLCHAIN_BIN)/$(HOST)$(ANDROID_API_LEVEL)-clang
endif
+
+android_CFLAGS=-std=$(C_STANDARD)
+android_CXXFLAGS=-std=$(CXX_STANDARD)
+
+ifneq ($(LTO),)
+android_CFLAGS += -flto
+android_LDFLAGS += -flto
+endif
+
android_AR=$(ANDROID_TOOLCHAIN_BIN)/llvm-ar
android_RANLIB=$(ANDROID_TOOLCHAIN_BIN)/llvm-ranlib
diff --git a/depends/hosts/darwin.mk b/depends/hosts/darwin.mk
index bf9b7625f2..8507e28532 100644
--- a/depends/hosts/darwin.mk
+++ b/depends/hosts/darwin.mk
@@ -109,8 +109,14 @@ darwin_CXX=env -u C_INCLUDE_PATH -u CPLUS_INCLUDE_PATH \
-Xclang -internal-externc-isystem$(clang_resource_dir)/include \
-Xclang -internal-externc-isystem$(OSX_SDK)/usr/include
-darwin_CFLAGS=-pipe
-darwin_CXXFLAGS=$(darwin_CFLAGS)
+darwin_CFLAGS=-pipe -std=$(C_STANDARD)
+darwin_CXXFLAGS=-pipe -std=$(CXX_STANDARD)
+
+ifneq ($(LTO),)
+darwin_CFLAGS += -flto
+darwin_CXXFLAGS += -flto
+darwin_LDFLAGS += -flto
+endif
darwin_release_CFLAGS=-O2
darwin_release_CXXFLAGS=$(darwin_release_CFLAGS)
diff --git a/depends/hosts/freebsd.mk b/depends/hosts/freebsd.mk
index 0a62347b57..5351d0b900 100644
--- a/depends/hosts/freebsd.mk
+++ b/depends/hosts/freebsd.mk
@@ -1,5 +1,11 @@
-freebsd_CFLAGS=-pipe
-freebsd_CXXFLAGS=$(freebsd_CFLAGS)
+freebsd_CFLAGS=-pipe -std=$(C_STANDARD)
+freebsd_CXXFLAGS=-pipe -std=$(CXX_STANDARD)
+
+ifneq ($(LTO),)
+freebsd_CFLAGS += -flto
+freebsd_CXXFLAGS += -flto
+freebsd_LDFLAGS += -flto
+endif
freebsd_release_CFLAGS=-O2
freebsd_release_CXXFLAGS=$(freebsd_release_CFLAGS)
diff --git a/depends/hosts/linux.mk b/depends/hosts/linux.mk
index 07da752492..b101043439 100644
--- a/depends/hosts/linux.mk
+++ b/depends/hosts/linux.mk
@@ -1,5 +1,11 @@
-linux_CFLAGS=-pipe
-linux_CXXFLAGS=$(linux_CFLAGS)
+linux_CFLAGS=-pipe -std=$(C_STANDARD)
+linux_CXXFLAGS=-pipe -std=$(CXX_STANDARD)
+
+ifneq ($(LTO),)
+linux_CFLAGS += -flto
+linux_CXXFLAGS += -flto
+linux_LDFLAGS += -flto
+endif
linux_release_CFLAGS=-O2
linux_release_CXXFLAGS=$(linux_release_CFLAGS)
diff --git a/depends/hosts/mingw32.mk b/depends/hosts/mingw32.mk
index 48020d71af..b98f9ab7ac 100644
--- a/depends/hosts/mingw32.mk
+++ b/depends/hosts/mingw32.mk
@@ -2,8 +2,14 @@ ifneq ($(shell $(SHELL) $(.SHELLFLAGS) "command -v $(host)-g++-posix"),)
mingw32_CXX := $(host)-g++-posix
endif
-mingw32_CFLAGS=-pipe
-mingw32_CXXFLAGS=$(mingw32_CFLAGS)
+mingw32_CFLAGS=-pipe -std=$(C_STANDARD)
+mingw32_CXXFLAGS=-pipe -std=$(CXX_STANDARD)
+
+ifneq ($(LTO),)
+mingw32_CFLAGS += -flto
+mingw32_CXXFLAGS += -flto
+mingw32_LDFLAGS += -flto
+endif
mingw32_release_CFLAGS=-O2
mingw32_release_CXXFLAGS=$(mingw32_release_CFLAGS)
diff --git a/depends/hosts/netbsd.mk b/depends/hosts/netbsd.mk
index b3e4545a64..8342dcc6ed 100644
--- a/depends/hosts/netbsd.mk
+++ b/depends/hosts/netbsd.mk
@@ -1,4 +1,12 @@
-netbsd_CFLAGS=-pipe
+netbsd_CFLAGS=-pipe -std=$(C_STANDARD)
+netbsd_CXXFLAGS=-pipe -std=$(CXX_STANDARD)
+
+ifneq ($(LTO),)
+netbsd_CFLAGS += -flto
+netbsd_CXXFLAGS += -flto
+netbsd_LDFLAGS += -flto
+endif
+
netbsd_CXXFLAGS=$(netbsd_CFLAGS)
netbsd_release_CFLAGS=-O2
diff --git a/depends/hosts/openbsd.mk b/depends/hosts/openbsd.mk
index 5988f24bff..d330e94d2e 100644
--- a/depends/hosts/openbsd.mk
+++ b/depends/hosts/openbsd.mk
@@ -1,5 +1,11 @@
-openbsd_CFLAGS=-pipe
-openbsd_CXXFLAGS=$(openbsd_CFLAGS)
+openbsd_CFLAGS=-pipe -std=$(C_STANDARD)
+openbsd_CXXFLAGS=-pipe -std=$(CXX_STANDARD)
+
+ifneq ($(LTO),)
+openbsd_CFLAGS += -flto
+openbsd_CXXFLAGS += -flto
+openbsd_LDFLAGS += -flto
+endif
openbsd_release_CFLAGS=-O2
openbsd_release_CXXFLAGS=$(openbsd_release_CFLAGS)