- New option $(StripLibraries) removes local symbols from library objects.
Turned off by default, as it only works with linkers that support
the '-x' (remove local symbols) option.
GhcProjectName = The Glorious Glasgow Haskell Compilation System
GhcProjectNameShort = ghc
-GhcProjectVersion = 3.02
+GhcProjectVersion = proto-3.02-6-May
GhcProjectVersionInt = 302
GhcProjectPatchLevel = 0
#
GhcLibsWithSockets=YES
+# Strip local symbols from libraries? This can make the libraries smaller,
+# but makes debugging somewhat more difficult. Doesn't work with all ld's.
+#
+StripLibraries=NO
+
# what to include in a binary distribution
GhcMainDir = ghc
endif # $(filter...
endif
+#
+# Remove local symbols from library objects if requested.
+#
+
+ifneq "$(StripLibraries)" ""
+ifneq "$(filter -split-objs,$(HC_OPTS))" ""
+SRC_HC_POST_OPTS += \
+ for i in $(basename $@)/*; do \
+ ld -r -x -o $$i.tmp $$i; \
+ $(MV) $$i.tmp $$i; \
+ done
+else
+SRC_HC_POST_OPTS += \
+ ld -r -x -o $@.tmp; $(MV) $@.tmp $@
+endif
+endif
+
$(LIBRARY) :: $(LIBOBJS)
$(BUILD_LIB)
endif