X-Git-Url: http://review.tizen.org/git/?a=blobdiff_plain;f=build_common%2Ftizen%2FSConscript;h=824ab15f075e09e5c6bb697245efd8496620aae9;hb=refs%2Ftags%2Faccepted%2Ftizen%2Funified%2F20230214.171546;hp=15472b4582527885c0e13cb9ea5cce237ba4f7fa;hpb=88d986a4a892b62fddf9d2655a620ab86372a299;p=platform%2Fupstream%2Fiotivity.git diff --git a/build_common/tizen/SConscript b/build_common/tizen/SConscript index 15472b4..824ab15 100644 --- a/build_common/tizen/SConscript +++ b/build_common/tizen/SConscript @@ -7,22 +7,30 @@ import SCons.Util Import('env') -print "Reading linux configuration script" +print("Reading linux configuration script") # Set release/debug flags if env.get('RELEASE'): env.AppendUnique(CPPDEFINES = ['NDEBUG']) if env.get('LOGGING'): - env.AppendUnique(CPPDEFINES = ['-DTB_LOG']) + env.AppendUnique(CPPDEFINES = ['-DTB_LOG']) env['CCFLAGS'] = SCons.Util.CLVar(os.environ.get('CFLAGS', "")) env.AppendUnique(CPPDEFINES = ['WITH_POSIX', '__linux__']) env.AppendUnique(CFLAGS = ['-std=gnu99']) env.AppendUnique(CCFLAGS = ['-Wextra', '-fPIC']) -env.AppendUnique(LINKFLAGS = ['-ldl', '-lpthread']) +env.AppendUnique(CXXFLAGS = ['-Wextra', '-fPIC']) +env.AppendUnique(LIBS = ['dl', 'pthread']) -env.AppendUnique(CCFLAGS = ['-D__TIZEN__', '-D_GNU_SOURCE', '-DTIZEN_DEBUG_ENABLE']) -env.ParseConfig("pkg-config dlog --cflags --libs") +# # Add GCC9 exception +env.AppendUnique(CCFLAGS = ['-Wno-format-truncation']) +env.AppendUnique(CXXFLAGS = ['-Wno-format-truncation']) +env.AppendUnique(CCFLAGS = ['-D__TIZEN__', '-D_GNU_SOURCE', '-DTIZEN_DEBUG_ENABLE','-fstack-protector-strong','-Wl,-z,relro','-D_FORTIFY_SOURCE=2']) +env.AppendUnique(CXXFLAGS = ['-D__TIZEN__', '-D_GNU_SOURCE', '-DTIZEN_DEBUG_ENABLE','-fstack-protector-strong','-Wl,-z,relro','-D_FORTIFY_SOURCE=2']) +env.AppendUnique(LINKFLAGS = ['-Wl,-z,relro']) +env.ParseConfig("pkg-config dlog --cflags --libs") +if env.get('OIC_SUPPORT_TIZEN_TRACE') == 'True': + env.ParseConfig("pkg-config ttrace --cflags --libs") # Set arch flags : It will be handled by Tizen build system.