Skip to content

Commit e6add2f

Browse files
committed
Merge branch 'msys2-3.4.8'
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 0ad96d2 + d52da78 commit e6add2f

Some content is hidden

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

90 files changed

+2558
-274
lines changed

.github/workflows/build.yaml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
name: build
2+
3+
on: [push, pull_request]
4+
5+
jobs:
6+
build:
7+
runs-on: windows-latest
8+
9+
steps:
10+
- name: Checkout code
11+
uses: actions/checkout@v3
12+
13+
- name: setup-msys2
14+
uses: msys2/setup-msys2@v2
15+
with:
16+
msystem: MSYS
17+
update: true
18+
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
19+
20+
- name: Build
21+
shell: msys2 {0}
22+
run: |
23+
(cd winsup && ./autogen.sh)
24+
./configure --disable-dependency-tracking
25+
make -j8
26+
27+
- name: Install
28+
shell: msys2 {0}
29+
run: |
30+
make DESTDIR="$(pwd)"/_dest install
31+
32+
- name: Upload
33+
uses: actions/upload-artifact@v3
34+
with:
35+
name: install
36+
path: _dest/

.github/workflows/cygwin.yml

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

3-
on: push
3+
on: workflow_dispatch
44

55
jobs:
66
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;;

config/picflag.m4

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@ case "${$2}" in
2525
;;
2626
i[[34567]]86-*-cygwin* | x86_64-*-cygwin*)
2727
;;
28+
i[[34567]]86-*-msys* | x86_64-*-msys*)
29+
;;
2830
i[[34567]]86-*-mingw* | x86_64-*-mingw*)
2931
;;
3032
i[[34567]]86-*-nto-qnx*)

config/tcl.m4

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ AC_DEFUN([SC_PATH_TCLCONFIG], [
3333
3434
# First check to see if --with-tcl was specified.
3535
case "${host}" in
36-
*-*-cygwin*) platDir="win" ;;
36+
*-*-cygwin* | *-*-msys*) platDir="win" ;;
3737
*) platDir="unix" ;;
3838
esac
3939
if test x"${with_tclconfig}" != x ; then
@@ -165,7 +165,7 @@ AC_DEFUN([SC_PATH_TKCONFIG], [
165165
166166
# then check for a private Tk library
167167
case "${host}" in
168-
*-*-cygwin*) platDir="win" ;;
168+
*-*-cygwin* | *-*-msys*) platDir="win" ;;
169169
*) platDir="unix" ;;
170170
esac
171171
if test x"${ac_cv_c_tkconfig}" = x ; then

configure

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3074,7 +3074,7 @@ fi
30743074
# Configure extra directories which are host specific
30753075

30763076
case "${host}" in
3077-
*-cygwin*)
3077+
*-cygwin* | *-msys*)
30783078
configdirs="$configdirs libtermcap" ;;
30793079
esac
30803080

@@ -3595,7 +3595,7 @@ esac
35953595
# Disable the go frontend on systems where it is known to not work. Please keep
35963596
# this in sync with contrib/config-list.mk.
35973597
case "${target}" in
3598-
*-*-darwin* | *-*-cygwin* | *-*-mingw* | *-*-aix*)
3598+
*-*-darwin* | *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-aix*)
35993599
unsupported_languages="$unsupported_languages go"
36003600
;;
36013601
esac
@@ -3608,7 +3608,7 @@ if test x$enable_libgo = x; then
36083608
# PR 46986
36093609
noconfigdirs="$noconfigdirs target-libgo"
36103610
;;
3611-
*-*-cygwin* | *-*-mingw*)
3611+
*-*-cygwin* | *-*-msys* | *-*-mingw*)
36123612
noconfigdirs="$noconfigdirs target-libgo"
36133613
;;
36143614
*-*-aix*)
@@ -3880,7 +3880,7 @@ case "${target}" in
38803880
i[3456789]86-*-mingw*)
38813881
target_configdirs="$target_configdirs target-winsup"
38823882
;;
3883-
*-*-cygwin*)
3883+
*-*-cygwin* | *-*-msys*)
38843884
target_configdirs="$target_configdirs target-libtermcap target-winsup"
38853885
noconfigdirs="$noconfigdirs target-libgloss"
38863886
# always build newlib if winsup directory is present.
@@ -4024,7 +4024,7 @@ case "${host}" in
40244024
i[3456789]86-*-msdosdjgpp*)
40254025
host_makefile_frag="config/mh-djgpp"
40264026
;;
4027-
*-cygwin*)
4027+
*-cygwin* | *-msys*)
40284028

