Skip to content

Commit

Permalink
Merge branch 'msys2-3.4.10'
Browse files Browse the repository at this point in the history
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 <johannes.schindelin@gmx.de>
  • Loading branch information
dscho committed Nov 29, 2023
2 parents 00605d0 + ae5462a commit 5b45686
Show file tree
Hide file tree
Showing 90 changed files with 2,570 additions and 274 deletions.
41 changes: 41 additions & 0 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: build

on: [push, pull_request]

jobs:
build:
runs-on: windows-latest

steps:
- name: Checkout code
uses: actions/checkout@v3

- name: setup-msys2
uses: msys2/setup-msys2@v2
with:
msystem: MSYS
update: true
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

- name: Build
shell: msys2 {0}
run: |
# XXX: cygwin still uses gcc v11 so we get new warnings with v13,
# resulting in errors. We can't selectively disable warnigns since our
# cross compiler is also too old and doesn't understand the new
# warning flags, so we need to disable all errors for now.
export CXXFLAGS="-Wno-error -Wno-narrowing"
(cd winsup && ./autogen.sh)
./configure --disable-dependency-tracking
make -j8
- name: Install
shell: msys2 {0}
run: |
make DESTDIR="$(pwd)"/_dest install
- name: Upload
uses: actions/upload-artifact@v3
with:
name: install
path: _dest/
2 changes: 1 addition & 1 deletion .github/workflows/cygwin.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
name: cygwin

on: push
on: workflow_dispatch

jobs:
fedora-build:
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/sync-with-cygwin.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: sync-with-cygwin

# File: .github/workflows/repo-sync.yml

on:
workflow_dispatch:
schedule:
- cron: "42 * * * *"
jobs:
repo-sync:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Fetch Cygwin's latest master and tags
run: |
git init --bare
# Potentially use git://sourceware.org/git/newlib-cygwin.git directly, but GitHub seems more reliable
git fetch https://github.com/cygwin/cygwin master:refs/heads/cygwin/master 'refs/tags/*:refs/tags/*'
- name: Push to our fork
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git push https://$GITHUB_ACTOR:$GITHUB_TOKEN@github.com/$GITHUB_REPOSITORY refs/heads/cygwin/master 'refs/tags/*:refs/tags/*'
4 changes: 2 additions & 2 deletions compile
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func_file_conv ()
MINGW*)
file_conv=mingw
;;
CYGWIN*)
CYGWIN*|MSYS*)
file_conv=cygwin
;;
*)
Expand All @@ -67,7 +67,7 @@ func_file_conv ()
mingw/*)
file=`cmd //C echo "$file " | sed -e 's/"\(.*\) " *$/\1/'`
;;
cygwin/*)
cygwin/*|msys/*)
file=`cygpath -m "$file" || echo "$file"`
;;
wine/*)
Expand Down
3 changes: 3 additions & 0 deletions config.guess
Original file line number Diff line number Diff line change
Expand Up @@ -914,6 +914,9 @@ EOF
amd64:CYGWIN*:*:* | x86_64:CYGWIN*:*:*)
echo x86_64-pc-cygwin
exit ;;
amd64:MSYS*:*:* | x86_64:MSYS*:*:*)
echo x86_64-unknown-msys
exit ;;
prep*:SunOS:5.*:*)
echo powerpcle-unknown-solaris2"$(echo "$UNAME_RELEASE"|sed -e 's/[^.]*//')"
exit ;;
Expand Down
8 changes: 4 additions & 4 deletions config.rpath
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ hardcode_direct=no
hardcode_minus_L=no

