diff options
author | Martin Storsjö <martin@martin.st> | 2018-02-17 00:08:45 +0200 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2018-02-19 12:36:09 +0200 |
commit | 97eee953e639bd4d17a9f9398293775277d00505 (patch) | |
tree | 8505ed38defd21f8b1c6a65695a233cead226245 /configure | |
parent | a674b31240e99a369059385b03582b35629d190f (diff) | |
download | ffmpeg-97eee953e639bd4d17a9f9398293775277d00505.tar.gz |
Revert "configure: Stop using dlltool to create an import library"
This reverts commit 67c72f08a4707c18a67a4734660e3a23cc9488b6.
While the linker produced import libraries might work with MSVC in
simple test cases, they don't if e.g. linking to multiple GNU ld
produced import libraries at the same time. (They end up importing
functions from the wrong libraries.) The ones produced by dlltool
work fine though.
This issue was pointed out by Hendrik Leppkes.
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 9 |
1 files changed, 8 insertions, 1 deletions
@@ -3891,6 +3891,10 @@ case $target_os in ;; mingw32*|mingw64*) target_os=mingw32 + LIBTARGET=i386 + if enabled x86_64; then + LIBTARGET="i386:x86-64" + fi if enabled shared; then # Cannot build both shared and static libs when using dllimport. disable static @@ -3902,7 +3906,7 @@ case $target_os in SLIBSUF=".dll" SLIBNAME_WITH_VERSION='$(SLIBPREF)$(NAME)-$(LIBVERSION)$(SLIBSUF)' SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(NAME)-$(LIBMAJOR)$(SLIBSUF)' - SLIB_EXTRA_CMD='cp $(SUBDIR)lib$(SLIBNAME:$(SLIBSUF)=.dll.a) $(SUBDIR)$(SLIBNAME:$(SLIBSUF)=.lib)' + SLIB_EXTRA_CMD=-'$(DLLTOOL) -m $(LIBTARGET) -d $$(@:$(SLIBSUF)=.def) -l $(SUBDIR)$(SLIBNAME:$(SLIBSUF)=.lib) -D $(SLIBNAME_WITH_MAJOR)' SLIB_INSTALL_NAME='$(SLIBNAME_WITH_MAJOR)' SLIB_INSTALL_LINKS= SLIB_INSTALL_EXTRA_SHLIB='$(SLIBNAME:$(SLIBSUF)=.lib)' @@ -3910,6 +3914,7 @@ case $target_os in SLIB_CREATE_DEF_CMD='EXTERN_PREFIX="$(EXTERN_PREFIX)" AR="$(AR_CMD)" NM="$(NM_CMD)" $(SRC_PATH)/compat/windows/makedef $(SUBDIR)lib$(NAME).ver $(OBJS) > $$(@:$(SLIBSUF)=.def)' SHFLAGS='-shared -Wl,--out-implib,$(SUBDIR)lib$(SLIBNAME:$(SLIBSUF)=.dll.a) -Wl,--enable-auto-image-base $$(@:$(SLIBSUF)=.def)' enabled x86_64 && objformat="win64" || objformat="win32" + dlltool="${cross_prefix}dlltool" ranlib=: enable dos_paths ;; @@ -5248,6 +5253,7 @@ X86ASM_O=$X86ASM_O LD_O=$LD_O LD_LIB=$LD_LIB LD_PATH=$LD_PATH +DLLTOOL=$dlltool LDFLAGS=$LDFLAGS LDEXEFLAGS=$LDEXEFLAGS LDSOFLAGS=$LDSOFLAGS @@ -5294,6 +5300,7 @@ LIB_INSTALL_EXTRA_CMD=$LIB_INSTALL_EXTRA_CMD EXTRALIBS=$extralibs COMPAT_OBJS=$compat_objs INSTALL=install +LIBTARGET=${LIBTARGET} SLIBNAME=${SLIBNAME} SLIBNAME_WITH_VERSION=${SLIBNAME_WITH_VERSION} SLIBNAME_WITH_MAJOR=${SLIBNAME_WITH_MAJOR} |