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