case "$host_os" in
cygwin* | mingw* | pw32*)
cygwin* | msys* | mingw* | pw32*)
# FIXME: the MSVC++ port hasn't been tested in a loooong time
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
Expand Down Expand Up @@ -149,7 +149,7 @@ if test "$with_gnu_ld" = yes; then
ld_shlibs=no
fi
;;
cygwin* | mingw* | pw32*)
cygwin* | msys* | mingw* | pw32*)
# hardcode_libdir_flag_spec is actually meaningless, as there is
# no search path for DLLs.
hardcode_libdir_flag_spec='-L$libdir'
Expand Down Expand Up @@ -268,7 +268,7 @@ else
;;
bsdi4*)
;;
cygwin* | mingw* | pw32*)
cygwin* | msys* | mingw* | pw32*)
# When not using gcc, we currently assume that we are using
# Microsoft Visual C++.
# hardcode_libdir_flag_spec is actually meaningless, as there is
Expand Down Expand Up @@ -437,7 +437,7 @@ case "$host_os" in
;;
bsdi4*)
;;
cygwin* | mingw* | pw32*)
cygwin* | msys* | mingw* | pw32*)
shrext=.dll
;;
darwin* | rhapsody*)
Expand Down
3 changes: 2 additions & 1 deletion config/dfp.m4
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,8 @@ Valid choices are 'yes', 'bid', 'dpd', and 'no'.]) ;;
powerpc*-*-linux* | i?86*-*-linux* | x86_64*-*-linux* | s390*-*-linux* | \
i?86*-*-elfiamcu | i?86*-*-gnu* | \
i?86*-*-mingw* | x86_64*-*-mingw* | \
i?86*-*-cygwin* | x86_64*-*-cygwin*)
i?86*-*-cygwin* | x86_64*-*-cygwin* | \
i?86*-*-msys* | x86_64*-*-msys*)
enable_decimal_float=yes
;;
*)
Expand Down
2 changes: 1 addition & 1 deletion config/elf.m4
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ AC_REQUIRE([AC_CANONICAL_TARGET])
target_elf=no
case $target in
*-darwin* | *-aix* | *-cygwin* | *-mingw* | *-aout* | *-*coff* | \
*-darwin* | *-aix* | *-cygwin* | *-msys* | *-mingw* | *-aout* | *-*coff* | \
*-msdosdjgpp* | *-vms* | *-wince* | *-*-pe* | \
alpha*-dec-osf* | hppa[[12]]*-*-hpux* | \
nvptx-*-none)
Expand Down
2 changes: 1 addition & 1 deletion config/lthostflags.m4
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ AC_DEFUN([ACX_LT_HOST_FLAGS], [
AC_REQUIRE([AC_CANONICAL_SYSTEM])
case $host in
*-cygwin* | *-mingw*)
*-cygwin* | *-msys* | *-mingw*)
# 'host' will be top-level target in the case of a target lib,
# we must compare to with_cross_host to decide if this is a native
# or cross-compiler and select where to install dlls appropriately.
Expand Down
4 changes: 2 additions & 2 deletions config/mmap.m4
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ else
# Systems known to be in this category are Windows (all variants),
# VMS, and Darwin.
case "$host_os" in
*vms* | cygwin* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00)
*vms* | cygwin* | msys* | pe | mingw* | darwin* | ultrix* | hpux10* | hpux11.00)
gcc_cv_func_mmap_dev_zero=no ;;
*)
gcc_cv_func_mmap_dev_zero=yes;;
Expand Down Expand Up @@ -74,7 +74,7 @@ else
# above for use of /dev/zero.
# Systems known to be in this category are Windows, VMS, and SCO Unix.
case "$host_os" in
*vms* | cygwin* | pe | mingw* | sco* | udk* )
*vms* | cygwin* | msys* | pe | mingw* | sco* | udk* )
gcc_cv_func_mmap_anon=no ;;
*)
gcc_cv_func_mmap_anon=yes;;
Expand Down
2 changes: 2 additions & 0 deletions config/picflag.m4
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ case "${$2}" in
;;
i[[34567]]86-*-cygwin* | x86_64-*-cygwin*)
;;
i[[34567]]86-*-msys* | x86_64-*-msys*)
;;
i[[34567]]86-*-mingw* | x86_64-*-mingw*)
;;
i[[34567]]86-*-nto-qnx*)
Expand Down
4 changes: 2 additions & 2 deletions config/tcl.m4
Original file line number Diff line number Diff line change
Expand Up @@ -33,7 +33,7 @@ AC_DEFUN([SC_PATH_TCLCONFIG], [
# First check to see if --with-tcl was specified.
case "${host}" in
*-*-cygwin*) platDir="win" ;;
*-*-cygwin* | *-*-msys*) platDir="win" ;;
*) platDir="unix" ;;
esac
if test x"${with_tclconfig}" != x ; then
Expand Down Expand Up @@ -165,7 +165,7 @@ AC_DEFUN([SC_PATH_TKCONFIG], [
# then check for a private Tk library
case "${host}" in
*-*-cygwin*) platDir="win" ;;
*-*-cygwin* | *-*-msys*) platDir="win" ;;
*) platDir="unix" ;;
esac
if test x"${ac_cv_c_tkconfig}" = x ; then
Expand Down
22 changes: 11 additions & 11 deletions configure
Original file line number Diff line number Diff line change
Expand Up @@ -3074,7 +3074,7 @@ fi
# Configure extra directories which are host specific

case "${host}" in
*-cygwin*)
*-cygwin* | *-msys*)
configdirs="$configdirs libtermcap" ;;
esac

