From: simonm Date: Thu, 7 May 1998 12:19:32 +0000 (+0000) Subject: [project @ 1998-05-07 12:19:31 by simonm] X-Git-Tag: Approx_2487_patches~721 X-Git-Url: http://git.megacz.com/?a=commitdiff_plain;ds=sidebyside;h=c6bed6debe26cc4225ac0db0ff625dd55bc9f9e1;p=ghc-hetmet.git [project @ 1998-05-07 12:19:31 by simonm] - 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. --- diff --git a/mk/config.mk.in b/mk/config.mk.in index 14195e9..2a29821 100644 --- a/mk/config.mk.in +++ b/mk/config.mk.in @@ -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 diff --git a/mk/target.mk b/mk/target.mk index 3c46011..463e0bc 100644 --- a/mk/target.mk +++ b/mk/target.mk @@ -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