diff options
author | John Stebbins <[email protected]> | 2016-05-24 14:10:31 -0700 |
---|---|---|
committer | John Stebbins <[email protected]> | 2016-05-24 14:10:31 -0700 |
commit | 76595a4b2131536eb3e498b161944057e882d038 (patch) | |
tree | 5917723dd5f70c66fdf11db10b610ab99e875905 /make/include/gcc.defs | |
parent | e7578bb85c3cfebc65e69c33bbb4e123ae01a11d (diff) |
Add ability to set C++ standard (#195)
* build: add ability to set c++ standard
* fdk-aac: Fix building with g++ 6, set c++98 standard
Diffstat (limited to 'make/include/gcc.defs')
-rw-r--r-- | make/include/gcc.defs | 12 |
1 files changed, 8 insertions, 4 deletions
diff --git a/make/include/gcc.defs b/make/include/gcc.defs index 222e6e4f5..adb86ad46 100644 --- a/make/include/gcc.defs +++ b/make/include/gcc.defs @@ -5,6 +5,7 @@ GCC.strip = $$(if $$(filter none,$$(GCC.g)),1) GCC.dylib = 1 GCC.pipe = 1 GCC.c_std = 1 +GCC.cxx_std = 0 GCC.ML = 1 GCC.H = 0 GCC.W = all @@ -54,6 +55,7 @@ GCC.args.minver = -mmacosx-version-min=$(1) GCC.args.vis = -fvisibility=hidden GCC.args.pic = -fPIC GCC.args.c_std = -std=gnu99 +GCC.args.cxx_std = -std=c++98 GCC.args.g.none = -g0 GCC.args.g.min = -gdwarf-2 -g1 GCC.args.g.std = -gdwarf-2 @@ -93,6 +95,7 @@ define import.GCC $(1).GCC.pipe = $$(GCC.pipe) $(1).GCC.c_std = $$(GCC.c_std) + $(1).GCC.cxx_std = $$(GCC.cxx_std) $(1).GCC.strip = $$(if $$(filter none,$$($(1).GCC.g)),1) $(1).GCC.dylib = $$(GCC.dylib) $(1).GCC.ML = $$(GCC.ML) @@ -128,6 +131,7 @@ define import.GCC $(1).GCC.args.pipe = $$(GCC.args.pipe) $(1).GCC.args.c_std = $$(GCC.args.c_std) + $(1).GCC.args.cxx_std = $$(GCC.args.cxx_std) $(1).GCC.args.strip = $$(GCC.args.strip) $(1).GCC.args.dylib = $$(GCC.args.dylib) $(1).GCC.args.ML = $$(GCC.args.ML) @@ -179,11 +183,11 @@ define import.GCC $(1).GCC.C_O = $$(call fn.ARGS,$(1).GCC,$$($(1).GCC.C_O.args),$$(1),$$(2)) # FUNCTION: C++ precompile headers - $(1).GCC.HPP_O.args = !gxx ?pipe ?ML ?H *W *archs *sysroot *minver ?vis ?pic .g .O ?extra ?extra.hpp_o *D *I !c !o + $(1).GCC.HPP_O.args = !gxx ?cxx_std ?pipe ?ML ?H *W *archs *sysroot *minver ?vis ?pic .g .O ?extra ?extra.hpp_o *D *I !c !o $(1).GCC.HPP_O = $$(call fn.ARGS,$(1).GCC,$$($(1).GCC.HPP_O.args),$$(1),$$(2)) # FUNCTION: C++ compile source - $(1).GCC.CPP_O.args = !gxx ?pipe ?ML ?H *W *archs *sysroot *minver ?vis ?pic .g .O ?extra ?extra.cpp_o *D *I !c !o + $(1).GCC.CPP_O.args = !gxx ?cxx_std ?pipe ?ML ?H *W *archs *sysroot *minver ?vis ?pic .g .O ?extra ?extra.cpp_o *D *I !c !o $(1).GCC.CPP_O = $$(call fn.ARGS,$(1).GCC,$$($(1).GCC.CPP_O.args),$$(1),$$(2)) ########################################################################### @@ -199,10 +203,10 @@ define import.GCC $(1).GCC.EXE = $$(call fn.ARGS,$(1).GCC,$$($(1).GCC.EXE.args),$$(1),$$(2)) # FUNCTION: C++ link dynamic-lib - $(1).GCC.DYLIB++.args = !gxx ?pipe ?strip ?dylib ?extra.dylib++ ?ML *W *archs *sysroot *minvers ?vis ?pic .g .O ?extra *D *I !o ?muldefs ?start !i *F *f *L *l *i !a ?end + $(1).GCC.DYLIB++.args = !gxx ?cxx_std ?pipe ?strip ?dylib ?extra.dylib++ ?ML *W *archs *sysroot *minvers ?vis ?pic .g .O ?extra *D *I !o ?muldefs ?start !i *F *f *L *l *i !a ?end $(1).GCC.DYLIB++ = $$(call fn.ARGS,$(1).GCC,$$($(1).GCC.DYLIB++.args),$$(1),$$(2)) # FUNCTION: C++ link executable - $(1).GCC.EXE++.args = !gxx ?pipe ?strip ?extra.exe++ ?ML *W *archs *sysroot *minver ?vis ?pic .g .O ?extra *D *I !o ?muldefs ?start !i *F *f *L *l *i !a ?end + $(1).GCC.EXE++.args = !gxx ?cxx_std ?pipe ?strip ?extra.exe++ ?ML *W *archs *sysroot *minver ?vis ?pic .g .O ?extra *D *I !o ?muldefs ?start !i *F *f *L *l *i !a ?end $(1).GCC.EXE++ = $$(call fn.ARGS,$(1).GCC,$$($(1).GCC.EXE++.args),$$(1),$$(2)) endef |