Expand Down Expand Up @@ -3595,7 +3595,7 @@ esac
# Disable the go frontend on systems where it is known to not work. Please keep
# this in sync with contrib/config-list.mk.
case "${target}" in
*-*-darwin* | *-*-cygwin* | *-*-mingw* | *-*-aix*)
*-*-darwin* | *-*-cygwin* | *-*-msys* | *-*-mingw* | *-*-aix*)
unsupported_languages="$unsupported_languages go"
;;
esac
Expand All @@ -3608,7 +3608,7 @@ if test x$enable_libgo = x; then
# PR 46986
noconfigdirs="$noconfigdirs target-libgo"
;;
*-*-cygwin* | *-*-mingw*)
*-*-cygwin* | *-*-msys* | *-*-mingw*)
noconfigdirs="$noconfigdirs target-libgo"
;;
*-*-aix*)
Expand Down Expand Up @@ -3880,7 +3880,7 @@ case "${target}" in
i[3456789]86-*-mingw*)
target_configdirs="$target_configdirs target-winsup"
;;
*-*-cygwin*)
*-*-cygwin* | *-*-msys*)
target_configdirs="$target_configdirs target-libtermcap target-winsup"
noconfigdirs="$noconfigdirs target-libgloss"
# always build newlib if winsup directory is present.
Expand Down Expand Up @@ -4024,7 +4024,7 @@ case "${host}" in
i[3456789]86-*-msdosdjgpp*)
host_makefile_frag="config/mh-djgpp"
;;
*-cygwin*)
*-cygwin* | *-msys*)

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

target_elf=no
case $target in
*-darwin* | *-aix* | *-cygwin* | *-mingw* | *-aout* | *-*coff* | \
*-darwin* | *-aix* | *-cygwin* | *-msys* | *-mingw* | *-aout* | *-*coff* | \
*-msdosdjgpp* | *-vms* | *-wince* | *-*-pe* | \
alpha*-dec-osf* | hppa[12]*-*-hpux* | \
nvptx-*-none)
Expand All @@ -6210,7 +6210,7 @@ if test $target_elf = yes; then :
else
if test x"$default_enable_lto" = x"yes" ; then
case $target in
*-apple-darwin9* | *-cygwin* | *-mingw* | *djgpp*) ;;
*-apple-darwin9* | *-cygwin* | *-msys* | *-mingw* | *djgpp*) ;;
# On other non-ELF platforms, LTO has yet to be validated.
*) enable_lto=no ;;
esac
Expand All @@ -6221,7 +6221,7 @@ else
# warn during gcc/ subconfigure; unless you're bootstrapping with
# -flto it won't be needed until after installation anyway.
case $target in
*-cygwin* | *-mingw* | *-apple-darwin* | *djgpp*) ;;
*-cygwin* | *-msys* | *-mingw* | *-apple-darwin* | *djgpp*) ;;
*) if test x"$enable_lto" = x"yes"; then
as_fn_error $? "LTO support is not enabled for this target." "$LINENO" 5
fi
Expand All @@ -6231,7 +6231,7 @@ else
# Among non-ELF, only Windows platforms support the lto-plugin so far.
# Build it unless LTO was explicitly disabled.
case $target in
*-cygwin* | *-mingw*) build_lto_plugin=$enable_lto ;;
*-cygwin* | *-msys* | *-mingw*) build_lto_plugin=$enable_lto ;;
*) ;;
esac

Expand Down Expand Up @@ -7102,7 +7102,7 @@ rm -f conftest*
case "${host}" in
*-*-hpux*) RPATH_ENVVAR=SHLIB_PATH ;;
*-*-darwin*) RPATH_ENVVAR=DYLD_LIBRARY_PATH ;;
*-*-mingw* | *-*-cygwin ) RPATH_ENVVAR=PATH ;;
*-*-mingw* | *-*-cygwin | *-msys ) RPATH_ENVVAR=PATH ;;
*) RPATH_ENVVAR=LD_LIBRARY_PATH ;;
esac

Expand Down Expand Up @@ -7620,7 +7620,7 @@ case " $target_configdirs " in
case " $target_configargs " in
*" --with-newlib "*)
case "$target" in
*-cygwin*)
*-cygwin* | *-msys*)
FLAGS_FOR_TARGET=$FLAGS_FOR_TARGET' -L$$r/$(TARGET_SUBDIR)/winsup/cygwin -isystem $$s/winsup/cygwin/include'
;;
esac
Expand Down
Loading

0 comments on commit 5b45686

Please sign in to comment.