Menu

#301 Building 64-bits binaries for Windows

None
closed-accepted
nobody
None
5
2013-01-01
2012-12-01
No

These patches introduce preliminary support for 64-bits binaries for Windows [1]. There is not any noticeable improvement over 32-bits binaries, but help to fix some subtle errors.

Steps done:
- Change incompatible API functions
- Fix casts from/to pointer of different size
- Avoid WINVER redefinitions by including config.h before any system header.
- Globally define WIN32_LEAN_AND_MEAN in config.h. That exclude rarely used stuff, e.g., winsock.h definitions.

Pending steps:
- Rethink make-perl.c in libspectrum. Detecting variable sizes in the build system break cross-compilation.
- Revise printf modifiers for 64 bits variables

BTW, I'm using mingw64 toolchain with cygwin.

[1] http://msdn.microsoft.com/en-us/library/windows/desktop/aa384198%28v=vs.85%29.aspx

Discussion

  • Sergio Baldoví

    Sergio Baldoví - 2012-12-01
     
  • Sergio Baldoví

    Sergio Baldoví - 2012-12-01
     
  • Sergio Baldoví

    Sergio Baldoví - 2012-12-06
     
  • Sergio Baldoví

    Sergio Baldoví - 2012-12-06

    fmfconv defines `inp' variable, but clash with `inp' [1] intrinsic [2] defined by mingw64 (and Visual Studio). The simplest fix is to rename that variable in fmfconv.

    fmfconv.c:94:7: error: ‘inp’ redeclared as different kind of symbol
    /usr/x86_64-w64-mingw32/sys-root/mingw/include/intrin.h:325:5: note: previous declaration of ‘inp’ was here

    [1] http://msdn.microsoft.com/en-us/library/y7ae61bc%28v=vs.80%29.aspx
    [2] http://msdn.microsoft.com/en-us/library/26td21ds.aspx

     
  • Fredrick Meunier

    Changes all look fine to me.

    I've also hit hassles cross-compiling libspectrum to ARM stemming from the requirement to run make-perl to generate the proper types. An alternative would definitely be worth a look.

     
  • Sergio Baldoví

    Sergio Baldoví - 2012-12-08
    • status: open --> pending-accepted
     
  • Sergio Baldoví

    Sergio Baldoví - 2012-12-08

    Committed by revision 4785.

    > I've also hit hassles cross-compiling libspectrum to ARM stemming from the
    requirement to run make-perl to generate the proper types. An alternative
    would definitely be worth a look.

    Maybe AC_CHECK_SIZEOF will do the trick, in a similar way to GLIB. That seems
    experimental so I will postpone it to a later stage.

    Thanks for your feedback.

     
  • Fredrick Meunier

    • status: pending-accepted --> closed-accepted
    • milestone: -->
     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.