This is the mail archive of the cygwin mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [ANNOUNCEMENT] Updated: git-1.5.6-1


> A new release of git, 1.5.6-1, has been uploaded, leaving 1.5.5.1-1 as the
> previous version.

I'm a bit annoyed about the waste of space and the lack of a cyggit.dll
Now they use a static libgit.a and hardlink the exe's, which does not work
as expected for us.
Well, we could change the Makefile to use softlinks for the exe's.

Attached is my first attempt to use a dll.
Maybe anybody finds the one remaining error.
Some attribute causes the linker to refuse to build the dll and wants
to build an exe.
I could also fake a dummy main(), but this would be cheating.

Eric, should I post this to some git list also, or just when I found the error?

$ make V=1
rm -f git-dll.o && cc -DDLL -DGIT_VERSION='"1.5.6"' \
                -O2 -pipe   -DNO_D_TYPE_IN_DIRENT
-DNO_FAST_WORKING_DIRECTORY -DNO_IPV6 -DOLD_ICONV -DSHA1_HEADER='<open
ssl/sha.h>' -DNO_STRCASESTR -o git-dll.o -c git.c
rm -f cyggit.dll && cc -Wl,-shared -Wl,--enable-auto-import
-Wl,--export-all-symbols \
                -o cyggit.dll   git-dll.o alias.o alloc.o archive.o
archive-tar.o archive-zip.o attr.o base85.o blob.o b
ranch.o bundle.o cache-tree.o color.o combine-diff.o commit.o config.o
connect.o convert.o copy.o csum-file.o ctype.o da
te.o decorate.o diffcore-break.o diffcore-delta.o diffcore-order.o
diffcore-pickaxe.o diffcore-rename.o diff-delta.o dif
f-no-index.o diff-lib.o diff.o dir.o entry.o environment.o exec_cmd.o
fsck.o graph.o grep.o hash.o help.o ident.o interp
olate.o list-objects.o ll-merge.o lockfile.o log-tree.o mailmap.o
match-trees.o merge-file.o name-hash.o object.o pack-c
heck.o pack-revindex.o pack-write.o pager.o parse-options.o
patch-delta.o patch-ids.o path-list.o path.o pkt-line.o pret
ty.o progress.o quote.o reachable.o read-cache.o reflog-walk.o refs.o
remote.o revision.o run-command.o server-info.o se
tup.o sha1_file.o sha1-lookup.o sha1_name.o shallow.o sideband.o
strbuf.o symlinks.o tag.o trace.o transport.o tree-diff
.o tree.o tree-walk.o unpack-trees.o usage.o utf8.o walker.o
write_or_die.o ws.o wt-status.o xdiff-interface.o http.o ht
tp-walker.o compat/strcasestr.o builtin-fetch-pack.o builtin-send-pack.o \
                xdiff/lib.a -lcurl -lz -liconv -lcrypto -lcurl -lexpat
