xref: /OK3568_Linux_fs/buildroot/package/benejson/0001-c-std.patch (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593SmuzhiyunSome older toolchains do not recognize c11 as a valid standard.
2*4882a593SmuzhiyunSince the code actually builds well with c99, use that instead.
3*4882a593Smuzhiyun
4*4882a593SmuzhiyunThe only two non-standard features used are // comments
5*4882a593Smuzhiyunand for(int i ...) declarations in C.
6*4882a593Smuzhiyun
7*4882a593SmuzhiyunSigned-off-by: Alex Suykov <alex.suykov@gmail.com>
8*4882a593Smuzhiyun
9*4882a593Smuzhiyun--- a/SConstruct
10*4882a593Smuzhiyun+++ b/SConstruct
11*4882a593Smuzhiyun@@ -9,9 +9,8 @@ mydir = os.getcwd()
12*4882a593Smuzhiyun #Set default C++ building flags for both libraries and executables
13*4882a593Smuzhiyun default_env = Environment(ENV = os.environ)
14*4882a593Smuzhiyun default_env.Append(CPPPATH = [mydir + '/include'])
15*4882a593Smuzhiyun-default_env.Append(CCFLAGS = ' -Wall -pedantic')
16*4882a593Smuzhiyun-default_env.Append(CFLAGS = ' -std=c11')
17*4882a593Smuzhiyun-default_env.Append(CXXFLAGS = ' -std=c++11')
18*4882a593Smuzhiyun+default_env.Append(CFLAGS = ' -Wall')
19*4882a593Smuzhiyun+default_env.Append(CFLAGS = ' -std=c99')
20*4882a593Smuzhiyun #default_env.Append(CCFLAGS = ' -O2 -fomit-frame-pointer')
21*4882a593Smuzhiyun default_env.Append(CCFLAGS = ' -O0 -g')
22*4882a593Smuzhiyun
23