Skip to content

Prepare for the CMake plumbing to build the loader with MinGW (2)#18

Open
illwieckz wants to merge 1 commit into
illwieckz/mingw-1from
illwieckz/mingw
Open

Prepare for the CMake plumbing to build the loader with MinGW (2)#18
illwieckz wants to merge 1 commit into
illwieckz/mingw-1from
illwieckz/mingw

Conversation

@illwieckz

@illwieckz illwieckz commented Jun 21, 2026

Copy link
Copy Markdown
Member

@illwieckz illwieckz added the enhancement New feature or request label Jun 21, 2026
@illwieckz illwieckz changed the title Illwieckz/mingw Make it possible to build the Windows executables with MinGW (2) Jun 21, 2026
@illwieckz illwieckz changed the title Make it possible to build the Windows executables with MinGW (2) CMake plumbing to build the Windows executables with MinGW (2) Jun 21, 2026
@illwieckz illwieckz changed the title CMake plumbing to build the Windows executables with MinGW (2) CMake plumbing to build the loader with MinGW (2) Jun 22, 2026
@illwieckz illwieckz mentioned this pull request Jun 22, 2026
@illwieckz

Copy link
Copy Markdown
Member Author

Hmm, in fact the CMake plumbing isn't in that PR, but in the general CMake PR. Let's rename it.

@illwieckz illwieckz changed the title CMake plumbing to build the loader with MinGW (2) Prepare for the CMake plumbing to build the loader with MinGW (2) Jun 22, 2026
@illwieckz illwieckz force-pushed the illwieckz/mingw-1 branch from 9bf3b1f to a511b4e Compare June 22, 2026 17:42
@illwieckz illwieckz force-pushed the illwieckz/mingw-1 branch from a511b4e to 9bf3b1f Compare June 22, 2026 19:04
@illwieckz illwieckz mentioned this pull request Jun 25, 2026
; Use of this source code is governed by a BSD-style license that can be
; found in the LICENSE file.

include ksamd64.inc

@illwieckz illwieckz Jun 25, 2026

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I may mention this in the commit message, but it works because all that is needed is two macros from macamd64.inc, and ksamd64.inc included macamd64.inc so it was overkill to include ksamd64.inc but it worked.

When stubbing it we better make it as short as possible.

On MSVC, the standard macamd64.inc will be used, on MinGW the stub will be used by adding the directory containing it to the list of include directories.

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Also if I remember correctly the standard .inc files use some formatting variants (especially in comment formatting or other useless things like that) that are incompatible with JWasm. The stub is kept as minimal as possible and use a formatting meant to please JWasm. By luck the NaCl .asm file is already compatible with both MASM and JWasm.

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

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant