msys2-w32api: update to 13.0.0
This commit is contained in:
parent
38be34d51d
commit
c53216a8c6
@ -1,70 +0,0 @@
|
|||||||
From 006dd2f19262c89ebbd0f4f2b920825783e7c107 Mon Sep 17 00:00:00 2001
|
|
||||||
From: LIU Hao <lh_mouse@126.com>
|
|
||||||
Date: Wed, 29 Jun 2022 07:38:24 -0700
|
|
||||||
Subject: [PATCH] Work around -Warray-bounds warning for __readfsdword and
|
|
||||||
__readgsqword
|
|
||||||
MIME-Version: 1.0
|
|
||||||
Content-Type: text/plain; charset=UTF-8
|
|
||||||
Content-Transfer-Encoding: 8bit
|
|
||||||
|
|
||||||
在 2022-06-29 19:51, Ozkan Sezer 写道:
|
|
||||||
|
|
||||||
Noticed this in github CI runs of vkQuake. Is the warning bogus?
|
|
||||||
|
|
||||||
D:/a/_temp/msys64/mingw32/include/psdk_inc/intrin-impl.h:2164:1:
|
|
||||||
warning: array subscript 0 is outside array bounds of 'long unsigned int[0]' [-Warray-bounds]
|
|
||||||
2164 | __buildreadseg(__readfsdword, unsigned __LONG32, "fs", "l")
|
|
||||||
| ^~~~~~~~~~~~~~
|
|
||||||
|
|
||||||
I have been aware of this too. The asm statement is passed an
|
|
||||||
indirection by a constant offset in the FS/GS segment, which itself is
|
|
||||||
valid, but GCC thinks it was about the default DS segment and fails to
|
|
||||||
calculate its size.
|
|
||||||
|
|
||||||
This may be solved for GCC by casting the input offset to a pointer to
|
|
||||||
an array of unknown bound. So instead of writing
|
|
||||||
|
|
||||||
[offset] "m" ((*(y *) (size_t) Offset))
|
|
||||||
|
|
||||||
we write
|
|
||||||
|
|
||||||
[offset] "m" ((*(y (*)[]) (size_t) Offset))
|
|
||||||
|
|
||||||
Unfortunately Clang does not like this:
|
|
||||||
|
|
||||||
test.c:5:53: error: dereference of pointer to incomplete type 'unsigned long[]'
|
|
||||||
|
|
||||||
Let's guard this so that only newer GCC sees this.
|
|
||||||
|
|
||||||
Proposed-in: https://sourceforge.net/p/mingw-w64/mailman/message/37674508/
|
|
||||||
Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
|
|
||||||
---
|
|
||||||
mingw-w64-headers/include/psdk_inc/intrin-impl.h | 8 +++++++-
|
|
||||||
1 file changed, 7 insertions(+), 1 deletion(-)
|
|
||||||
|
|
||||||
diff --git a/mingw-w64-headers/include/psdk_inc/intrin-impl.h b/mingw-w64-headers/include/psdk_inc/intrin-impl.h
|
|
||||||
index 24624a501..2dbd0002c 100644
|
|
||||||
--- a/mingw-w64-headers/include/psdk_inc/intrin-impl.h
|
|
||||||
+++ b/mingw-w64-headers/include/psdk_inc/intrin-impl.h
|
|
||||||
@@ -217,11 +217,17 @@ Parameters: (FunctionName, DataType, Segment)
|
|
||||||
Type: b, w, l, q
|
|
||||||
*/
|
|
||||||
|
|
||||||
+#if defined(__GNUC__) && __GNUC__ > 11
|
|
||||||
+#define __buildreadseg_star (*)[]
|
|
||||||
+#else
|
|
||||||
+#define __buildreadseg_star *
|
|
||||||
+#endif
|
|
||||||
+
|
|
||||||
#define __buildreadseg(x, y, z, a) y x(unsigned __LONG32 Offset) { \
|
|
||||||
y ret; \
|
|
||||||
__asm__ ("mov{" a " %%" z ":%[offset], %[ret] | %[ret], %%" z ":%[offset]}" \
|
|
||||||
: [ret] "=r" (ret) \
|
|
||||||
- : [offset] "m" ((*(y *) (size_t) Offset))); \
|
|
||||||
+ : [offset] "m" ((*(y __buildreadseg_star) (size_t) Offset))); \
|
|
||||||
return ret; \
|
|
||||||
}
|
|
||||||
|
|
||||||
--
|
|
||||||
2.43.0
|
|
||||||
|
|
||||||
@ -1,8 +1,8 @@
|
|||||||
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
|
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
|
||||||
|
|
||||||
pkgname="msys2-w32api-headers"
|
pkgname="msys2-w32api-headers"
|
||||||
pkgver=12.0.0.r0.g819a6ec2e
|
pkgver=13.0.0.r0.gde62c283f
|
||||||
pkgrel=2
|
pkgrel=1
|
||||||
pkgdesc="Win32 API headers for MSYS2 32bit toolchain"
|
pkgdesc="Win32 API headers for MSYS2 32bit toolchain"
|
||||||
arch=('i686' 'x86_64')
|
arch=('i686' 'x86_64')
|
||||||
url="https://mingw-w64.sourceforge.io/"
|
url="https://mingw-w64.sourceforge.io/"
|
||||||
@ -15,11 +15,9 @@ else
|
|||||||
makedepends+=('mingw-w64-cross-mingw64-gcc')
|
makedepends+=('mingw-w64-cross-mingw64-gcc')
|
||||||
fi
|
fi
|
||||||
options=('staticlibs' '!buildflags')
|
options=('staticlibs' '!buildflags')
|
||||||
_commit='819a6ec2ea87c19814b287e21d65e0dc7f05abba'
|
_commit='de62c283f3383bd825c98518cb0a42ba071d4ac2'
|
||||||
source=("mingw-w64"::"git+https://git.code.sf.net/p/mingw-w64/mingw-w64#commit=$_commit"
|
source=("mingw-w64"::"git+https://git.code.sf.net/p/mingw-w64/mingw-w64#commit=$_commit")
|
||||||
"0001-Work-around-Warray-bounds-warning-for-__readfsdword-.patch")
|
sha256sums=('be06c383a44f9ccb0da7884e72b3ecffb503e2bddc10ce2b7eb1e0fa9fa08d6f')
|
||||||
sha256sums=('41878f44fe3b6c347fc99ab8a90d384f61bd3ae25cfb2a62a7e24d4f0d14f720'
|
|
||||||
'189dd0f614caae1428e1d3a06bc3ac436d26afd9cbdbd1a7ce58b1ee6478ff3f')
|
|
||||||
msys2_references=(
|
msys2_references=(
|
||||||
'cygwin: w32api-runtime'
|
'cygwin: w32api-runtime'
|
||||||
'cpe: cpe:/a:mingw-w64:mingw-w64'
|
'cpe: cpe:/a:mingw-w64:mingw-w64'
|
||||||
@ -32,8 +30,6 @@ pkgver() {
|
|||||||
|
|
||||||
prepare() {
|
prepare() {
|
||||||
cd ${srcdir}/mingw-w64
|
cd ${srcdir}/mingw-w64
|
||||||
|
|
||||||
patch -Np1 -i "${srcdir}"/0001-Work-around-Warray-bounds-warning-for-__readfsdword-.patch
|
|
||||||
}
|
}
|
||||||
|
|
||||||
build() {
|
build() {
|
||||||
|
|||||||
@ -1,8 +1,8 @@
|
|||||||
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
|
# Maintainer: Alexey Pavlov <alexpux@gmail.com>
|
||||||
|
|
||||||
pkgname="msys2-w32api-runtime"
|
pkgname="msys2-w32api-runtime"
|
||||||
pkgver=12.0.0.r0.g819a6ec2e
|
pkgver=13.0.0.r0.gde62c283f
|
||||||
pkgrel=2
|
pkgrel=1
|
||||||
pkgdesc="Win32 API import libs for MSYS2 toolchain"
|
pkgdesc="Win32 API import libs for MSYS2 toolchain"
|
||||||
arch=('i686' 'x86_64')
|
arch=('i686' 'x86_64')
|
||||||
url="https://mingw-w64.sourceforge.io/"
|
url="https://mingw-w64.sourceforge.io/"
|
||||||
@ -15,9 +15,9 @@ if [[ "${CARCH}" == 'i686' ]]; then
|
|||||||
else
|
else
|
||||||
makedepends+=('mingw-w64-cross-mingw64-gcc')
|
makedepends+=('mingw-w64-cross-mingw64-gcc')
|
||||||
fi
|
fi
|
||||||
_commit='819a6ec2ea87c19814b287e21d65e0dc7f05abba'
|
_commit='de62c283f3383bd825c98518cb0a42ba071d4ac2'
|
||||||
source=('mingw-w64'::"git+https://git.code.sf.net/p/mingw-w64/mingw-w64#commit=$_commit")
|
source=('mingw-w64'::"git+https://git.code.sf.net/p/mingw-w64/mingw-w64#commit=$_commit")
|
||||||
sha256sums=('41878f44fe3b6c347fc99ab8a90d384f61bd3ae25cfb2a62a7e24d4f0d14f720')
|
sha256sums=('be06c383a44f9ccb0da7884e72b3ecffb503e2bddc10ce2b7eb1e0fa9fa08d6f')
|
||||||
msys2_references=(
|
msys2_references=(
|
||||||
'cygwin: w32api-runtime'
|
'cygwin: w32api-runtime'
|
||||||
'cpe: cpe:/a:mingw-w64:mingw-w64'
|
'cpe: cpe:/a:mingw-w64:mingw-w64'
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user