[Zlib-devel] [Patch] support for building DLL for cygwin, mingw

Enrico Weigelt weigelt at metux.de
Tue Aug 3 18:02:46 EDT 2010


* Charles Wilson <cygwin at cwilson.fastmail.fm> schrieb:

Hi,

> These patches allow to build static and shared (DLL) versions of zlib
> for both cygwin and mingw using the "configure and make" paradigm rather
> than the win32/Makefile.gcc.

Great thing. would you perhaps like to add it as an own branch into 
my git repo ? (-> git://pubgit.metux.de/oss-qm/zlib.git/)

Perhaps you could help be creating a sysroot'ed cross-toolchain for
mingw32 (running on GNU/Linux), so I can ran build test by my 
Briegel builder tool ? ;-o

> The "create symbolic links for $SHAREDLIB and $SHAREDLIBM" step is moved
> to a variable set by configure, "SHAREDLIBPOST". Most targets define it as
>   '(rm -f $(SHAREDLIB) $(SHAREDLIBM); ln -s $@ $(SHAREDLIB) ; ln -s $@
> $(SHAREDLIBM) )'

I'd prefer if's instead of putting commands into variables ;-p

> The install and uninstall rules are modified to be sensitive to whether
> $SHAREDLIBV is empty. If so (and +shared), then the "DLL installation
> rules" are employed.  Otherwise, the original rules appropriate for ELF
> .so's are used. (There's a pre-existing bug in the uninstall rule
> related to ELF .so's; I didn't fix that).

IIRC we already have some outstanding patch in this area.
@mark: what's the status on that ?

> Finally, two new variables are added to compile and link rules:
> EXTRA_CFLAGS and EXTRA_LDFLAGS. These are used so that the user can pass
> additional values without clobbering the ones computed by configure.

Why not simply passing them via common CFLAGS/LDFLAGS variables on
./configure call ?

> [*] DESTDIR is fundamentally broken (this is not a zlib specific
> problem) on mingw; when prefix is X:/bar, you can't prepend DESTDIR=/foo
> because that gives /fooX:/bar, which is just so wrong...

I'm not sure whether drive letters should be used at all.
 
> The reason EXTRA_* flags are used for mingw, instead of hardcoding them
> in configure, is because these options change the library's ABI, and
> this is the way the mingw and cygwin projects will be building them.

Maybe it would make sense to add own ./configure options for this ?


cu
-- 
----------------------------------------------------------------------
 Enrico Weigelt, metux IT service -- http://www.metux.de/

 phone:  +49 36207 519931  email: weigelt at metux.de
 mobile: +49 151 27565287  icq:   210169427         skype: nekrad666
----------------------------------------------------------------------
 Embedded-Linux / Portierung / Opensource-QM / Verteilte Systeme
----------------------------------------------------------------------




More information about the Zlib-devel mailing list