# HG changeset patch # User Jan Vrany # Date 1511974006 0 # Node ID 3262e8cf1146e77ded441c3350c4ddb97ecde123 # Parent 3808e177d59d0024de686aa06f50a1206e09e5f8 Makefiles: separate debug information to a separate `.debug` files ...in order to make binaries (`*.so`, `*.dll`) smaller. This also makes the "toy" Smalltalk/X jv-branch archive smaller. diff -r 3808e177d59d -r 3262e8cf1146 makelib/config.make --- a/makelib/config.make Sun Nov 26 09:18:54 2017 +0000 +++ b/makelib/config.make Wed Nov 29 16:46:46 2017 +0000 @@ -115,7 +115,9 @@ # misc STRIP=strip +OBJCOPY=objcopy DIRNAME=dirname +CHMOD=chmod # # all BSD-based expr-implementations are missing the substring function # diff -r 3808e177d59d -r 3262e8cf1146 makelib/definitions-w.make --- a/makelib/definitions-w.make Sun Nov 26 09:18:54 2017 +0000 +++ b/makelib/definitions-w.make Wed Nov 29 16:46:46 2017 +0000 @@ -330,6 +330,8 @@ RFLAGS= RES=$(O) APP_LINKER=$(CC) +STRIP=$(MINGWBINDIR)\strip.exe +OBJCOPY=$(MINGWBINDIR)\objcopy.exe ! if defined(USEMINGW32) USE_ARG=-DUSEMINGW32=1 diff -r 3808e177d59d -r 3262e8cf1146 makelib/rules-w.make --- a/makelib/rules-w.make Sun Nov 26 09:18:54 2017 +0000 +++ b/makelib/rules-w.make Wed Nov 29 16:46:46 2017 +0000 @@ -357,7 +357,9 @@ $(LIBINIT_FILE) $(IOBJS) $(OBJS) $ \ $(ALLLIB) $(X11_LIBS) -o $(OUTDIR_SLASH)$(LIBNAME).dll - + $(OBJCOPY) --only-keep-debug $(OUTDIR)$(LIBNAME).dll $(OUTDIR)$(LIBNAME).dll.debug + $(STRIP) --strip-debug --strip-unneeded $(OUTDIR)$(LIBNAME).dll + $(OBJCOPY) --add-gnu-debuglink="$(OUTDIR)$(LIBNAME).dll.debug" $(OUTDIR)$(LIBNAME).dll $(MAKE) -f bc.mak registerClassLib cLibRule: diff -r 3808e177d59d -r 3262e8cf1146 makelib/rules.make --- a/makelib/rules.make Sun Nov 26 09:18:54 2017 +0000 +++ b/makelib/rules.make Wed Nov 29 16:46:46 2017 +0000 @@ -253,7 +253,7 @@ # # unconditionally makes a new makefile -# obsolete. +# o$lete. # makeMakefile: @echo "making $(MAKEFILE) for $(CONF) $(CONF_PACKS) ..." @@ -1090,6 +1090,10 @@ $(LIBNAME).$(SO): $(LIBNAME)$(OBJNAME) @echo "linking class library ..." $(LD) -shared $(LDFLAGS) -o $@ $< $(LOCAL_SHARED_LIBS) $(EXTRA_SHARED_LIBS) + $(OBJCOPY) --only-keep-debug $@ $@.debug + $(CHMOD) ugo-x $@.debug + $(STRIP) --strip-debug --strip-unneeded $@ + $(OBJCOPY) --add-gnu-debuglink="$@.debug" $@ newobj_staticLink:: @echo "linking static classLib object ..."