diff options
author | fanquake <fanquake@gmail.com> | 2021-08-31 13:34:43 +0800 |
---|---|---|
committer | fanquake <fanquake@gmail.com> | 2022-06-16 16:59:05 +0100 |
commit | 7e7b3e42fa98b584ae60513a6774037bf677b8ce (patch) | |
tree | 165cab169ec64034c8bcf6cd8b5e8c0683322242 /depends/hosts | |
parent | 8035b5c80df51130af7cd398da84186ee42dd6e3 (diff) |
build: add and use C_STANDARD in depends
Diffstat (limited to 'depends/hosts')
-rw-r--r-- | depends/hosts/android.mk | 2 | ||||
-rw-r--r-- | depends/hosts/darwin.mk | 6 | ||||
-rw-r--r-- | depends/hosts/freebsd.mk | 6 | ||||
-rw-r--r-- | depends/hosts/linux.mk | 6 | ||||
-rw-r--r-- | depends/hosts/mingw32.mk | 6 | ||||
-rw-r--r-- | depends/hosts/netbsd.mk | 4 | ||||
-rw-r--r-- | depends/hosts/openbsd.mk | 5 |
7 files changed, 20 insertions, 15 deletions
diff --git a/depends/hosts/android.mk b/depends/hosts/android.mk index 9029355460..b5ca179b3d 100644 --- a/depends/hosts/android.mk +++ b/depends/hosts/android.mk @@ -6,6 +6,8 @@ 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) + ifneq ($(LTO),) android_CFLAGS += -flto android_LDFLAGS += -flto diff --git a/depends/hosts/darwin.mk b/depends/hosts/darwin.mk index a564613cb6..ca31403d4d 100644 --- a/depends/hosts/darwin.mk +++ b/depends/hosts/darwin.mk @@ -109,15 +109,15 @@ 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_CFLAGS=-pipe -std=$(C_STANDARD) +darwin_CXXFLAGS=-pipe ifneq ($(LTO),) darwin_CFLAGS += -flto +darwin_CXXFLAGS += -flto darwin_LDFLAGS += -flto endif -darwin_CXXFLAGS=$(darwin_CFLAGS) - darwin_release_CFLAGS=-O2 darwin_release_CXXFLAGS=$(darwin_release_CFLAGS) diff --git a/depends/hosts/freebsd.mk b/depends/hosts/freebsd.mk index 853fa0f457..b4dcc61c2f 100644 --- a/depends/hosts/freebsd.mk +++ b/depends/hosts/freebsd.mk @@ -1,12 +1,12 @@ -freebsd_CFLAGS=-pipe +freebsd_CFLAGS=-pipe -std=$(C_STANDARD) +freebsd_CXXFLAGS=-pipe ifneq ($(LTO),) freebsd_CFLAGS += -flto +freebsd_CXXFLAGS += -flto freebsd_LDFLAGS += -flto endif -freebsd_CXXFLAGS=$(freebsd_CFLAGS) - freebsd_release_CFLAGS=-O2 freebsd_release_CXXFLAGS=$(freebsd_release_CFLAGS) diff --git a/depends/hosts/linux.mk b/depends/hosts/linux.mk index 5322520e6f..d32d7e84ab 100644 --- a/depends/hosts/linux.mk +++ b/depends/hosts/linux.mk @@ -1,12 +1,12 @@ -linux_CFLAGS=-pipe +linux_CFLAGS=-pipe -std=$(C_STANDARD) +linux_CXXFLAGS=-pipe ifneq ($(LTO),) linux_CFLAGS += -flto +linux_CXXFLAGS += -flto linux_LDFLAGS += -flto endif -linux_CXXFLAGS=$(linux_CFLAGS) - linux_release_CFLAGS=-O2 linux_release_CXXFLAGS=$(linux_release_CFLAGS) diff --git a/depends/hosts/mingw32.mk b/depends/hosts/mingw32.mk index 979280b5cb..24a25a2788 100644 --- a/depends/hosts/mingw32.mk +++ b/depends/hosts/mingw32.mk @@ -2,15 +2,15 @@ ifneq ($(shell $(SHELL) $(.SHELLFLAGS) "command -v $(host)-g++-posix"),) mingw32_CXX := $(host)-g++-posix endif -mingw32_CFLAGS=-pipe +mingw32_CFLAGS=-pipe -std=$(C_STANDARD) +mingw32_CXXFLAGS=-pipe ifneq ($(LTO),) mingw32_CFLAGS += -flto +mingw32_CXXFLAGS += -flto mingw32_LDFLAGS += -flto endif -mingw32_CXXFLAGS=$(mingw32_CFLAGS) - mingw32_release_CFLAGS=-O2 mingw32_release_CXXFLAGS=$(mingw32_release_CFLAGS) diff --git a/depends/hosts/netbsd.mk b/depends/hosts/netbsd.mk index 9e48248b7e..a0cf6b1057 100644 --- a/depends/hosts/netbsd.mk +++ b/depends/hosts/netbsd.mk @@ -1,7 +1,9 @@ -netbsd_CFLAGS=-pipe +netbsd_CFLAGS=-pipe -std=$(C_STANDARD) +netbsd_CXXFLAGS=-pipe ifneq ($(LTO),) netbsd_CFLAGS += -flto +netbsd_CXXFLAGS += -flto netbsd_LDFLAGS += -flto endif diff --git a/depends/hosts/openbsd.mk b/depends/hosts/openbsd.mk index c4a629e021..3578872693 100644 --- a/depends/hosts/openbsd.mk +++ b/depends/hosts/openbsd.mk @@ -1,8 +1,9 @@ -openbsd_CFLAGS=-pipe -openbsd_CXXFLAGS=$(openbsd_CFLAGS) +openbsd_CFLAGS=-pipe -std=$(C_STANDARD) +openbsd_CXXFLAGS=-pipe ifneq ($(LTO),) openbsd_CFLAGS += -flto +openbsd_CXXFLAGS += -flto openbsd_LDFLAGS += -flto endif |