make-rules/shared-macros.mk
changeset 766 58402b94c13b
parent 706 6e61f0012046
child 774 d0cbca26a17c
--- a/make-rules/shared-macros.mk	Tue Apr 10 04:03:43 2012 -0700
+++ b/make-rules/shared-macros.mk	Wed Apr 11 13:51:22 2012 -0700
@@ -554,6 +554,9 @@
 
 LD_Z_TEXT =		-z direct
 
+# make sure that -lc is always present when building shared objects.
+LD_DEF_LIBS +=		-lc
+
 # make sure all symbols are defined.
 LD_Z_DEFS =		-z defs
 
@@ -587,7 +590,7 @@
 LD_MAP_PAGEALIGN =	-M /usr/lib/ld/map.pagealign
 
 # Linker options to add when only building libraries
-LD_OPTIONS_SO +=	$(LD_Z_TEXT) $(LD_Z_DEFS)
+LD_OPTIONS_SO +=	$(LD_Z_TEXT) $(LD_Z_DEFS) $(LD_DEF_LIBS)
 
 # Default linker options that everyone should get.  Do not add additional
 # libraries to this macro, as it will apply to everything linked during the