mirror of https://git.ffmpeg.org/ffmpeg.git
Merge commit 'accb06120c13a4ead442464d96f2fa318fa07a4e'
* commit 'accb06120c13a4ead442464d96f2fa318fa07a4e': configure: Use dllexport/dllimport for data symbols across DLLs with mingw Merged-by: James Almer <jamrial@gmail.com>
This commit is contained in:
commit
98a9b1f0de
|
@ -5038,6 +5038,10 @@ case $target_os in
|
||||||
if enabled x86_64; then
|
if enabled x86_64; then
|
||||||
LIBTARGET="i386:x86-64"
|
LIBTARGET="i386:x86-64"
|
||||||
fi
|
fi
|
||||||
|
if enabled shared; then
|
||||||
|
# Cannot build both shared and static libs when using dllexport.
|
||||||
|
disable static
|
||||||
|
fi
|
||||||
enabled shared && ! enabled small && check_cmd $windres --version && enable gnu_windres
|
enabled shared && ! enabled small && check_cmd $windres --version && enable gnu_windres
|
||||||
enabled x86_32 && check_ldflags -Wl,--large-address-aware
|
enabled x86_32 && check_ldflags -Wl,--large-address-aware
|
||||||
shlibdir_default="$bindir_default"
|
shlibdir_default="$bindir_default"
|
||||||
|
@ -5045,21 +5049,15 @@ case $target_os in
|
||||||
SLIBSUF=".dll"
|
SLIBSUF=".dll"
|
||||||
SLIBNAME_WITH_VERSION='$(SLIBPREF)$(FULLNAME)-$(LIBVERSION)$(SLIBSUF)'
|
SLIBNAME_WITH_VERSION='$(SLIBPREF)$(FULLNAME)-$(LIBVERSION)$(SLIBSUF)'
|
||||||
SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(FULLNAME)-$(LIBMAJOR)$(SLIBSUF)'
|
SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(FULLNAME)-$(LIBMAJOR)$(SLIBSUF)'
|
||||||
dlltool="${cross_prefix}dlltool"
|
SLIB_EXTRA_CMD=-'$(DLLTOOL) -m $(LIBTARGET) -d $$(@:$(SLIBSUF)=.def) -l $(SUBDIR)$(SLIBNAME:$(SLIBSUF)=.lib) -D $(SLIBNAME_WITH_MAJOR)'
|
||||||
if check_cmd lib.exe -list; then
|
|
||||||
SLIB_EXTRA_CMD=-'sed -e "s/ @[^ ]*//" $$(@:$(SLIBSUF)=.orig.def) > $$(@:$(SLIBSUF)=.def); lib.exe -nologo -machine:$(LIBTARGET) -def:$$(@:$(SLIBSUF)=.def) -out:$(SUBDIR)$(SLIBNAME:$(SLIBSUF)=.lib)'
|
|
||||||
if enabled x86_64; then
|
|
||||||
LIBTARGET=x64
|
|
||||||
fi
|
|
||||||
elif check_cmd $dlltool --version; then
|
|
||||||
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)'
|
|
||||||
fi
|
|
||||||
SLIB_INSTALL_NAME='$(SLIBNAME_WITH_MAJOR)'
|
SLIB_INSTALL_NAME='$(SLIBNAME_WITH_MAJOR)'
|
||||||
SLIB_INSTALL_LINKS=
|
SLIB_INSTALL_LINKS=
|
||||||
SLIB_INSTALL_EXTRA_SHLIB='$(SLIBNAME:$(SLIBSUF)=.lib)'
|
SLIB_INSTALL_EXTRA_SHLIB='$(SLIBNAME:$(SLIBSUF)=.lib)'
|
||||||
SLIB_INSTALL_EXTRA_LIB='lib$(SLIBNAME:$(SLIBSUF)=.dll.a) $(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.def)'
|
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,--disable-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,--disable-auto-image-base $$(@:$(SLIBSUF)=.def)'
|
||||||
enabled x86_64 && objformat="win64" || objformat="win32"
|
enabled x86_64 && objformat="win64" || objformat="win32"
|
||||||
|
dlltool="${cross_prefix}dlltool"
|
||||||
ranlib=:
|
ranlib=:
|
||||||
enable dos_paths
|
enable dos_paths
|
||||||
check_ldflags -Wl,--nxcompat,--dynamicbase
|
check_ldflags -Wl,--nxcompat,--dynamicbase
|
||||||
|
@ -6931,6 +6929,8 @@ DEPX86ASMFLAGS=\$(X86ASMFLAGS)
|
||||||
AR=$ar
|
AR=$ar
|
||||||
ARFLAGS=$arflags
|
ARFLAGS=$arflags
|
||||||
AR_O=$ar_o
|
AR_O=$ar_o
|
||||||
|
AR_CMD=$ar
|
||||||
|
NM_CMD=$nm
|
||||||
RANLIB=$ranlib
|
RANLIB=$ranlib
|
||||||
STRIP=$strip
|
STRIP=$strip
|
||||||
STRIPTYPE=$striptype
|
STRIPTYPE=$striptype
|
||||||
|
|
|
@ -414,7 +414,7 @@ int ff_alloc_a53_sei(const AVFrame *frame, size_t prefix_len,
|
||||||
*/
|
*/
|
||||||
int64_t ff_guess_coded_bitrate(AVCodecContext *avctx);
|
int64_t ff_guess_coded_bitrate(AVCodecContext *avctx);
|
||||||
|
|
||||||
#if defined(_MSC_VER) && CONFIG_SHARED
|
#if defined(_WIN32) && CONFIG_SHARED
|
||||||
#ifdef BUILDING_avcodec
|
#ifdef BUILDING_avcodec
|
||||||
# define av_export_avcodec __declspec(dllexport)
|
# define av_export_avcodec __declspec(dllexport)
|
||||||
#else
|
#else
|
||||||
|
|
|
@ -63,7 +63,7 @@
|
||||||
#endif
|
#endif
|
||||||
#endif
|
#endif
|
||||||
|
|
||||||
#if defined(_MSC_VER) && CONFIG_SHARED
|
#if defined(_WIN32) && CONFIG_SHARED
|
||||||
#ifdef BUILDING_avutil
|
#ifdef BUILDING_avutil
|
||||||
# define av_export_avutil __declspec(dllexport)
|
# define av_export_avutil __declspec(dllexport)
|
||||||
#else
|
#else
|
||||||
|
|
Loading…
Reference in New Issue