40294029
{ $as_echo "$as_me:${as_lineno-$LINENO}: checking to see if cat works as expected" >&5
40304030
$as_echo_n "checking to see if cat works as expected... " >&6; }
@@ -6192,7 +6192,7 @@ fi
61926192

61936193
target_elf=no
61946194
case $target in
6195-
*-darwin* | *-aix* | *-cygwin* | *-mingw* | *-aout* | *-*coff* | \
6195+
*-darwin* | *-aix* | *-cygwin* | *-msys* | *-mingw* | *-aout* | *-*coff* | \
61966196
*-msdosdjgpp* | *-vms* | *-wince* | *-*-pe* | \
61976197
alpha*-dec-osf* | hppa[12]*-*-hpux* | \
61986198
nvptx-*-none)
@@ -6210,7 +6210,7 @@ if test $target_elf = yes; then :
62106210
else
62116211
if test x"$default_enable_lto" = x"yes" ; then
62126212
case $target in
6213-
*-apple-darwin9* | *-cygwin* | *-mingw* | *djgpp*) ;;
6213+
*-apple-darwin9* | *-cygwin* | *-msys* | *-mingw* | *djgpp*) ;;
62146214
# On other non-ELF platforms, LTO has yet to be validated.
62156215
*) enable_lto=no ;;
62166216
esac
@@ -6221,7 +6221,7 @@ else
62216221
# warn during gcc/ subconfigure; unless you're bootstrapping with
62226222
# -flto it won't be needed until after installation anyway.
62236223
case $target in
6224-
*-cygwin* | *-mingw* | *-apple-darwin* | *djgpp*) ;;
6224+
*-cygwin* | *-msys* | *-mingw* | *-apple-darwin* | *djgpp*) ;;
62256225
*) if test x"$enable_lto" = x"yes"; then
62266226
as_fn_error $? "LTO support is not enabled for this target." "$LINENO" 5
62276227
fi
@@ -6231,7 +6231,7 @@ else
62316231
# Among non-ELF, only Windows platforms support the lto-plugin so far.
62326232
# Build it unless LTO was explicitly disabled.
62336233
case $target in
6234-
*-cygwin* | *-mingw*) build_lto_plugin=$enable_lto ;;
6234+
*-cygwin* | *-msys* | *-mingw*) build_lto_plugin=$enable_lto ;;
62356235
*) ;;
62366236
esac
62376237

@@ -7102,7 +7102,7 @@ rm -f conftest*
71027102
case "${host}" in
71037103
*-*-hpux*) RPATH_ENVVAR=SHLIB_PATH ;;
71047104
*-*-darwin*) RPATH_ENVVAR=DYLD_LIBRARY_PATH ;;
7105-
*-*-mingw* | *-*-cygwin ) RPATH_ENVVAR=PATH ;;
7105+
*-*-mingw* | *-*-cygwin | *-msys ) RPATH_ENVVAR=PATH ;;
71067106
*) RPATH_ENVVAR=LD_LIBRARY_PATH ;;
71077107
esac
71087108

@@ -7620,7 +7620,7 @@ case " $target_configdirs " in
76207620
case " $target_configargs " in
76217621
*" --with-newlib "*)
76227622
case "$target" in
7623-
*-cygwin*)
7623+
*-cygwin* | *-msys*)
76247624
FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(TARGET_SUBDIR)/winsup/cygwin -isystem $$s/winsup/cygwin/include'
76257625
;;
76267626
esac

configure.ac

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -409,7 +409,7 @@ AC_ARG_ENABLE(compressed_debug_sections,
409409
# Configure extra directories which are host specific
410410

411411
case "${host}" in
412-
*-cygwin*)
412+
*-cygwin* | *-msys*)
413413
configdirs="$configdirs libtermcap" ;;
414414
esac
415415

