shell: do not play duplicated definition games to shrink the executable
Playing with linker games to shrink git-shell did not go well with various other platforms and compilers. Signed-off-by: Junio C Hamano <gitster@pobox.com>
Junio C Hamano committed
Aug 19, 2008 at 18:05 UTC
6ffaecc7d8b2c3c188a2efa5977a6e6605d878d9
2 files changed
+1
-16
Makefile
+1
-8
@@ -333,7 +333,6 @@ endif
333
export PERL_PATH
334
335
LIB_FILE=libgit.a
336
-COMPAT_LIB = compat/lib.a
336
XDIFF_LIB=xdiff/lib.a
337
338
LIB_H += archive.h
@@ -1224,12 +1223,6 @@ git-http-push$X: revision.o http.o http-push.o $(GITLIBS)
1223
$(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) \
1224
$(LIBS) $(CURL_LIBCURL) $(EXPAT_LIBEXPAT)
1225
1227
-$(COMPAT_LIB): $(COMPAT_OBJS)
1228
- $(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $(COMPAT_OBJS)
1229
-
1230
-git-shell$X: abspath.o ctype.o exec_cmd.o quote.o strbuf.o usage.o wrapper.o shell.o $(COMPAT_LIB)
1231
- $(QUIET_LINK)$(CC) $(ALL_CFLAGS) -o $@ $(ALL_LDFLAGS) $(filter %.o,$^) $(COMPAT_LIB)
1232
-
1226
$(LIB_OBJS) $(BUILTIN_OBJS): $(LIB_H)
1227
$(patsubst git-%$X,%.o,$(PROGRAMS)): $(LIB_H) $(wildcard */*.h)
1228
builtin-revert.o wt-status.o: wt-status.h
@@ -1442,7 +1435,7 @@ distclean: clean
1435
1436
clean:
1437
$(RM) *.o mozilla-sha1/*.o arm/*.o ppc/*.o compat/*.o xdiff/*.o \
1445
- $(LIB_FILE) $(XDIFF_LIB) $(COMPAT_LIB)
1438
+ $(LIB_FILE) $(XDIFF_LIB)
1439
$(RM) $(ALL_PROGRAMS) $(BUILT_INS) git$X
1440
$(RM) $(TEST_PROGRAMS)
1441
$(RM) *.spec *.pyc *.pyo */*.pyc */*.pyo common-cmds.h TAGS tags cscope*
shell.c
-8
@@ -3,14 +3,6 @@
3
#include "exec_cmd.h"
4
#include "strbuf.h"
5
6
-/* Stubs for functions that make no sense for git-shell. These stubs
7
- * are provided here to avoid linking in external redundant modules.
8
- */
9
-void release_pack_memory(size_t need, int fd){}
10
-void trace_argv_printf(const char **argv, const char *fmt, ...){}
11
-void trace_printf(const char *fmt, ...){}
12
-
13
-
6
static int do_generic_cmd(const char *me, char *arg)
7
{
8
const char *my_argv[4];