Skip to content

Win64 target #25

Description

@staalmannen

I played around a bit with cross-compiling to Win64 with mingw-w64 by adding the needed "pe-x86-64" in tools/lkl/Makefile and arch/lkl/Makefile.

"interestingly" it fails in two different ways if I add or don't add
select 64BIT if OUTPUT_FORMAT = "pe-x86-64"
in arch/lkl/Kbuild

Without it, it fails on the compilation check
#define BUILD_BUG_ON_ZERO(e) (sizeof(struct { int:-!!(e); }))
in include/linux/bug.h

With it, it fails on
include/linux/tty.h
Width of "unused" is longer than its type
unused:BITS_PER_LONG - 2

I have tried setting BITS_PER_LONG=32 manually as a KBUILD_CFLAG
(which it should be on Win64)

I am guessing that both of these issues is due to Win64 being LLP64 which means that assumptions in compilation checks etc are not always correct.
The question is just - what would be the advisable approach - go for 64bit and try to solve the incompatibilities or rather go for 32bit and try to solve incompatibilities?

If someone smarter than me is already working on this I will just drop it :)

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions