[FFmpeg-devel] [PATCH] configure: use subarch instead of arch to create .def files on mingw
James Almer
jamrial at gmail.com
Thu Nov 16 04:09:39 EET 2017
arch is "x86" regardless of target being x86_32 or x86_64, and if
configuring with asm disabled it's "c" instead.
Using subarch (Always either "x86_32" or "x86_64") and adapting
makedef makes sure the symbols are always detected correctly on
x86_32.
---
compat/windows/makedef | 2 +-
configure | 3 ++-
2 files changed, 3 insertions(+), 2 deletions(-)
diff --git a/compat/windows/makedef b/compat/windows/makedef
index 0cd169c15c..9e88611cc8 100755
--- a/compat/windows/makedef
+++ b/compat/windows/makedef
@@ -63,7 +63,7 @@ IFS='
prefix=""
if [ -n "$NM" ]; then
case $ARCH in
- *86)
+ x86_32)
prefix="_"
;;
*)
diff --git a/configure b/configure
index 934ac3abfd..4e7d7a8545 100755
--- a/configure
+++ b/configure
@@ -4971,7 +4971,7 @@ case $target_os in
SLIB_INSTALL_LINKS=
SLIB_INSTALL_EXTRA_SHLIB='$(SLIBNAME:$(SLIBSUF)=.lib)'
SLIB_INSTALL_EXTRA_LIB='lib$(SLIBNAME:$(SLIBSUF)=.dll.a) $(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.def)'
- SLIB_CREATE_DEF_CMD='ARCH="$(ARCH)" AR="$(AR_CMD)" NM="$(NM_CMD)" $(SRC_PATH)/compat/windows/makedef $(SUBDIR)lib$(NAME).ver $(OBJS) > $$(@:$(SLIBSUF)=.def)'
+ SLIB_CREATE_DEF_CMD='ARCH="$(SUBARCH)" 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"
ranlib=:
@@ -6779,6 +6779,7 @@ SRC_PATH:=\$(SRC_PATH:.%=..%)
endif
CC_IDENT=$cc_ident
ARCH=$arch
+SUBARCH=$subarch
INTRINSICS=$intrinsics
CC=$cc
CXX=$cxx
--
2.14.2
More information about the ffmpeg-devel
mailing list