patch build error on ppc64le

This commit is contained in:
mio 2024-09-10 15:17:50 +00:00 committed by Natanael Copa
parent ddaa55f760
commit a9dc289080
2 changed files with 39 additions and 1 deletions

View file

@ -8,7 +8,9 @@ arch="all"
license="MIT"
subpackages="$pkgname-doc"
makedepends="xorg-server-dev libxi-dev util-macros xorgproto"
source="https://www.x.org/releases/individual/driver/xf86-video-nv-$pkgver.tar.xz"
source="https://www.x.org/releases/individual/driver/xf86-video-nv-$pkgver.tar.xz
gcc14-revert-fix-nv-powerpc.patch
"
build() {
export CFLAGS="${CFLAGS/-fno-plt}"
@ -32,4 +34,5 @@ package() {
sha512sums="
ce09f37bd29bbe588a8788d643240c9b0324654ea37b8e7f0f127494999f24b3048ca0c7ea91b33ef94efd12b570bfb73c8a5e20bf63749b01cbdc5669136b9e xf86-video-nv-2.1.23.tar.xz
3c127965791203a2e1d18eb3acff5516d93e3e3ffaa146f0fcb476d4e4cd9a1b10ad0438821bdbf1bbfc5e60a72ea6c304e0d39f12bef0a312822d7d219ecd6b gcc14-revert-fix-nv-powerpc.patch
"

View file

@ -0,0 +1,35 @@
Temporarily revert "fix for nv on powerpc" upstream commit as it introduced a
-Wint-conversion error with gcc 14 on ppc64le.
See also: https://gitlab.freedesktop.org/xorg/driver/xf86-video-nv/-/commit/1b735e8c9681dcccd54ea0295c4853763dabb8d1
```
nv_driver.c: In function 'NVPreInit':
nv_driver.c:1547:43: error: passing argument 2 of 'vgaHWSetMmioFuncs' makes
pointer from integer without a cast [-Wint-conversion]
1547 | vgaHWSetMmioFuncs(VGAHWPTR(pScrn), pNv->IOAddress, 0);
| ~~~^~~~~~~~~~~
| |
| CARD32 {aka unsigned int}
In file included from nv_include.h:52,
from nv_driver.c:31:
/usr/include/xorg/vgaHW.h:185:62: note: expected 'CARD8 *' {aka 'unsigned char
*'} but argument is of type 'CARD32' {aka 'unsigned int'}
185 | extern _X_EXPORT void vgaHWSetMmioFuncs(vgaHWPtr hwp, CARD8 *base, int offset);
| ~~~~~~~^~~~
```
--- xf86-video-nv-2.1.23-origin/src/nv_driver.c
+++ xf86-video-nv-2.1.23/src/nv_driver.c
@@ -1543,11 +1543,7 @@
xf86FreeInt10(pNv->pInt);
return FALSE;
}
-#ifdef __powerpc__ /* XXX probably MI */
- vgaHWSetMmioFuncs(VGAHWPTR(pScrn), pNv->IOAddress, 0);
-#else
vgaHWSetStdFuncs(VGAHWPTR(pScrn));
-#endif
/* We use a programmable clock */
pScrn->progClock = TRUE;