Hendrik Leppkes <h.lepp...@gmail.com> writes:

> On Sat, Oct 13, 2012 at 12:55 PM, Måns Rullgård <m...@mansr.com> wrote:
>> Martin Storsjö <mar...@martin.st> writes:
>>
>>> diff --git a/configure b/configure
>>> index 99830d8..5480ce0 100755
>>> --- a/configure
>>> +++ b/configure
>>> @@ -2778,14 +2778,33 @@ case $target_os in
>>>          shlibdir_default="$bindir_default"
>>>          SLIBPREF=""
>>>          SLIBSUF=".dll"
>>> +        if enabled_all msvc shared; then
>>> +            # Link to the import library instead of the
>>> +            # normal static library.
>>> +            LD_LIB='%.lib'
>>> +        fi
>>>          
>>> SLIBNAME_WITH_VERSION='$(SLIBPREF)$(FULLNAME)-$(LIBVERSION)$(SLIBSUF)'
>>>          SLIBNAME_WITH_MAJOR='$(SLIBPREF)$(FULLNAME)-$(LIBMAJOR)$(SLIBSUF)'
>>> -        SLIB_EXTRA_CMD=-'$(DLLTOOL) -m $(LIBTARGET) -d 
>>> $$(@:$(SLIBSUF)=.def) -l $(SUBDIR)$(SLIBNAME:$(SLIBSUF)=.lib) -D 
>>> $(SLIBNAME_WITH_MAJOR)'
>>> +        if enabled msvc; then
>>> +            # The libtarget names for lib.exe differ from the ones for 
>>> dlltool
>>> +            if enabled x86_64; then
>>> +                LIBTARGET=x64
>>> +            fi
>>> +            SLIB_CREATE_DEF_CMD='makedef $(SUBDIR)lib$(NAME).ver $(OBJS) > 
>>> $$(@:$(SLIBSUF)=.def)'
>>> +            SLIB_EXTRA_CMD='-lib.exe -machine:$(LIBTARGET) 
>>> -def:$$(@:$(SLIBSUF)=.def) -out:$(SUBDIR)$(SLIBNAME:$(SLIBSUF)=.lib)'
>>> +        else
>>> +            SLIB_EXTRA_CMD=-'$(DLLTOOL) -m $(LIBTARGET) -d 
>>> $$(@:$(SLIBSUF)=.def) -l $(SUBDIR)$(SLIBNAME:$(SLIBSUF)=.lib) -D 
>>> $(SLIBNAME_WITH_MAJOR)'
>>> +        fi
>>>          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)=.def) 
>>> -Wl,--out-implib,$(SUBDIR)lib$(SLIBNAME:$(SLIBSUF)=.dll.a) 
>>> -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-auto-image-base'
>>> +        if enabled msvc; then
>>> +            SLIB_INSTALL_EXTRA_LIB='$(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.def)'
>>> +            SHFLAGS='-dll -def:$$(@:$(SLIBSUF)=.def) 
>>> -implib:$(SUBDIR)lib$(SLIBNAME:$(SLIBSUF)=.dll.a)'
>>> +        else
>>> +            SLIB_INSTALL_EXTRA_LIB='lib$(SLIBNAME:$(SLIBSUF)=.dll.a) 
>>> $(SLIBNAME_WITH_MAJOR:$(SLIBSUF)=.def)'
>>> +            SHFLAGS='-shared -Wl,--output-def,$$(@:$(SLIBSUF)=.def) 
>>> -Wl,--out-implib,$(SUBDIR)lib$(SLIBNAME:$(SLIBSUF)=.dll.a) 
>>> -Wl,--enable-runtime-pseudo-reloc -Wl,--enable-auto-image-base'
>>> +        fi
>>>          objformat="win32"
>>>          dlltool="${cross_prefix}dlltool"
>>>          ranlib=:
>>
>> This is insane.  MSVC should not be using mingw32 as target-os.
>>
>
> I agree that it would be great to seperate this, however
> auto-detection uses uname, which sadly reports mingw32.
> Another rule to auto-detect it properly? Require specifying
> --target-os for such builds?

We could make --toolchain=msvc change the default.  I imagine most
people building it will be using that option.

-- 
Måns Rullgård
m...@mansr.com
_______________________________________________
libav-devel mailing list
libav-devel@libav.org
https://lists.libav.org/mailman/listinfo/libav-devel

Reply via email to