make-rules/shared-macros.mk
changeset 6552 402379bc1b60
parent 6404 776ac4e2d089
child 6706 00503a3dc80d
equal deleted inserted replaced
6551:ed4d06e2fe03 6552:402379bc1b60
  1003 # use generic macro names for enabling/disabling ASLR
  1003 # use generic macro names for enabling/disabling ASLR
  1004 ASLR_ENABLE = 		-zaslr=enable
  1004 ASLR_ENABLE = 		-zaslr=enable
  1005 ASLR_DISABLE = 		-zaslr=disable
  1005 ASLR_DISABLE = 		-zaslr=disable
  1006 ASLR_NOT_APPLICABLE = 	-zaslr=disable
  1006 ASLR_NOT_APPLICABLE = 	-zaslr=disable
  1007 
  1007 
  1008 # Disable ASLR by default unless target build is NO_ARCH.
  1008 # Enable ASLR by default unless target build is NO_ARCH.
  1009 ifeq ($(strip $(BUILD_BITS)),NO_ARCH)
  1009 ifeq ($(strip $(BUILD_BITS)),NO_ARCH)
  1010 ASLR_MODE= $(ASLR_NOT_APPLICABLE)
  1010 ASLR_MODE= $(ASLR_NOT_APPLICABLE)
  1011 else
  1011 else
  1012 ASLR_MODE= $(ASLR_DISABLE)
  1012 ASLR_MODE= $(ASLR_ENABLE)
  1013 endif
  1013 endif
  1014 
  1014 
  1015 # by default, turn off Address Space Layout Randomization for ELF executables;
  1015 # by default, turn on Address Space Layout Randomization for ELF executables;
  1016 # to explicitly enable ASLR, set ASLR_MODE = $(ASLR_ENABLE)
  1016 # to explicitly disable ASLR, set ASLR_MODE = $(ASLR_DISABLE)
  1017 # in that component's Makefile
  1017 # in that component's Makefile
  1018 LD_Z_ASLR =		$(ASLR_MODE)
  1018 LD_Z_ASLR =		$(ASLR_MODE)
  1019 
  1019 
  1020 #
  1020 #
  1021 # More Solaris linker flags that we want to be sure that everyone gets.  This
  1021 # More Solaris linker flags that we want to be sure that everyone gets.  This