Draft
Conversation
This does a full client build of libxcrypt, using upstream's autotools based build chain on MSYS2, but using MSVC build tools. This requires wrappers for the MSVC build tools; ar-lib and compile are taken unmodified from automake; windres is a minimalist self-made wrapper. A prerequisite is a suitable libxcrypt patched to support MSVC builds[1]. [1] <besser82/libxcrypt#195>
Member
Author
|
Another test build (including cross-compilation for ARM64): https://github.com/cmb69/winlib-builder/actions/runs/12281525937 Generally, should add PS: arm64.patch .github/workflows/libxcrypt_msys.yml | 4 ++--
patches/libxcrypt.patch | 24 ++++++++++++++++++++----
scripts/compute-virtuals.ps1 | 1 +
3 files changed, 23 insertions(+), 6 deletions(-)
diff --git a/.github/workflows/libxcrypt_msys.yml b/.github/workflows/libxcrypt_msys.yml
index 5d79678..90e85ab 100644
--- a/.github/workflows/libxcrypt_msys.yml
+++ b/.github/workflows/libxcrypt_msys.yml
@@ -15,7 +15,7 @@ jobs:
build:
strategy:
matrix:
- arch: [x64, x86]
+ arch: [x64, x86, amd64_arm64]
runs-on: windows-2022
steps:
- name: Set git to use LF
@@ -63,7 +63,7 @@ jobs:
>>winlibs.sh echo LDFLAGS='-debug' \
>>winlibs.sh echo LIBS='-lBcrypt'
>>winlibs.sh echo make
- >>winlibs.sh echo make check
+ >>winlibs.sh echo #make check
>>winlibs.sh echo make install
- name: Build libxcrypt
run: |
diff --git a/patches/libxcrypt.patch b/patches/libxcrypt.patch
index 99d4db8..5c84c1b 100644
--- a/patches/libxcrypt.patch
+++ b/patches/libxcrypt.patch
@@ -1,7 +1,8 @@
- Makefile.am | 4 ----
- configure.ac | 1 +
- test/alg-yescrypt.c | 2 +-
- 3 files changed, 2 insertions(+), 5 deletions(-)
+ Makefile.am | 4 ----
+ build-aux/m4/zw_endianness.m4 | 4 ++--
+ configure.ac | 1 +
+ test/alg-yescrypt.c | 2 +-
+ 4 files changed, 4 insertions(+), 7 deletions(-)
diff --git a/Makefile.am b/Makefile.am
index 5c07059..08ed7ee 100644
@@ -27,6 +28,21 @@ index 5c07059..08ed7ee 100644
test/preferred-method \
test/short-outbuf \
test/special-char-salt
+diff --git a/build-aux/m4/zw_endianness.m4 b/build-aux/m4/zw_endianness.m4
+index 00c3fdd..e758c68 100644
+--- a/build-aux/m4/zw_endianness.m4
++++ b/build-aux/m4/zw_endianness.m4
+@@ -102,8 +102,8 @@ m4_define([zw_C_ENDIANNESS_options], [
+ [(defined _MIPSEB) != (defined _MIPSEL)],
+ [defined _MIPSEB], [defined _MIPSEL], [0],
+ ],
+-[ [_MSC_VER and _M_X64 or _M_IX86],
+- [defined _MSC_VER && (defined _M_X64 || defined _M_IX86)],
++[ [_MSC_VER and _M_X64 or _M_IX86 or _M_ARM64],
++ [defined _MSC_VER && (defined _M_X64 || defined _M_IX86 || defined _M_ARM64)],
+ [0], [1], [0],
+ ]
+ ])
diff --git a/configure.ac b/configure.ac
index 4b8afd8..1523e92 100644
--- a/configure.ac
diff --git a/scripts/compute-virtuals.ps1 b/scripts/compute-virtuals.ps1
index 025a63d..274148b 100644
--- a/scripts/compute-virtuals.ps1
+++ b/scripts/compute-virtuals.ps1
@@ -72,6 +72,7 @@ if (-not $winsdk) {
$msarchs = @{
"x64" = "x64"
"x86" = "Win32"
+ "amd64_arm64" = "ARM64"
}
$msarch = $msarchs.$arch
if (-not $msarch) { |
52b22a5 to
8fa9b53
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This does a full client build of libxcrypt, using upstream's autotools based build chain on MSYS2, but using MSVC build tools. This requires wrappers for the MSVC build tools; ar-lib and compile are taken unmodified from automake; windres is a minimalist self-made wrapper.
A prerequisite is a suitable libxcrypt patched to support MSVC builds[1].
[1] besser82/libxcrypt#195
A test build is available at https://github.com/cmb69/winlib-builder/actions/runs/12279660573 (this should not be used for production; only for testing purposes).