2 # This script set linux specific flags (GNU GCC)
10 print "Reading linux configuration script"
12 # Set release/debug flags
13 if env.get('RELEASE'):
14 env.AppendUnique(CPPDEFINES = ['NDEBUG'])
16 if env.get('LOGGING'):
17 env.AppendUnique(CPPDEFINES = ['-DTB_LOG'])
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'])
26 env.AppendUnique(CCFLAGS = ['-D__TIZEN__', '-D_GNU_SOURCE', '-DTIZEN_DEBUG_ENABLE','-fstack-protector-strong','-Wl,-z,relro','-D_FORTIFY_SOURCE=2'])
27 env.AppendUnique(CXXFLAGS = ['-D__TIZEN__', '-D_GNU_SOURCE', '-DTIZEN_DEBUG_ENABLE','-fstack-protector-strong','-Wl,-z,relro','-D_FORTIFY_SOURCE=2'])
28 env.AppendUnique(LINKFLAGS = ['-Wl,-z,relro'])
29 env.ParseConfig("pkg-config dlog --cflags --libs")
30 if env.get('OIC_SUPPORT_TIZEN_TRACE') == 'True':
31 env.ParseConfig("pkg-config ttrace --cflags --libs")
32 # Set arch flags : It will be handled by Tizen build system.