From: Qi Tao taoqi10@huawei.com
Add PIE、PIC、BIND_NOW、SP、NO Rpath/RunPath、FS、Ftrapv and Strip to UADK compilation.
Signed-off-by: Qi Tao taoqi10@huawei.com --- uadk_tool/Makefile.am | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/uadk_tool/Makefile.am b/uadk_tool/Makefile.am index 6b787f9..7f00087 100644 --- a/uadk_tool/Makefile.am +++ b/uadk_tool/Makefile.am @@ -1,7 +1,9 @@ ACLOCAL_AMFLAGS = -I m4 -I./include AUTOMAKE_OPTIONS = foreign subdir-objects -AM_CFLAGS=-Wall -fno-strict-aliasing -I$(top_srcdir) -I$(top_srcdir)/benchmark/include \ +AM_CFLAGS=-Wall -Werror -fno-strict-aliasing -I$(top_srcdir) -I$(top_srcdir)/benchmark/include \ -pthread +AM_CFLAGS += -fPIC -fPIE -pie -fstack-protector-strong -D_FORTIFY_SOURCE=2 \ +-O2 -ftrapv -Wl,-z,now -Wl,-s
#AUTOMAKE_OPTIONS = subdir-objects
@@ -33,8 +35,6 @@ uadk_tool_LDADD=-L../.libs -l:libwd.so.2 -l:libwd_crypto.so.2 \ -l:libwd_comp.so.2 -lnuma endif
-uadk_tool_LDFLAGS=-Wl,-rpath,'/usr/local/lib',--enable-new-dtags - if WITH_ZLIB_FSE_DIR AM_CFLAGS += -DZLIB_FSE uadk_tool_LDADD+= $(with_zlib_fse_dir)/libfse.a