Commit a3f33c47 authored by Dmitry Blinov's avatar Dmitry Blinov

easier to toggle sanitizer flags

parent 6afa4ade
...@@ -303,6 +303,8 @@ incdir = -I${libdb:location}/include -I${qt4-qmake:location}/include -I${qt4-qma ...@@ -303,6 +303,8 @@ incdir = -I${libdb:location}/include -I${qt4-qmake:location}/include -I${qt4-qma
libs = -L${libdb:location}/lib -ldb_cxx-5 -L${gettext:location}/lib -L${alsa:location}/lib -L${zlib:location}/lib -L ${qt4-qmake:location}/lib -L${phonon-qt4:location}/lib -L${fontconfig:location}/lib libs = -L${libdb:location}/lib -ldb_cxx-5 -L${gettext:location}/lib -L${alsa:location}/lib -L${zlib:location}/lib -L ${qt4-qmake:location}/lib -L${phonon-qt4:location}/lib -L${fontconfig:location}/lib
compile-dir = ${:location}__compile__ compile-dir = ${:location}__compile__
#compile-dir = ${:location}__compile__/pwr #compile-dir = ${:location}__compile__/pwr
sanitizer-flags = -fsanitize=address
#sanitizer-flags =
configure-command = configure-command =
sed -i "s#aroot=/usr/local/adm#aroot=${:aroot}#" ${:compile-dir}/build.sh sed -i "s#aroot=/usr/local/adm#aroot=${:aroot}#" ${:compile-dir}/build.sh
sed -i "s#(cross_compile)#(cross_compile) ${:rpaths} #" ${:compile-dir}/xtt/exe/wb_ge/qt/link_rule.mk sed -i "s#(cross_compile)#(cross_compile) ${:rpaths} #" ${:compile-dir}/xtt/exe/wb_ge/qt/link_rule.mk
...@@ -310,8 +312,8 @@ configure-command = ...@@ -310,8 +312,8 @@ configure-command =
sed -i 's/strcpy(ctx->rw->attr_typeref, \&ctx->rw->attr_typeref\[strlen("pwr_etype_")\])/memmove(ctx->rw->attr_typeref, \&ctx->rw->attr_typeref\[strlen("pwr_etype_")\],strlen(\&ctx->rw->attr_typeref\[strlen("pwr_etype_")\])+1)/' ${:compile-dir}/src/exe/co_convert/src/cnv_wbltoh.cpp sed -i 's/strcpy(ctx->rw->attr_typeref, \&ctx->rw->attr_typeref\[strlen("pwr_etype_")\])/memmove(ctx->rw->attr_typeref, \&ctx->rw->attr_typeref\[strlen("pwr_etype_")\],strlen(\&ctx->rw->attr_typeref\[strlen("pwr_etype_")\])+1)/' ${:compile-dir}/src/exe/co_convert/src/cnv_wbltoh.cpp
sed -i '/strcpy($/d' ${:compile-dir}/src/exe/co_convert/src/cnv_wbltoh.cpp sed -i '/strcpy($/d' ${:compile-dir}/src/exe/co_convert/src/cnv_wbltoh.cpp
sed -i 's/ctx->rw->attr_typeref, \&ctx->rw->attr_typeref\[strlen("pwr_etypedef_")\])/memmove(ctx->rw->attr_typeref, \&ctx->rw->attr_typeref\[strlen("pwr_etypedef_")\], strlen(\&ctx->rw->attr_typeref\[strlen("pwr_etypedef_")\])+1)/' ${:compile-dir}/src/exe/co_convert/src/cnv_wbltoh.cpp sed -i 's/ctx->rw->attr_typeref, \&ctx->rw->attr_typeref\[strlen("pwr_etypedef_")\])/memmove(ctx->rw->attr_typeref, \&ctx->rw->attr_typeref\[strlen("pwr_etypedef_")\], strlen(\&ctx->rw->attr_typeref\[strlen("pwr_etypedef_")\])+1)/' ${:compile-dir}/src/exe/co_convert/src/cnv_wbltoh.cpp
sed -i "s#cflags := \$(cross_compile) -c#cflags := \$(cross_compile) -fsanitize=address ${:incdir} -c#" ${:compile-dir}/src/tools/bld/src/variables.mk sed -i "s#cflags := \$(cross_compile) -c#cflags := \$(cross_compile) ${:sanitizer-flags} ${:incdir} -c#" ${:compile-dir}/src/tools/bld/src/variables.mk
sed -i "s#linkflags := \$(cross_compile) #linkflags := \$(cross_compile) -fsanitize=address -llsan ${:rpaths} #" ${:compile-dir}/src/tools/bld/src/variables.mk sed -i "s#linkflags := \$(cross_compile) #linkflags := \$(cross_compile) ${:sanitizer-flags} ${:rpaths} #" ${:compile-dir}/src/tools/bld/src/variables.mk
sed -i "s#cxxflags := \$(cflags)#cxxflags := -std=gnu++11 \$(cflags)#" ${:compile-dir}/src/tools/bld/src/variables.mk sed -i "s#cxxflags := \$(cflags)#cxxflags := -std=gnu++11 \$(cflags)#" ${:compile-dir}/src/tools/bld/src/variables.mk
sed -i "s#\$(\$(pred))#\$(shell expr \$(word) - 1)#" ${:compile-dir}/src/tools/pwre/src/dir_symbols.mk sed -i "s#\$(\$(pred))#\$(shell expr \$(word) - 1)#" ${:compile-dir}/src/tools/pwre/src/dir_symbols.mk
sed -i "s#typedef char cnv_tName\[200\]#typedef char cnv_tName\[300\]#" ${:compile-dir}/src/exe/co_convert/src/co_convert.cpp sed -i "s#typedef char cnv_tName\[200\]#typedef char cnv_tName\[300\]#" ${:compile-dir}/src/exe/co_convert/src/co_convert.cpp
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment