[2/2] Use dlltools instead of lib.exe

Message ID 1300286165-3001-3-git-send-email-lu_zero@gentoo.org
State Superseded
Headers show

Commit Message

Luca Barbato March 16, 2011, 2:36 p.m.
This way building ffmpeg on mingw won't require windows specific tools
---
 configure |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

Comments

Mans Rullgard March 16, 2011, 2:50 p.m. | #1
Luca Barbato <lu_zero@gentoo.org> writes:

> This way building ffmpeg on mingw won't require windows specific tools
> ---
>  configure |    2 +-
>  1 files changed, 1 insertions(+), 1 deletions(-)
>
> diff --git a/configure b/configure
> index 4d308d2..040c45d 100755
> --- a/configure
> +++ b/configure
> @@ -2417,7 +2417,7 @@ case $target_os in
>          SLIBSUF=".dll"
>          SLIBNAME_WITH_VERSION='$(SLIBPREF)$(FULLNAME)-$(LIBVERSION)$(SLIBSUF)'
>          SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(FULLNAME)-$(LIBMAJOR)$(SLIBSUF)'
> -        SLIB_EXTRA_CMD='-lib.exe /machine:$(LIBTARGET) /def:$$(@:$(SLIBSUF)=.def) /out:$(SUBDIR)$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib)'
> +        SLIB_EXTRA_CMD='-${cross_prefix}dlltool -m $(LIBTARGET) -d $$(@:$(SLIBSUF)=.def) -l $(SUBDIR)$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib)'

This won't work the way you think.  ${cross_prefix} isn't expanded
inside those single quotes and it's not set in the makefile.  We should
probably set a DLLTOOL variable in the makefile and use that here.  That
would make overriding it easy as well.
Luca Barbato March 16, 2011, 2:54 p.m. | #2
On 03/16/2011 03:50 PM, Måns Rullgård wrote:

> This won't work the way you think.  ${cross_prefix} isn't expanded
> inside those single quotes and it's not set in the makefile.  We should
> probably set a DLLTOOL variable in the makefile and use that here.  That
> would make overriding it easy as well.

Thanks for pointing it out. Your idea seems good and in line with CC
and friends.

lu

Patch

diff --git a/configure b/configure
index 4d308d2..040c45d 100755
--- a/configure
+++ b/configure
@@ -2417,7 +2417,7 @@  case $target_os in
         SLIBSUF=".dll"
         SLIBNAME_WITH_VERSION='$(SLIBPREF)$(FULLNAME)-$(LIBVERSION)$(SLIBSUF)'
         SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(FULLNAME)-$(LIBMAJOR)$(SLIBSUF)'
-        SLIB_EXTRA_CMD='-lib.exe /machine:$(LIBTARGET) /def:$$(@:$(SLIBSUF)=.def) /out:$(SUBDIR)$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib)'
+        SLIB_EXTRA_CMD='-${cross_prefix}dlltool -m $(LIBTARGET) -d $$(@:$(SLIBSUF)=.def) -l $(SUBDIR)$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib)'
         SLIB_INSTALL_EXTRA_CMD='-install -m 644 $(SUBDIR)$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib) "$(SHLIBDIR)/$(SLIBNAME:$(SLIBSUF)=.lib)"; \
             install -m 644 $(SUBDIR)$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib) "$(SHLIBDIR)/$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.lib)"; \
             install -d "$(LIBDIR)"; \