diff --git a/src/Makefile b/src/Makefile index e933843b..6d45f630 100644 --- a/src/Makefile +++ b/src/Makefile @@ -33,6 +33,19 @@ CFLAGS += -Wall -Werror -std=c99 $(shell pkg-config --cflags $(PACKAGES)) # Keep this until we have Glib 2.68 in third-party module CFLAGS += -Wno-deprecated-declarations +# XXX: Support to build binaries relro/pie/bind_now. For more, +# please refer to: +# https://github.com/restraint-harness/restraint/issues/255 +#CFLAGS += -fshort-enums +#CFLAGS += -fcf-protection=full +#CFLAGS += -fplugin=annobin +#CFLAGS += -fstack-protector-strong +#CFLAGS += -D_FORTIFY_SOURCE=3 +#CFLAGS += -D_GLIBCXX_ASSERTIONS +CFLAGS += -Wl,-pie -fpie +LDFLAGS += -Wl,-z,now +LDFLAGS += -pie + ifeq ($(STATIC), 1) # The LIBS list must start with static then followed with dynamic. # DYNAMICLIBS must be stripped out of THIRDPTYLIBS leaving