* [PATCH] building libffi on mswin64 with msvcc.sh @ 2010-03-21 7:46 wanabe 2010-03-21 13:30 ` NightStrike 0 siblings, 1 reply; 5+ messages in thread From: wanabe @ 2010-03-21 7:46 UTC (permalink / raw) To: libffi-discuss Hello, libffi-discuss. I tried to build libffi on mswin64. To do it, I had to rewrite part of msvcc.sh to avoid some warnings. The patch is below. And in configure phase, it needed --build=x86_64-pc-mingw32 and CC="path/to/msvcc.sh -m64". If README notes it, it get more easily comprehensible, I guess. Your attention to this would be greatly appreciated. Sincerely. diff --git a/msvcc.sh b/msvcc.sh index 8301839..f6ae503 100755 --- a/msvcc.sh +++ b/msvcc.sh @@ -44,7 +44,7 @@ # Disable specific warnings, and enable warnings-as-errors so we catch any # mistranslated args. -nowarn="-wd4127 -wd4820 -wd4706 -wd4100 -wd4255 -wd4668 -wd4053 -wd4324" +nowarn="-wd4127 -wd4820 -wd4706 -wd4100 -wd4255 -wd4668 -wd4053 -wd4324 -wd4267 -wd4305 -wd4054" args="-nologo -W3 -WX $nowarn" md=-MD cl="cl" -- wanabe ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] building libffi on mswin64 with msvcc.sh 2010-03-21 7:46 [PATCH] building libffi on mswin64 with msvcc.sh wanabe @ 2010-03-21 13:30 ` NightStrike 0 siblings, 0 replies; 5+ messages in thread From: NightStrike @ 2010-03-21 13:30 UTC (permalink / raw) To: wanabe; +Cc: libffi-discuss On Sun, Mar 21, 2010 at 3:45 AM, wanabe <s.wanabe@gmail.com> wrote: > Hello, libffi-discuss. > > I tried to build libffi on mswin64. > To do it, I had to rewrite part of msvcc.sh to avoid some warnings. > The patch is below. > > And in configure phase, it needed --build=x86_64-pc-mingw32 and > CC="path/to/msvcc.sh -m64". > If README notes it, it get more easily comprehensible, I guess. Just to note, you should be able to use the compilers at http://mingw-w64.sf.net/ without issue for compiling for win64. You might want to try that, unless you really need msvc for some reason. ^ permalink raw reply [flat|nested] 5+ messages in thread
[parent not found: <1375527405.35594.1269561471057.JavaMail.root@cm-mail03.mozilla.org>]
* Re: [PATCH] building libffi on mswin64 with msvcc.sh [not found] <1375527405.35594.1269561471057.JavaMail.root@cm-mail03.mozilla.org> @ 2010-03-25 23:58 ` Dan Witte 2010-03-30 12:32 ` Anthony Green 0 siblings, 1 reply; 5+ messages in thread From: Dan Witte @ 2010-03-25 23:58 UTC (permalink / raw) To: Anthony Green, libffi-discuss [-- Attachment #1: Type: text/plain, Size: 1258 bytes --] Here's a patch that adds a few gotchas to the README, and just disables -WX, since it's a pain for everyone. (It'd be nice if we could tell 'cl' to error on warning D4002, "unrecognized option", but I think you can only do that for compiler warnings, not commandline warnings.) Anthony, can you look over and apply? Thanks, Dan. ----- "wanabe" <s.wanabe@gmail.com> wrote: > Hello, libffi-discuss. > > I tried to build libffi on mswin64. > To do it, I had to rewrite part of msvcc.sh to avoid some warnings. > The patch is below. > > And in configure phase, it needed --build=x86_64-pc-mingw32 and > CC="path/to/msvcc.sh -m64". > If README notes it, it get more easily comprehensible, I guess. > > Your attention to this would be greatly appreciated. > Sincerely. > > > diff --git a/msvcc.sh b/msvcc.sh > index 8301839..f6ae503 100755 > --- a/msvcc.sh > +++ b/msvcc.sh > @@ -44,7 +44,7 @@ > > # Disable specific warnings, and enable warnings-as-errors so we > catch any > # mistranslated args. > -nowarn="-wd4127 -wd4820 -wd4706 -wd4100 -wd4255 -wd4668 -wd4053 > -wd4324" > +nowarn="-wd4127 -wd4820 -wd4706 -wd4100 -wd4255 -wd4668 -wd4053 > -wd4324 -wd4267 -wd4305 -wd4054" > args="-nologo -W3 -WX $nowarn" > md=-MD > cl="cl" > > -- > wanabe [-- Attachment #2: libffi-msvcc-no-WX.diff --] [-- Type: text/x-patch, Size: 2046 bytes --] diff --git a/js/ctypes/libffi/msvcc.sh b/js/ctypes/libffi/msvcc.sh --- a/js/ctypes/libffi/msvcc.sh +++ b/js/ctypes/libffi/msvcc.sh @@ -37,20 +37,17 @@ # # ***** END LICENSE BLOCK ***** # # GCC-compatible wrapper for cl.exe and ml.exe. Arguments are given in GCC # format and translated into something sensible for cl or ml. # -# Disable specific warnings, and enable warnings-as-errors so we catch any -# mistranslated args. -nowarn="-wd4127 -wd4820 -wd4706 -wd4100 -wd4255 -wd4668 -wd4053 -wd4324" -args="-nologo -W3 -WX $nowarn" +args="-nologo -W3" md=-MD cl="cl" ml="ml" output= while [ $# -gt 0 ] do case $1 diff --git a/js/ctypes/libffi/README b/js/ctypes/libffi/README --- a/js/ctypes/libffi/README +++ b/js/ctypes/libffi/README @@ -108,19 +108,23 @@ Another useful configure switch is --ena will add some extra code which will suppress certain warnings when you are using Purify with libffi. Only use this switch when using Purify, as it will slow down the library. It's also possible to build libffi on Windows platforms with Microsoft's Visual C++ compiler. In this case, use the msvcc.sh wrapper script during configuration like so: -path/to/configure --enable-shared --enable-static \ - CC=path/to/msvcc.sh LD=link \ - CPP=\"cl -nologo -EP\" +path/to/configure CC=path/to/msvcc.sh LD=link CPP=\"cl -nologo -EP\" + +For 64-bit Windows builds, use CC="path/to/msvcc.sh -m64". +You may also need to specify --build appropriately. When building with MSVC +under a MingW environment, you may need to remove the line in configure +that sets 'fix_srcfile_path' to a 'cygpath' command. ('cygpath' is not +present in MingW, and is not required when using MingW-style paths.) Configure has many other options. Use "configure --help" to see them all. Once configure has finished, type "make". Note that you must be using GNU make. You can ftp GNU make from prep.ai.mit.edu:/pub/gnu. To ensure that libffi is working as advertised, type "make check". This will require that you have DejaGNU installed. ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] building libffi on mswin64 with msvcc.sh 2010-03-25 23:58 ` Dan Witte @ 2010-03-30 12:32 ` Anthony Green 2010-03-30 16:37 ` Dan Witte 0 siblings, 1 reply; 5+ messages in thread From: Anthony Green @ 2010-03-30 12:32 UTC (permalink / raw) To: Dan Witte, libffi-discuss On 03/25/2010 07:58 PM, Dan Witte wrote: > Here's a patch that adds a few gotchas to the README, and just disables -WX, since it's a pain for everyone. (It'd be nice if we could tell 'cl' to error on warning D4002, "unrecognized option", but I think you can only do that for compiler warnings, not commandline warnings.) > > Anthony, can you look over and apply? > Looks good, and applied. It would be nice to solve the configury problem. It looks like that line is coming from libtool, and I see that this bit of libtool has been rewritten recently. Maybe it will be fixed in the next release. Thanks, AG > Thanks, > Dan. > > ----- "wanabe" <s.wanabe@gmail.com> wrote: > > >> Hello, libffi-discuss. >> >> I tried to build libffi on mswin64. >> To do it, I had to rewrite part of msvcc.sh to avoid some warnings. >> The patch is below. >> >> And in configure phase, it needed --build=x86_64-pc-mingw32 and >> CC="path/to/msvcc.sh -m64". >> If README notes it, it get more easily comprehensible, I guess. >> >> Your attention to this would be greatly appreciated. >> Sincerely. >> >> >> diff --git a/msvcc.sh b/msvcc.sh >> index 8301839..f6ae503 100755 >> --- a/msvcc.sh >> +++ b/msvcc.sh >> @@ -44,7 +44,7 @@ >> >> # Disable specific warnings, and enable warnings-as-errors so we >> catch any >> # mistranslated args. >> -nowarn="-wd4127 -wd4820 -wd4706 -wd4100 -wd4255 -wd4668 -wd4053 >> -wd4324" >> +nowarn="-wd4127 -wd4820 -wd4706 -wd4100 -wd4255 -wd4668 -wd4053 >> -wd4324 -wd4267 -wd4305 -wd4054" >> args="-nologo -W3 -WX $nowarn" >> md=-MD >> cl="cl" >> >> -- >> wanabe >> ^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [PATCH] building libffi on mswin64 with msvcc.sh 2010-03-30 12:32 ` Anthony Green @ 2010-03-30 16:37 ` Dan Witte 0 siblings, 0 replies; 5+ messages in thread From: Dan Witte @ 2010-03-30 16:37 UTC (permalink / raw) To: libffi-discuss ----- "Anthony Green" <green@redhat.com> wrote: > It would be nice to solve the configury problem. It looks like that > line is coming from libtool, and I see that this bit of libtool has > been > rewritten recently. Maybe it will be fixed in the next release. Yeah. The MSVC stuff in libtool is ultra-crufty. Here's hoping they do fix it. :) Dan. ^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2010-03-30 16:37 UTC | newest] Thread overview: 5+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2010-03-21 7:46 [PATCH] building libffi on mswin64 with msvcc.sh wanabe 2010-03-21 13:30 ` NightStrike [not found] <1375527405.35594.1269561471057.JavaMail.root@cm-mail03.mozilla.org> 2010-03-25 23:58 ` Dan Witte 2010-03-30 12:32 ` Anthony Green 2010-03-30 16:37 ` Dan Witte
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).