Skip to content

Commit 5a3d7e9

Browse files
committed
Merge branch 'msys2-3.6.3'
Seeing as Git for Windows tries to stay close to the upstream MSYS2 project, it makes sense to integrate their patches verbatim. Signed-off-by: Johannes Schindelin <[email protected]>
2 parents 80711d0 + e3e73ed commit 5a3d7e9

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

80 files changed

+2811
-253
lines changed

.github/workflows/build.yaml

Lines changed: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
name: build
2+
3+
on: [push, pull_request]
4+
5+
permissions:
6+
contents: read
7+
8+
jobs:
9+
build:
10+
runs-on: windows-latest
11+
12+
steps:
13+
- name: Checkout code
14+
uses: actions/checkout@v4
15+
16+
- name: setup-msys2
17+
uses: msys2/setup-msys2@v2
18+
with:
19+
msystem: MSYS
20+
update: true
21+
install: msys2-devel base-devel autotools cocom diffutils gcc gettext-devel libiconv-devel make mingw-w64-cross-crt mingw-w64-cross-gcc mingw-w64-cross-zlib perl zlib-devel xmlto docbook-xsl
22+
23+
- name: Build
24+
shell: msys2 {0}
25+
run: |
26+
(cd winsup && ./autogen.sh)
27+
./configure --disable-dependency-tracking --with-msys2-runtime-commit="$GITHUB_SHA"
28+
make -j8
29+
30+
- name: Install
31+
shell: msys2 {0}
32+
run: |
33+
make DESTDIR="$(pwd)"/_dest install
34+
35+
- name: Upload
36+
uses: actions/upload-artifact@v4
37+
with:
38+
name: install
39+
path: _dest/
40+
41+
generate-msys2-tests-matrix:
42+
runs-on: ubuntu-latest
43+
outputs:
44+
matrix: ${{ steps.matrix.outputs.matrix }}
45+
steps:
46+
- id: matrix
47+
uses: msys2/msys2-tests/gha-matrix-gen@main
48+
49+
msys2-tests:
50+
needs: [build, generate-msys2-tests-matrix]
51+
strategy:
52+
fail-fast: false
53+
matrix:
54+
include: ${{ fromJson(needs.generate-msys2-tests-matrix.outputs.matrix) }}
55+
56+
name: msys2-tests ${{ matrix.msystem }}-${{ matrix.cc }}
57+
runs-on: ${{ matrix.runner }}
58+
env:
59+
CC: ${{ matrix.cc }}
60+
CXX: ${{ matrix.cxx }}
61+
FC: ${{ matrix.fc }}
62+
steps:
63+
- id: msys2
64+
uses: msys2/setup-msys2@v2
65+
with:
66+
msystem: ${{ matrix.msystem }}
67+
update: true
68+
install: ${{ matrix.packages }}
69+
70+
- name: Add staging repo
71+
shell: msys2 {0}
72+
run: |
73+
sed -i '1s|^|[staging]\nServer = https://repo.msys2.org/staging/\nSigLevel = Never\n|' /etc/pacman.conf
74+
75+
- name: Update using staging
76+
shell: pwsh
77+
run: |
78+
msys2 -c 'pacman --noconfirm -Suuy'
79+
$ErrorActionPreference = 'Stop'
80+
$PSNativeCommandUseErrorActionPreference = $true
81+
msys2 -c 'pacman --noconfirm -Suu'
82+
83+
- name: Download msys2-runtime artifact
84+
uses: actions/download-artifact@v4
85+
with:
86+
name: install
87+
path: ${{ steps.msys2.outputs.msys2-location }}
88+
89+
- name: uname -a
90+
shell: msys2 {0}
91+
run: uname -a
92+
93+
- name: Run tests
94+
uses: msys2/msys2-tests@main
95+

.github/workflows/cygwin.yml

Lines changed: 1 addition & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,6 @@
11
name: cygwin
22

3-
on:
4-
push:
5-
# since master is a symbolic reference to main, don't run for both
6-
branches-ignore:
7-
- 'master'
8-
tags:
9-
- '*'
3+
on: workflow_dispatch
104

115
jobs:
126
fedora-build:
Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
name: sync-with-cygwin
2+
3+
# File: .github/workflows/repo-sync.yml
4+
5+
on:
6+
workflow_dispatch:
7+
schedule:
8+
- cron: "42 * * * *"
9+
jobs:
10+
repo-sync:
11+
runs-on: ubuntu-latest
12+
permissions:
13+
contents: write
14+
steps:
15+
- name: Fetch Cygwin's latest master and tags
16+
run: |
17+
git init --bare
18+
# Potentially use git://sourceware.org/git/newlib-cygwin.git directly, but GitHub seems more reliable
19+
git fetch https://github.com/cygwin/cygwin master:refs/heads/cygwin/master 'refs/tags/*:refs/tags/*'
20+
- name: Push to our fork
21+
env:
22+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
23+
run: |
24+
git push https://$GITHUB_ACTOR:[email protected]/$GITHUB_REPOSITORY refs/heads/cygwin/master 'refs/tags/*:refs/tags/*'

