diff options
author | Rodeo <[email protected]> | 2013-12-05 14:01:08 +0000 |
---|---|---|
committer | Rodeo <[email protected]> | 2013-12-05 14:01:08 +0000 |
commit | e1764eb3ae1fb59c2d10b5fdbafc865fc7d22d80 (patch) | |
tree | e28a1067f1470000e6eb5a2370a15e5a1cadea31 /make/include | |
parent | f773e1f14d781cecc60f59e71322ef005fe06016 (diff) |
Build: use GNU99 mode.
Required for proper POSIX behaviour on Solaris.
Patch by icchan. Thanks!
git-svn-id: svn://svn.handbrake.fr/HandBrake/trunk@5915 b64f7644-9d1e-0410-96f1-a4d463321fa5
Diffstat (limited to 'make/include')
-rw-r--r-- | make/include/contrib.defs | 6 | ||||
-rw-r--r-- | make/include/gcc.defs | 12 |
2 files changed, 11 insertions, 7 deletions
diff --git a/make/include/contrib.defs b/make/include/contrib.defs index 8794e6e31..c3f815a77 100644 --- a/make/include/contrib.defs +++ b/make/include/contrib.defs @@ -91,14 +91,14 @@ define import.CONTRIB.defs ## debug=max or optimizations=none. Otherwise, use the contribs defaults ifeq (max,$$($(1).GCC.g)) ifeq (none,$$($(1).GCC.O)) - $(1).CONFIGURE.env.CFLAGS = CFLAGS="-I$$(call fn.ABSOLUTE,$(CONTRIB.build/))include $$(call fn.ARGS,$(1).GCC,*archs *sysroot *minver ?extra .g .O *D)" + $(1).CONFIGURE.env.CFLAGS = CFLAGS="-I$$(call fn.ABSOLUTE,$(CONTRIB.build/))include $$(call fn.ARGS,$(1).GCC,*archs *sysroot *minver ?c_std ?extra .g .O *D)" $(1).CONFIGURE.env.CXXFLAGS = CXXFLAGS="-I$$(call fn.ABSOLUTE,$(CONTRIB.build/))include $$(call fn.ARGS,$(1).GCC,*archs *sysroot *minver ?extra .g .O *D)" else - $(1).CONFIGURE.env.CFLAGS = CFLAGS="-I$$(call fn.ABSOLUTE,$(CONTRIB.build/))include $$(call fn.ARGS,$(1).GCC,*archs *sysroot *minver ?extra .g *D)" + $(1).CONFIGURE.env.CFLAGS = CFLAGS="-I$$(call fn.ABSOLUTE,$(CONTRIB.build/))include $$(call fn.ARGS,$(1).GCC,*archs *sysroot *minver ?c_std ?extra .g *D)" $(1).CONFIGURE.env.CXXFLAGS = CXXFLAGS="-I$$(call fn.ABSOLUTE,$(CONTRIB.build/))include $$(call fn.ARGS,$(1).GCC,*archs *sysroot *minver ?extra .g *D)" endif else - $(1).CONFIGURE.env.CFLAGS = CFLAGS="-I$$(call fn.ABSOLUTE,$(CONTRIB.build/))include $$(call fn.ARGS,$(1).GCC,*archs *sysroot *minver ?extra *D)" + $(1).CONFIGURE.env.CFLAGS = CFLAGS="-I$$(call fn.ABSOLUTE,$(CONTRIB.build/))include $$(call fn.ARGS,$(1).GCC,*archs *sysroot *minver ?c_std ?extra *D)" $(1).CONFIGURE.env.CXXFLAGS = CXXFLAGS="-I$$(call fn.ABSOLUTE,$(CONTRIB.build/))include $$(call fn.ARGS,$(1).GCC,*archs *sysroot *minver ?extra *D)" endif $(1).CONFIGURE.env.CPPFLAGS = CPPFLAGS="-I$$(call fn.ABSOLUTE,$(CONTRIB.build/))include $$(call fn.ARGS,$(1).GCC,*archs *sysroot *minver ?extra *D)" diff --git a/make/include/gcc.defs b/make/include/gcc.defs index 2bfc63562..e6695c329 100644 --- a/make/include/gcc.defs +++ b/make/include/gcc.defs @@ -4,6 +4,7 @@ GCC.gxx = $(dir $(GCC.gcc))$(subst clang,clang++,$(subst gcc,g++,$(notdir $(GCC. GCC.strip = $$(if $$(filter none,$$(GCC.g)),1) GCC.dylib = 1 GCC.pipe = 1 +GCC.c_std = 1 GCC.ML = 1 GCC.H = 0 GCC.W = all @@ -50,6 +51,7 @@ GCC.args.sysroot = --sysroot=$(1) GCC.args.minver = -mmacosx-version-min=$(1) GCC.args.vis = -fvisibility=hidden GCC.args.pic = -fPIC +GCC.args.c_std = -std=gnu99 GCC.args.g.none = -g0 GCC.args.g.min = -gdwarf-2 -g1 GCC.args.g.std = -gdwarf-2 @@ -84,6 +86,7 @@ define import.GCC $(1).GCC.gxx = $$(dir $$($(1).GCC.gcc))$$(subst gcc,g++,$$(notdir $$($(1).GCC.gcc))) $(1).GCC.pipe = $$(GCC.pipe) + $(1).GCC.c_std = $$(GCC.c_std) $(1).GCC.strip = $$(if $$(filter none,$$($(1).GCC.g)),1) $(1).GCC.dylib = $$(GCC.dylib) $(1).GCC.ML = $$(GCC.ML) @@ -118,6 +121,7 @@ define import.GCC $(1).GCC.extra.exe++ = $$(GCC.extra.exe++) $(1).GCC.args.pipe = $$(GCC.args.pipe) + $(1).GCC.args.c_std = $$(GCC.args.c_std) $(1).GCC.args.strip = $$(GCC.args.strip) $(1).GCC.args.dylib = $$(GCC.args.dylib) $(1).GCC.args.ML = $$(GCC.args.ML) @@ -161,11 +165,11 @@ define import.GCC $(1).GCC.o = -o $$(3) # FUNCTION: C precompiled headers - $(1).GCC.H_O.args = !gcc ?pipe ?ML ?H *W *archs *sysroot *minver ?vis ?pic .g .O ?extra ?extra.h_o *D *I !c !o + $(1).GCC.H_O.args = !gcc ?c_std ?pipe ?ML ?H *W *archs *sysroot *minver ?vis ?pic .g .O ?extra ?extra.h_o *D *I !c !o $(1).GCC.H_O = $$(call fn.ARGS,$(1).GCC,$$($(1).GCC.H_O.args),$$(1),$$(2)) # FUNCTION: C compile source - $(1).GCC.C_O.args = !gcc ?pipe ?ML ?H *W *archs *sysroot *minver ?vis ?pic .g .O ?extra ?extra.c_o *D *I !c !o + $(1).GCC.C_O.args = !gcc ?c_std ?pipe ?ML ?H *W *archs *sysroot *minver ?vis ?pic .g .O ?extra ?extra.c_o *D *I !c !o $(1).GCC.C_O = $$(call fn.ARGS,$(1).GCC,$$($(1).GCC.C_O.args),$$(1),$$(2)) # FUNCTION: C++ precompile headers @@ -181,11 +185,11 @@ define import.GCC $(1).GCC.i = $$(4) # FUNCTION: C link dynamic-lib - $(1).GCC.DYLIB.args = !gcc ?pipe ?strip ?dylib ?extra.dylib ?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.DYLIB.args = !gcc ?c_std ?pipe ?strip ?dylib ?extra.dylib ?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.DYLIB = $$(call fn.ARGS,$(1).GCC,$$($(1).GCC.DYLIB.args),$$(1),$$(2)) # FUNCTION: C link executable - $(1).GCC.EXE.args = !gcc ?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 = !gcc ?c_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)) # FUNCTION: C++ link dynamic-lib |