/usr/lib/gcc/i686-pc-cygwin/3.4.4/../../../libcygwin.a(libcmain.o):(.text+0xab):
undefined reference to `_WinMain@16'
collect2: ld returned 1 exit status
-- 
Reini Urban
http://phpwiki.org/ http://murbreak.at/
diff -urN -x CYGWIN-PATCHES -x 'aclocal.m4*' -x autom4te.cache -x config.cache -x config.log -x config.status -x config.h -x config.h.in -x ABOUT-NLS -x Makefile.in.in -x Makevars.template -x '*SlackBuild*' -x '*.egg-info' -x '*.class' -x '*.pyc' -x '*.mo' -x '*.gmo' -x '*.orig' -x '*.rej' -x '*.spec' -x '*.temp' -x '*~' -x '*.stackdump' -x COPYING -x INSTALL -x compile -x config-ml.in -x config.guess -x config.sub -x depcomp -x elisp-comp -x install-sh -x libtool.m4 -x ltoptions.m4 -x ltsugar.m4 -x ltversion.m4 -x 'lt~obsolete.m4' -x ltmain.sh -x mdate-sh -x missing -x mkinstalldirs -x py-compile -x symlink-tree -x texinfo.tex -x ylwrap -x config.rpath -x configure -x omf.make -x xmldocs.make -x gnome-doc-utils.make -x gnome-doc-utils.m4 -x intltool.m4 -x intltool-extract -x intltool-extract.in -x intltool-merge -x intltool-merge.in -x intltool-update -x intltool-update.in -x -x -x GIT-VERSION-FILE origsrc/git-1.5.6/Documentation/Makefile src/git-1.5.6/Documentation/Makefile
--- origsrc/git-1.5.6/Documentation/Makefile	2008-06-19 00:49:49.000000000 +0200
+++ src/git-1.5.6/Documentation/Makefile	2008-06-20 19:07:22.687500000 +0200
@@ -57,7 +57,7 @@
 -include ../config.mak
 
 ifdef ASCIIDOC8
-ASCIIDOC_EXTRA += -a asciidoc7compatible
+ASCIIDOC_EXTRA += -a asciidoc7compatible --unsafe
 endif
 ifdef DOCBOOK_XSL_172
 ASCIIDOC_EXTRA += -a docbook-xsl-172
@@ -163,7 +163,7 @@
 	mv $@+ $@
 
 user-manual.xml: user-manual.txt user-manual.conf
-	$(ASCIIDOC) -b docbook -d book $<
+	$(ASCIIDOC) $(ASCIIDOC_EXTRA) -b docbook -d book $<
 
 technical/api-index.txt: technical/api-index-skel.txt \
 	technical/api-index.sh $(patsubst %,%.txt,$(API_DOCS))
diff -urN -x CYGWIN-PATCHES -x 'aclocal.m4*' -x autom4te.cache -x config.cache -x config.log -x config.status -x config.h -x config.h.in -x ABOUT-NLS -x Makefile.in.in -x Makevars.template -x '*SlackBuild*' -x '*.egg-info' -x '*.class' -x '*.pyc' -x '*.mo' -x '*.gmo' -x '*.orig' -x '*.rej' -x '*.spec' -x '*.temp' -x '*~' -x '*.stackdump' -x COPYING -x INSTALL -x compile -x config-ml.in -x config.guess -x config.sub -x depcomp -x elisp-comp -x install-sh -x libtool.m4 -x ltoptions.m4 -x ltsugar.m4 -x ltversion.m4 -x 'lt~obsolete.m4' -x ltmain.sh -x mdate-sh -x missing -x mkinstalldirs -x py-compile -x symlink-tree -x texinfo.tex -x ylwrap -x config.rpath -x configure -x omf.make -x xmldocs.make -x gnome-doc-utils.make -x gnome-doc-utils.m4 -x intltool.m4 -x intltool-extract -x intltool-extract.in -x intltool-merge -x intltool-merge.in -x intltool-update -x intltool-update.in -x -x -x GIT-VERSION-FILE origsrc/git-1.5.6/Makefile src/git-1.5.6/Makefile
--- origsrc/git-1.5.6/Makefile	2008-06-19 00:49:49.000000000 +0200
+++ src/git-1.5.6/Makefile	2008-06-20 19:56:58.359375000 +0200
@@ -639,20 +639,18 @@
 endif
 ifeq ($(uname_O),Cygwin)
 	NO_D_TYPE_IN_DIRENT = YesPlease
-	NO_D_INO_IN_DIRENT = YesPlease
 	NO_STRCASESTR = YesPlease
 	NO_MEMMEM = YesPlease
-	NO_SYMLINK_HEAD = YesPlease
 	NEEDS_LIBICONV = YesPlease
 	NO_FAST_WORKING_DIRECTORY = UnfortunatelyYes
-	NO_TRUSTABLE_FILEMODE = UnfortunatelyYes
 	OLD_ICONV = UnfortunatelyYes
 	# There are conflicting reports about this.
 	# On some boxes NO_MMAP is needed, and not so elsewhere.
 	# Try commenting this out if you suspect MMAP is more efficient
-	NO_MMAP = YesPlease
+#	NO_MMAP = YesPlease
 	NO_IPV6 = YesPlease
 	X = .exe
+	LIB_FILE=cyggit.dll
 endif
 ifeq ($(uname_S),FreeBSD)
 	NEEDS_LIBICONV = YesPlease
@@ -1060,8 +1058,10 @@
 
 $(patsubst %.perl,%,$(SCRIPT_PERL)): perl/perl.mak
 
+all::perl/perl.mak
+
 perl/perl.mak: GIT-CFLAGS perl/Makefile perl/Makefile.PL
-	$(QUIET_SUBDIR0)perl $(QUIET_SUBDIR1) PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' $(@F)
+	$(QUIET_SUBDIR0)perl $(QUIET_SUBDIR1) PERL_PATH='$(PERL_PATH_SQ)' prefix='$(prefix_SQ)' INSTALLDIRS=vendor $(@F)
 
 $(patsubst %.perl,%,$(SCRIPT_PERL)): % : %.perl
 	$(QUIET_GEN)$(RM) $@ $@+ && \
@@ -1170,7 +1170,15 @@
 builtin-revert.o wt-status.o: wt-status.h
 
 $(LIB_FILE): $(LIB_OBJS)
+ifneq (,$(findstring .dll,$(LIB_FILE)))
+	$(QUIET_CC)$(RM) git-dll.o && $(CC) -DDLL -DGIT_VERSION='"$(GIT_VERSION)"' \
+		$(ALL_CFLAGS) -o git-dll.o -c git.c
+	$(QUIET_LINK)$(RM) $@ && $(CC) -Wl,-shared -Wl,--enable-auto-import -Wl,--export-all-symbols \
+		-o $@ $(ALL_LDFLAGS) git-dll.o $(LIB_OBJS) builtin-fetch-pack.o builtin-send-pack.o \
+		$(filter-out $(LIB_FILE),$(LIBS)) $(CURL_LIBCURL) $(EXPAT_LIBEXPAT)
+else
 	$(QUIET_AR)$(RM) $@ && $(AR) rcs $@ $(LIB_OBJS)
+endif
 
 XDIFF_OBJS=xdiff/xdiffi.o xdiff/xprepare.o xdiff/xutils.o xdiff/xemit.o \
 	xdiff/xmerge.o
diff -urN -x CYGWIN-PATCHES -x 'aclocal.m4*' -x autom4te.cache -x config.cache -x config.log -x config.status -x config.h -x config.h.in -x ABOUT-NLS -x Makefile.in.in -x Makevars.template -x '*SlackBuild*' -x '*.egg-info' -x '*.class' -x '*.pyc' -x '*.mo' -x '*.gmo' -x '*.orig' -x '*.rej' -x '*.spec' -x '*.temp' -x '*~' -x '*.stackdump' -x COPYING -x INSTALL -x compile -x config-ml.in -x config.guess -x config.sub -x depcomp -x elisp-comp -x install-sh -x libtool.m4 -x ltoptions.m4 -x ltsugar.m4 -x ltversion.m4 -x 'lt~obsolete.m4' -x ltmain.sh -x mdate-sh -x missing -x mkinstalldirs -x py-compile -x symlink-tree -x texinfo.tex -x ylwrap -x config.rpath -x configure -x omf.make -x xmldocs.make -x gnome-doc-utils.make -x gnome-doc-utils.m4 -x intltool.m4 -x intltool-extract -x intltool-extract.in -x intltool-merge -x intltool-merge.in -x intltool-update -x intltool-update.in -x -x -x GIT-VERSION-FILE origsrc/git-1.5.6/git.c src/git-1.5.6/git.c
--- origsrc/git-1.5.6/git.c	2008-06-19 00:49:49.000000000 +0200
+++ src/git-1.5.6/git.c	2008-06-20 19:48:23.031250000 +0200
@@ -384,6 +384,7 @@
 	}
 }
 
+#ifndef DLL
 int main(int argc, const char **argv)
 {
 	const char *cmd = argv[0] ? argv[0] : "git-help";
@@ -474,3 +475,4 @@
 
 	return 1;
 }
+#endif
--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Problem reports:       http://cygwin.com/problems.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]