diff mbox

[FFmpeg-devel] configure: use subarch instead of arch to create .def files on mingw

Message ID 20171116020939.7600-1-jamrial@gmail.com
State New
Headers show

Commit Message

James Almer Nov. 16, 2017, 2:09 a.m. UTC
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(-)

Comments

James Almer Nov. 16, 2017, 4:56 p.m. UTC | #1
On 11/15/2017 11:09 PM, James Almer wrote:
> 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(-)

Patch dropped, a better solution was merged.
diff mbox

Patch

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