[x264-devel] Architecture detection method in configure script for CL(MSVC toolchain) is inappropriate.

장영훈 mieabby at gmail.com
Fri Aug 7 07:43:24 CEST 2015


This is ridiculous but here's the patch of it:

--- configure Fri Aug  7 14:41:32 2015
+++ configure.cl_fix Fri Aug  7 14:41:47 2015
@@ -532,8 +532,8 @@
         compiler=CL
         compiler_style=MS
         CFLAGS="$CFLAGS -nologo -DHAVE_STRING_H -I\$(SRCPATH)/extras"
-        `$CC 2>&1 | grep -q 'for x86'` && host_cpu=i486
-        `$CC 2>&1 | grep -q 'for x64'` && host_cpu=x86_64
+        `$CC 2>&1 | grep -q 'x86'` && host_cpu=i486
+        `$CC 2>&1 | grep -q 'x64'` && host_cpu=x86_64
         cpp_check '' '' '_MSC_VER > 1800 || (_MSC_VER == 1800 &&
_MSC_FULL_VER >= 180030324)' || die "Microsoft Visual Studio support
requires Visual Studio 2013 Update 2 or newer"
     fi
 else


On 7 August 2015 at 14:19, 장영훈 <mieabby at gmail.com> wrote:

> Hi
>
> I tried to compile x264 with MSVC toolchain. And the full line for
> configure is:
> CC=cl ./configure --disable-shared --enable-static --extra-cflags="-MD"
> (or for static runtime link)
> CC=cl ./configure --disable-shared --enable-static --extra-cflags="-MT"
>
> But in "configure" script line 535, It looks for "for x86" or "for x64"
> string to figure out what arch of CL is. However, in non-english
> environments, cl.exe does not express itself as such, it will only print
> either "x64" or "x86".
> Therefore, invoking "vcvarsall.bar amd64" in systems that are not in
> english prior to configure doesn't make it configure as x64, but x86.
>
> As for remedy, modifying the lines(535, 536) to just "x86" or "x64" will
> fix this and allows it to configure for x64. It works.
>
> Thanks.
> David
>
> ===
>
> Or to make sure, if i may insist, compiling a program like below one as
> for test would be more accurate:
>
>   #include <stdio.h>
>   int main(void)
>   {
>     printf("%u\n", sizeof(int*));
>     return 0;
>   }
>
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.videolan.org/pipermail/x264-devel/attachments/20150807/8786a81d/attachment-0001.html>


More information about the x264-devel mailing list