[project @ 1998-05-07 12:19:31 by simonm]
authorsimonm <unknown>
Thu, 7 May 1998 12:19:32 +0000 (12:19 +0000)
committersimonm <unknown>
Thu, 7 May 1998 12:19:32 +0000 (12:19 +0000)
- 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.

mk/config.mk.in
mk/target.mk

index 14195e9..2a29821 100644 (file)
@@ -148,7 +148,7 @@ ProjectPatchLevel = $($(Project)ProjectPatchLevel)
 
 GhcProjectName         = The Glorious Glasgow Haskell Compilation System
 GhcProjectNameShort    = ghc
-GhcProjectVersion      = 3.02
+GhcProjectVersion = proto-3.02-6-May
 GhcProjectVersionInt   = 302
 GhcProjectPatchLevel   = 0
 
@@ -275,6 +275,11 @@ ReadlineIncludePath=
 #
 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
index 3c46011..463e0bc 100644 (file)
@@ -324,6 +324,23 @@ endef
 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