Remove the unnecessary ignore options
[platform/upstream/iotivity.git] / build_common / tizen / SConscript
1 ##
2 # This script set linux specific flags (GNU GCC)
3 #
4 ##
5 import os
6 import SCons.Util
7
8 Import('env')
9
10 print "Reading linux configuration script"
11
12 # Set release/debug flags
13 if env.get('RELEASE'):
14         env.AppendUnique(CPPDEFINES = ['NDEBUG'])
15
16 if env.get('LOGGING'):
17     env.AppendUnique(CPPDEFINES = ['-DTB_LOG'])
18
19 env['CCFLAGS'] = SCons.Util.CLVar(os.environ.get('CFLAGS', ""))
20 env.AppendUnique(CPPDEFINES = ['WITH_POSIX', '__linux__'])
21 env.AppendUnique(CFLAGS = ['-std=gnu99'])
22 env.AppendUnique(CCFLAGS = ['-Wextra', '-fPIC'])
23 env.AppendUnique(CXXFLAGS = ['-Wextra', '-fPIC'])
24 env.AppendUnique(LIBS = ['dl', 'pthread'])
25
26 # # Add GCC9 exception
27 env.AppendUnique(CCFLAGS = ['-Wno-format-truncation'])
28 env.AppendUnique(CXXFLAGS = ['-Wno-format-truncation'])
29
30 env.AppendUnique(CCFLAGS = ['-D__TIZEN__', '-D_GNU_SOURCE', '-DTIZEN_DEBUG_ENABLE','-fstack-protector-strong','-Wl,-z,relro','-D_FORTIFY_SOURCE=2'])
31 env.AppendUnique(CXXFLAGS = ['-D__TIZEN__', '-D_GNU_SOURCE', '-DTIZEN_DEBUG_ENABLE','-fstack-protector-strong','-Wl,-z,relro','-D_FORTIFY_SOURCE=2'])
32 env.AppendUnique(LINKFLAGS = ['-Wl,-z,relro'])
33 env.ParseConfig("pkg-config dlog --cflags --libs")
34 if env.get('OIC_SUPPORT_TIZEN_TRACE') == 'True':
35     env.ParseConfig("pkg-config ttrace --cflags --libs")
36 # Set arch flags : It will be handled by Tizen build system.