compile

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,7 @@ func_file_conv ()
5353
MINGW*)
5454
file_conv=mingw
5555
;;
56-
CYGWIN*)
56+
CYGWIN*|MSYS*)
5757
file_conv=cygwin
5858
;;
5959
*)
@@ -67,7 +67,7 @@ func_file_conv ()
6767
mingw/*)
6868
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
6969
;;
70-
cygwin/*)
70+
cygwin/*|msys/*)
7171
file=`cygpath -m "$file" || echo "$file"`
7272
;;
7373
wine/*)

config.guess

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -914,6 +914,9 @@ EOF
914914
amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
915915
echo x86_64-pc-cygwin
916916
exit ;;
917+
amd64:MSYS*:*:* | x86_64:MSYS*:*:*)
918+
echo x86_64-unknown-msys
919+
exit ;;
917920
prep*:SunOS:5.*:*)
918921
echo powerpcle-unknown-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')"
919922
exit ;;

config.rpath

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -109,7 +109,7 @@ hardcode_direct=no
109109
hardcode_minus_L=no
110110

111111
case "$host_os" in
112-
cygwin* | mingw* | pw32*)
112+
cygwin* | msys* | mingw* | pw32*)
113113
# FIXME: the MSVC++ port hasn't been tested in a loooong time
114114
# When not using gcc, we currently assume that we are using
115115
# Microsoft Visual C++.
@@ -149,7 +149,7 @@ if test "$with_gnu_ld" = yes; then
149149
ld_shlibs=no
150150
fi
151151
;;
152-
cygwin* | mingw* | pw32*)
152+
cygwin* | msys* | mingw* | pw32*)
153153
# hardcode_libdir_flag_spec is actually meaningless, as there is
154154
# no search path for DLLs.
155155
hardcode_libdir_flag_spec='-L$libdir'
@@ -268,7 +268,7 @@ else
268268
;;
269269
bsdi4*)
270270
;;
271-
cygwin* | mingw* | pw32*)
271+
cygwin* | msys* | mingw* | pw32*)
272272
# When not using gcc, we currently assume that we are using
273273
# Microsoft Visual C++.
274274
# hardcode_libdir_flag_spec is actually meaningless, as there is
@@ -437,7 +437,7 @@ case "$host_os" in
437437
;;
438438
bsdi4*)
439439
;;
440-
cygwin* | mingw* | pw32*)
440+
cygwin* | msys* | mingw* | pw32*)
441441
shrext=.dll
442442
;;
443443
darwin* | rhapsody*)

config/dfp.m4

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,8 @@ Valid choices are 'yes', 'bid', 'dpd', and 'no'.]) ;;
2323
powerpc*-*-linux* | i?86*-*-linux* | x86_64*-*-linux* | s390*-*-linux* | \
2424
i?86*-*-elfiamcu | i?86*-*-gnu* | \
2525
i?86*-*-mingw* | x86_64*-*-mingw* | \
26-
i?86*-*-cygwin* | x86_64*-*-cygwin*)
26+
i?86*-*-cygwin* | x86_64*-*-cygwin* | \
27+
i?86*-*-msys* | x86_64*-*-msys*)
2728
enable_decimal_float=yes
2829
;;
2930
*)

config/elf.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ AC_REQUIRE([AC_CANONICAL_TARGET])
1515
1616
target_elf=no
1717
case $target in
18-
*-darwin* | *-aix* | *-cygwin* | *-mingw* | *-aout* | *-*coff* | \
18+
*-darwin* | *-aix* | *-cygwin* | *-msys* | *-mingw* | *-aout* | *-*coff* | \
1919
*-msdosdjgpp* | *-vms* | *-wince* | *-*-pe* | \
2020
alpha*-dec-osf* | hppa[[12]]*-*-hpux* | \
2121
nvptx-*-none)

config/lthostflags.m4

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ AC_DEFUN([ACX_LT_HOST_FLAGS], [
1313
AC_REQUIRE([AC_CANONICAL_SYSTEM])
1414
1515
case $host in
16-
*-cygwin* | *-mingw*)
16+
*-cygwin* | *-msys* | *-mingw*)
1717
# 'host' will be top-level target in the case of a target lib,
1818
# we must compare to with_cross_host to decide if this is a native
1919
# or cross-compiler and select where to install dlls appropriately.

config/mmap.m4

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ else
4242
# Systems known to be in this category are Windows (all variants),
4343
# VMS, and Darwin.
4444
case "$host_os" in
45-
*vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00)
45+
*vms* | cygwin* | msys* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00)
4646
gcc_cv_func_mmap_dev_zero=no ;;
4747
*)
4848
gcc_cv_func_mmap_dev_zero=yes;;
@@ -74,7 +74,7 @@ else
7474
# above for use of /dev/zero.
7575
# Systems known to be in this category are Windows, VMS, and SCO Unix.
7676
case "$host_os" in
77-
*vms* | cygwin* | pe | mingw* | sco* | udk* )
77+
*vms* | cygwin* | msys* | pe | mingw* | sco* | udk* )
7878
gcc_cv_func_mmap_anon=no ;;
7979
*)
8080
gcc_cv_func_mmap_anon=yes;;

0 commit comments

Comments
 (0)