git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Stephan Beyer <s-beyer@gmx.net>
To: "Shawn O. Pearce" <spearce@spearce.org>
Cc: Dmitry Potapov <dpotapov@gmail.com>,
	Junio C Hamano <gitster@pobox.com>,
	git@vger.kernel.org, Stephan Beyer <s-beyer@gmx.net>
Subject: [PATCH] Link git-shell only to a subset of libgit.a
Date: Fri, 18 Jul 2008 03:04:30 +0200	[thread overview]
Message-ID: <1216343070-20237-1-git-send-email-s-beyer@gmx.net> (raw)
In-Reply-To: <20080718005814.GA4155@spearce.org>

Commit 5b8e6f85 introduced stubs for three functions that make no sense
for git-shell. But those stubs defined libgit.a functions a second time
so that a linker can complain.

Now git-shell is only linked to a subset of libgit.a.

Signed-off-by: Stephan Beyer <s-beyer@gmx.net>
---
Hi Shawn,

does this compile on Solaris?


For Dmitry: this is even smaller, but not significant ;-)

Before:
  text    data     bss     dec     hex filename
 24798    1304    8232   34334    861e git-shell

After:
   text    data     bss     dec     hex filename
  24504    1264    8248   34016    84e0 git-shell

*hide&run*
Stephan.

 Makefile |    3 +++
 1 files changed, 3 insertions(+), 0 deletions(-)

diff --git a/Makefile b/Makefile
index 4bec4b3..a5626dc 100644
--- a/Makefile
+++ b/Makefile
@@ -1204,6 +1204,9 @@ git-http-push$X: revision.o http.o http-push.o $(GITLIBS)
 	$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
 		$(LIBS) $(CURL_LIBCURL) $(EXPAT_LIBEXPAT)
 
+git-shell$X: compat/strlcpy.o abspath.o ctype.o exec_cmd.o quote.o strbuf.o usage.o wrapper.o shell.o
+	$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^)
+
 $(LIB_OBJS) $(BUILTIN_OBJS): $(LIB_H)
 $(patsubst git-%$X,%.o,$(PROGRAMS)): $(LIB_H) $(wildcard */*.h)
 builtin-revert.o wt-status.o: wt-status.h
-- 
1.5.6.3.390.g7b30

  reply	other threads:[~2008-07-18  1:05 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2008-06-27 21:35 [PATCH] shrink git-shell by avoiding redundant dependencies Dmitry Potapov
2008-06-27 21:55 ` Junio C Hamano
2008-06-27 22:31   ` Dmitry Potapov
2008-06-27 22:34     ` Junio C Hamano
2008-07-18  0:26     ` Stephan Beyer
2008-07-18  0:58       ` Shawn O. Pearce
2008-07-18  1:04         ` Stephan Beyer [this message]
2008-07-18  1:06           ` [PATCH] Link git-shell only to a subset of libgit.a Shawn O. Pearce
2008-07-18  6:03           ` Dmitry Potapov
2008-07-18 10:55             ` Johannes Schindelin
2008-07-18  1:06         ` [PATCH] Remove function stubs in shell.c Stephan Beyer
2008-07-18  6:06           ` Dmitry Potapov
2008-07-18  5:59       ` [PATCH] shrink git-shell by avoiding redundant dependencies Dmitry Potapov
2008-06-28 14:51 ` Johannes Schindelin
2008-06-28 16:48   ` Dmitry Potapov
2008-06-28 17:31     ` Johannes Schindelin

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1216343070-20237-1-git-send-email-s-beyer@gmx.net \
    --to=s-beyer@gmx.net \
    --cc=dpotapov@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=spearce@spearce.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).