@@ -893,7 +893,7 @@ esac
893893
# Disable the go frontend on systems where it is known to not work. Please keep
894894
# this in sync with contrib/config-list.mk.
895895
case "${target}" in
896-
*-*-darwin* | *-*-cygwin* | *-*-mingw* | *-*-aix*)
896+
*-*-darwin* | *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-aix*)
897897
unsupported_languages="$unsupported_languages go"
898898
;;
899899
esac
@@ -906,7 +906,7 @@ if test x$enable_libgo = x; then
906906
# PR 46986
907907
noconfigdirs="$noconfigdirs target-libgo"
908908
;;
909-
*-*-cygwin* | *-*-mingw*)
909+
*-*-cygwin* | *-*-msys* | *-*-mingw*)
910910
noconfigdirs="$noconfigdirs target-libgo"
911911
;;
912912
*-*-aix*)
@@ -1178,7 +1178,7 @@ case "${target}" in
11781178
i[[3456789]]86-*-mingw*)
11791179
target_configdirs="$target_configdirs target-winsup"
11801180
;;
1181-
*-*-cygwin*)
1181+
*-*-cygwin* | *-*-msys*)
11821182
target_configdirs="$target_configdirs target-libtermcap target-winsup"
11831183
noconfigdirs="$noconfigdirs target-libgloss"
11841184
# always build newlib if winsup directory is present.
@@ -1322,7 +1322,7 @@ case "${host}" in
13221322
i[[3456789]]86-*-msdosdjgpp*)
13231323
host_makefile_frag="config/mh-djgpp"
13241324
;;
1325-
*-cygwin*)
1325+
*-cygwin* | *-msys*)
13261326
ACX_CHECK_CYGWIN_CAT_WORKS
13271327
host_makefile_frag="config/mh-cygwin"
13281328
;;
@@ -1809,7 +1809,7 @@ ACX_ELF_TARGET_IFELSE([# ELF platforms build the lto-plugin always.
18091809
build_lto_plugin=yes
18101810
],[if test x"$default_enable_lto" = x"yes" ; then
18111811
case $target in
1812-
*-apple-darwin9* | *-cygwin* | *-mingw* | *djgpp*) ;;
1812+
*-apple-darwin9* | *-cygwin* | *-msys* | *-mingw* | *djgpp*) ;;
18131813
# On other non-ELF platforms, LTO has yet to be validated.
18141814
*) enable_lto=no ;;
18151815
esac
@@ -1820,7 +1820,7 @@ ACX_ELF_TARGET_IFELSE([# ELF platforms build the lto-plugin always.
18201820
# warn during gcc/ subconfigure; unless you're bootstrapping with
18211821
# -flto it won't be needed until after installation anyway.
18221822
case $target in
1823-
*-cygwin* | *-mingw* | *-apple-darwin* | *djgpp*) ;;
1823+
*-cygwin* | *-msys*| *-mingw* | *-apple-darwin* | *djgpp*) ;;
18241824
*) if test x"$enable_lto" = x"yes"; then
18251825
AC_MSG_ERROR([LTO support is not enabled for this target.])
18261826
fi
@@ -1830,7 +1830,7 @@ ACX_ELF_TARGET_IFELSE([# ELF platforms build the lto-plugin always.
18301830
# Among non-ELF, only Windows platforms support the lto-plugin so far.
18311831
# Build it unless LTO was explicitly disabled.
18321832
case $target in
1833-
*-cygwin* | *-mingw*) build_lto_plugin=$enable_lto ;;
1833+
*-cygwin* | *-msys* | *-mingw*) build_lto_plugin=$enable_lto ;;
18341834
*) ;;
18351835
esac
18361836
])
@@ -2644,7 +2644,7 @@ rm -f conftest*
26442644
case "${host}" in
26452645
*-*-hpux*) RPATH_ENVVAR=SHLIB_PATH ;;
26462646
*-*-darwin*) RPATH_ENVVAR=DYLD_LIBRARY_PATH ;;
2647-
*-*-mingw* | *-*-cygwin ) RPATH_ENVVAR=PATH ;;
2647+
*-*-mingw* | *-*-cygwin | *-*-msys ) RPATH_ENVVAR=PATH ;;
26482648
*) RPATH_ENVVAR=LD_LIBRARY_PATH ;;
26492649
esac
26502650

@@ -3157,7 +3157,7 @@ case " $target_configdirs " in
31573157
case " $target_configargs " in
31583158
*" --with-newlib "*)
31593159
case "$target" in
3160-
*-cygwin*)
3160+
*-cygwin* | *-msys*)
31613161
FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(TARGET_SUBDIR)/winsup/cygwin -isystem $$s/winsup/cygwin/include'
31623162
;;
31633163
esac

0 commit comments

Comments
 (0)