make-rules/shared-macros.mk
changeset 64 a4b12971cf99
parent 62 519e6e3788ce
child 70 c610cf9d3d5d
--- a/make-rules/shared-macros.mk	Mon Jan 24 16:29:04 2011 -0800
+++ b/make-rules/shared-macros.mk	Wed Jan 26 13:22:43 2011 -0800
@@ -82,8 +82,23 @@
 
 SFWBIN =	/usr/sfw/bin
 SFWLIB =	/usr/sfw/lib
+SFWSHARE =	/usr/sfw/share
+SFWSHAREMAN =	/usr/sfw/share/man
+SFWSHAREMAN1 =	/usr/sfw/share/man/man1
 PROTOSFWBIN =	$(PROTO_DIR)/$(SFWBIN)
 PROTOSFWLIB =	$(PROTO_DIR)/$(SFWLIB)
+PROTOSFWSHARE =	$(PROTO_DIR)/$(SFWSHARE)
+PROTOSFWSHAREMAN =	$(PROTO_DIR)/$(SFWSHAREMAN)
+PROTOSFWSHAREMAN1 =	$(PROTO_DIR)/$(SFWSHAREMAN1)
+
+GNUBIN =	/usr/gnu/bin
+GNUSHARE =	/usr/gnu/share
+GNUSHAREMAN =	/usr/gnu/share/man
+GNUSHAREMAN1 =	/usr/gnu/share/man/man1
+PROTOGNUBIN =	$(PROTO_DIR)/$(GNUBIN)
+PROTOGNUSHARE =	$(PROTO_DIR)/$(GNUSHARE)
+PROTOGNUSHAREMAN =	$(PROTO_DIR)/$(GNUSHAREMAN)
+PROTOGNUSHAREMAN1 =	$(PROTO_DIR)/$(GNUSHAREMAN1)
 
 # work around _TIME, _DATE, embedded date chatter in component builds
 # to use, set TIME_CONSTANT in the component Makefile and add $(CONSTANT_TIME)
@@ -236,10 +251,19 @@
 	$(COPTFLAG64) $($(MACH64)_CFLAGS) $(CCMODE64) \
 	$(ILDOFF) $(C99MODE) $(IROPTFLAG64)
 
-#
+# build with a non-executable stack by default.
+# override this if necessary
+LD_MAP_NOEXSTK="-M /usr/lib/ld/map.noexstk"
+LD_OPTIONS+= $(LD_MAP_NOEXSTK)
+
 # Environment variables and arguments passed into the build and install
-# environment(s).  These specifically add the bit-specific data
-#
+# environment(s).  These are the initial settings.
+COMPONENT_BUILD_ENV= \
+    LD_OPTIONS=$(LD_OPTIONS)
+COMPONENT_INSTALL_ENV= \
+    LD_OPTIONS=$(LD_OPTIONS)
+
+# Add any bit-specific settings
 COMPONENT_BUILD_ENV += $(COMPONENT_BUILD_ENV.$(BITS))
 COMPONENT_BUILD_ARGS += $(COMPONENT_BUILD_ARGS.$(BITS))
 COMPONENT_INSTALL_ENV += $(COMPONENT_INSTALL_ENV.$(BITS))