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 | |
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
-rw-r--r-- | contrib/fontconfig/module.defs | 6 | ||||
-rw-r--r-- | contrib/x264/module.defs | 2 | ||||
-rw-r--r-- | make/include/contrib.defs | 6 | ||||
-rw-r--r-- | make/include/gcc.defs | 12 |
4 files changed, 16 insertions, 10 deletions
diff --git a/contrib/fontconfig/module.defs b/contrib/fontconfig/module.defs index 874064106..b527731ec 100644 --- a/contrib/fontconfig/module.defs +++ b/contrib/fontconfig/module.defs @@ -53,14 +53,14 @@ FONTCONFIG.CONFIGURE.env.CC = CC="$(FONTCONFIG.GCC.gcc) $(FONTCONFIG.cc_ar # ifeq (max,$(FONTCONFIG.GCC.g)) ifeq (none,$(FONTCONFIG.GCC.O)) - FONTCONFIG.CONFIGURE.env.CFLAGS = CFLAGS="-I$(call fn.ABSOLUTE,$(CONTRIB.build/))include $(call fn.ARGS,FONTCONFIG.GCC,*sysroot *minver ?extra .g .O)" + FONTCONFIG.CONFIGURE.env.CFLAGS = CFLAGS="-I$(call fn.ABSOLUTE,$(CONTRIB.build/))include $(call fn.ARGS,FONTCONFIG.GCC,*sysroot *minver ?c_std ?extra .g .O)" FONTCONFIG.CONFIGURE.env.CXXFLAGS = CXXFLAGS="-I$(call fn.ABSOLUTE,$(CONTRIB.build/))include $(call fn.ARGS,FONTCONFIG.GCC,*sysroot *minver ?extra .g .O)" else - FONTCONFIG.CONFIGURE.env.CFLAGS = CFLAGS="-I$(call fn.ABSOLUTE,$(CONTRIB.build/))include $(call fn.ARGS,FONTCONFIG.GCC,*sysroot *minver ?extra .g)" + FONTCONFIG.CONFIGURE.env.CFLAGS = CFLAGS="-I$(call fn.ABSOLUTE,$(CONTRIB.build/))include $(call fn.ARGS,FONTCONFIG.GCC,*sysroot *minver ?c_std ?extra .g)" FONTCONFIG.CONFIGURE.env.CXXFLAGS = CXXFLAGS="-I$(call fn.ABSOLUTE,$(CONTRIB.build/))include $(call fn.ARGS,FONTCONFIG.GCC,*sysroot *minver ?extra .g)" endif else - FONTCONFIG.CONFIGURE.env.CFLAGS = CFLAGS="-I$(call fn.ABSOLUTE,$(CONTRIB.build/))include $(call fn.ARGS,FONTCONFIG.GCC,*sysroot *minver ?extra)" + FONTCONFIG.CONFIGURE.env.CFLAGS = CFLAGS="-I$(call fn.ABSOLUTE,$(CONTRIB.build/))include $(call fn.ARGS,FONTCONFIG.GCC,*sysroot *minver ?c_std ?extra)" FONTCONFIG.CONFIGURE.env.CXXFLAGS = CXXFLAGS="-I$(call fn.ABSOLUTE,$(CONTRIB.build/))include $(call fn.ARGS,FONTCONFIG.GCC,*sysroot *minver ?extra)" endif diff --git a/contrib/x264/module.defs b/contrib/x264/module.defs index d01dec8a1..e4192b3a6 100644 --- a/contrib/x264/module.defs +++ b/contrib/x264/module.defs @@ -4,6 +4,8 @@ $(eval $(call import.CONTRIB.defs,X264)) X264.FETCH.url = http://download.handbrake.fr/handbrake/contrib/x264-r2377-1ca7bb9.tar.gz X264.EXTRACT.tarbase = x264 +X264.GCC.args.c_std = + X264.CONFIGURE.deps = X264.CONFIGURE.shared = 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 |