diff options
author | Martin Storsjö <martin@martin.st> | 2017-08-24 23:27:16 +0300 |
---|---|---|
committer | Martin Storsjö <martin@martin.st> | 2017-08-31 14:22:22 +0300 |
commit | accb06120c13a4ead442464d96f2fa318fa07a4e (patch) | |
tree | a41a72a64f40d90d8ca67b21fdb2aadeace0eea7 /configure | |
parent | 1a7bf48eed806beea7e835b31b06aa6bc94da5da (diff) | |
download | ffmpeg-accb06120c13a4ead442464d96f2fa318fa07a4e.tar.gz |
configure: Use dllexport/dllimport for data symbols across DLLs with mingw
This avoids having to use pseudo relocations.
The version script used for exporting functions is skipped as soon
as the set of object files contains symbols marked with dllexport,
therefore we need to use makedef to produce the full list of symbols
to be exported.
Signed-off-by: Martin Storsjö <martin@martin.st>
Diffstat (limited to 'configure')
-rwxr-xr-x | configure | 11 |
1 files changed, 9 insertions, 2 deletions
@@ -4026,6 +4026,10 @@ case $target_os in if enabled x86_64; then LIBTARGET="i386:x86-64" fi + if enabled shared; then + # Cannot build both shared and static libs when using dllexport. + disable static + fi check_ldflags -Wl,--nxcompat check_ldflags -Wl,--dynamicbase shlibdir_default="$bindir_default" @@ -4033,12 +4037,13 @@ case $target_os in SLIBSUF=".dll" SLIBNAME_WITH_VERSION='$(SLIBPREF)$(NAME)-$(LIBVERSION)$(SLIBSUF)' SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(NAME)-$(LIBMAJOR)$(SLIBSUF)' - SLIB_EXTRA_CMD=-'sed -e "s/ @[^ ]*//" $$(@:$(SLIBSUF)=.orig.def) > $$(@:$(SLIBSUF)=.def); $(DLLTOOL) -m $(LIBTARGET) -d $$(@:$(SLIBSUF)=.def) -l $(SUBDIR)$(SLIBNAME:$(SLIBSUF)=.lib) -D $(SLIBNAME_WITH_MAJOR)' + 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)' SLIB_INSTALL_EXTRA_LIB='lib$(SLIBNAME:$(SLIBSUF)=.dll.a) $(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.def)' - SHFLAGS='-shared -Wl,--output-def,$$(@:$(SLIBSUF)=.orig.def) -Wl,--out-implib,$(SUBDIR)lib$(SLIBNAME:$(SLIBSUF)=.dll.a) -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-auto-image-base' + SLIB_CREATE_DEF_CMD='ARCH="$(ARCH)" 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=: @@ -5432,6 +5437,8 @@ DEPX86ASMFLAGS=\$(X86ASMFLAGS) AR=$ar ARFLAGS=$arflags AR_O=$ar_o +AR_CMD=$ar +NM_CMD=$nm RANLIB=$ranlib STRIP=$strip LN_S=$ln_s |