From 2174500076c91bade76b724424ae02d2cf5a3623 Mon Sep 17 00:00:00 2001 From: hwhbj Date: Tue, 19 Sep 2023 15:09:22 +0800 Subject: [PATCH] =?UTF-8?q?=20=E4=BF=AE=E5=A4=8Dpagehack,=20pg=5Fxlogdump?= =?UTF-8?q?=E5=AE=89=E5=85=A8=E7=BC=96=E8=AF=91=E9=80=89=E9=A1=B9=E7=9A=84?= =?UTF-8?q?=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- contrib/pagehack/Makefile | 6 +++--- contrib/pg_xlogdump/Makefile | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/contrib/pagehack/Makefile b/contrib/pagehack/Makefile index 4c944b767..ccd3ee1cb 100644 --- a/contrib/pagehack/Makefile +++ b/contrib/pagehack/Makefile @@ -19,11 +19,11 @@ subdir = contrib/pagehack top_builddir = ../.. include $(top_builddir)/src/Makefile.global override CPPFLAGS += -I${top_builddir}/src/lib/page_compression -override LDFLAGS += -L${top_builddir}/src/lib/page_compression -override CFLAGS += -lpagecompression -lzstd -llz4 +override LDFLAGS += -L${top_builddir}/src/lib/page_compression -Wl,-z,relro,-z,now +override CFLAGS += -lpagecompression -lzstd -llz4 -fstack-protector-all ifeq ($(enable_debug), yes) PG_CPPFLAGS += -DDEBUG endif include $(top_srcdir)/contrib/contrib-global.mk -endif +endif \ No newline at end of file diff --git a/contrib/pg_xlogdump/Makefile b/contrib/pg_xlogdump/Makefile index 61a89991d..67c7b5278 100644 --- a/contrib/pg_xlogdump/Makefile +++ b/contrib/pg_xlogdump/Makefile @@ -21,7 +21,9 @@ include $(top_builddir)/src/Makefile.global include $(top_srcdir)/contrib/contrib-global.mk -override CPPFLAGS := -DFRONTEND $(CPPFLAGS) +override CPPFLAGS := -DFRONTEND $(CPPFLAGS) -fstack-protector-all -Wl,-z,relro,-z,now +override LDFLAGS += -Wl,-z,relro,-z,now +override CFLAGS += -fstack-protector-all xlogreader.cpp: % : $(top_srcdir)/src/gausskernel/storage/access/transam/% rm -f $@ && $(LN_S) $< .