diff options
author | Chí-Thanh Christopher Nguyễn <chithanh@gentoo.org> | 2013-09-11 21:14:08 +0000 |
---|---|---|
committer | Chí-Thanh Christopher Nguyễn <chithanh@gentoo.org> | 2013-09-11 21:14:08 +0000 |
commit | 1c488a2e22545bc75a71fa13473a22c436311384 (patch) | |
tree | 083cf33ca0eb4e73bafb77606a2f7a7671ac0a83 /x11-base/xorg-server/files | |
parent | 2.2.3 version bump. This fixes a regression in 2.2.2 which caused (diff) | |
download | historical-1c488a2e22545bc75a71fa13473a22c436311384.tar.gz historical-1c488a2e22545bc75a71fa13473a22c436311384.tar.bz2 historical-1c488a2e22545bc75a71fa13473a22c436311384.zip |
Fix building with gcc-4.8 and -O3, bug #472058. Apply patches for ia64, bug #447152.
Package-Manager: portage-2.2.1/cvs/Linux x86_64
Diffstat (limited to 'x11-base/xorg-server/files')
3 files changed, 147 insertions, 0 deletions
diff --git a/x11-base/xorg-server/files/xorg-server-1.12-ia64-fix_inx_outx.patch b/x11-base/xorg-server/files/xorg-server-1.12-ia64-fix_inx_outx.patch new file mode 100644 index 000000000000..24a5a02f4fd6 --- /dev/null +++ b/x11-base/xorg-server/files/xorg-server-1.12-ia64-fix_inx_outx.patch @@ -0,0 +1,60 @@ +diff -r --context xorg-server-1.12.3/hw/xfree86/common/compiler.h xorg-server-1.12.3-fix/hw/xfree86/common/compiler.h +*** xorg-server-1.12.3/hw/xfree86/common/compiler.h 2012-07-06 07:17:19.000000000 +0200 +--- xorg-server-1.12.3-fix/hw/xfree86/common/compiler.h 2012-08-29 00:14:39.000000000 +0200 +*************** +*** 421,426 **** +--- 421,474 ---- + #include <machine/pio.h> + #endif /* __NetBSD__ */ + ++ #elif defined(linux) && defined(__ia64__) ++ /* for Linux on ia64, we use the LIBC _inx/_outx routines */ ++ /* note that the appropriate setup via "ioperm" needs to be done */ ++ /* *before* any inx/outx is done. */ ++ ++ extern _X_EXPORT void _outb(unsigned char val, unsigned long port); ++ extern _X_EXPORT void _outw(unsigned short val, unsigned long port); ++ extern _X_EXPORT void _outl(unsigned int val, unsigned long port); ++ extern _X_EXPORT unsigned int _inb(unsigned long port); ++ extern _X_EXPORT unsigned int _inw(unsigned long port); ++ extern _X_EXPORT unsigned int _inl(unsigned long port); ++ ++ static __inline__ void ++ outb(unsigned long port, unsigned char val) ++ { ++ _outb(val, port); ++ } ++ ++ static __inline__ void ++ outw(unsigned long port, unsigned short val) ++ { ++ _outw(val, port); ++ } ++ ++ static __inline__ void ++ outl(unsigned long port, unsigned int val) ++ { ++ _outl(val, port); ++ } ++ ++ static __inline__ unsigned int ++ inb(unsigned long port) ++ { ++ return _inb(port); ++ } ++ ++ static __inline__ unsigned int ++ inw(unsigned long port) ++ { ++ return _inw(port); ++ } ++ ++ static __inline__ unsigned int ++ inl(unsigned long port) ++ { ++ return _inl(port); ++ } ++ + #elif (defined(linux) || defined(__FreeBSD__)) && defined(__amd64__) + + #include <inttypes.h> diff --git a/x11-base/xorg-server/files/xorg-server-1.12-unloadsubmodule.patch b/x11-base/xorg-server/files/xorg-server-1.12-unloadsubmodule.patch new file mode 100644 index 000000000000..57c7349da6a7 --- /dev/null +++ b/x11-base/xorg-server/files/xorg-server-1.12-unloadsubmodule.patch @@ -0,0 +1,53 @@ +diff -u13 -r xorg-server-1.12.3-old/hw/xfree86/loader/loadmod.c xorg-server-1.12.3/hw/xfree86/loader/loadmod.c +--- xorg-server-1.12.3-old/hw/xfree86/loader/loadmod.c 2012-09-05 18:26:42.000000000 +0200 ++++ xorg-server-1.12.3/hw/xfree86/loader/loadmod.c 2012-09-05 18:28:54.000000000 +0200 +@@ -1109,39 +1109,38 @@ + static void + RemoveChild(ModuleDescPtr child) + { + ModuleDescPtr mdp; + ModuleDescPtr prevsib; + ModuleDescPtr parent; + + if (!child->parent) + return; + + parent = child->parent; + if (parent->child == child) { + parent->child = child->sib; +- return; +- } +- +- prevsib = parent->child; +- mdp = prevsib->sib; +- while (mdp && mdp != child) { +- prevsib = mdp; +- mdp = mdp->sib; ++ } ++ else { ++ prevsib = parent->child; ++ mdp = prevsib->sib; ++ while (mdp && mdp != child) { ++ prevsib = mdp; ++ mdp = mdp->sib; ++ } ++ if (mdp == child) ++ prevsib->sib = child->sib; + } +- if (mdp == child) +- prevsib->sib = child->sib; + child->sib = NULL; +- return; + } + + void + LoaderErrorMsg(const char *name, const char *modname, int errmaj, int errmin) + { + const char *msg; + MessageType type = X_ERROR; + + switch (errmaj) { + case LDR_NOERROR: + msg = "no error"; + break; + case LDR_NOMEM: diff --git a/x11-base/xorg-server/files/xorg-server-1.14-kdrive-out-of-bounds-array-access.patch b/x11-base/xorg-server/files/xorg-server-1.14-kdrive-out-of-bounds-array-access.patch new file mode 100644 index 000000000000..f4a3bff66934 --- /dev/null +++ b/x11-base/xorg-server/files/xorg-server-1.14-kdrive-out-of-bounds-array-access.patch @@ -0,0 +1,34 @@ +From af1c57152e10cfa55843e6330cffc6a3c8c517d3 Mon Sep 17 00:00:00 2001 +From: Chris Clayton <chris2553@googlemail.com> +Date: Wed, 04 Sep 2013 05:42:04 +0000 +Subject: kdrive: fix build error on gcc 4.8 for out-of-bounds array access + +I'm getting a error building xorg-server-1.14.1.902 with thelatest snapshot +of gcc-4.8: + +input.c:225:43: error: array subscript is above array bounds +[-Werror=array-bounds] + +This is because kdNumInputFds can become equal to KD_MAX_INPUT_FDS in +KdRegisterFd(). This means that in KdUnregisterFd(), kdInputFds[j + 1] can +be beyond the end of the array. + +Signed-off-by: Chris Clayton <chris2553@googlemail.com> +Reviewed-by: Keith Packard <keithp@keithp.com> +Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> +--- +diff --git a/hw/kdrive/src/kinput.c b/hw/kdrive/src/kinput.c +index b1068bb..09aae44 100644 +--- a/hw/kdrive/src/kinput.c ++++ b/hw/kdrive/src/kinput.c +@@ -221,7 +221,7 @@ KdUnregisterFd(void *closure, int fd, Bool do_close) + if (do_close) + close(kdInputFds[i].fd); + kdNumInputFds--; +- for (j = i; j < kdNumInputFds; j++) ++ for (j = i; j < (kdNumInputFds - 1); j++) + kdInputFds[j] = kdInputFds[j + 1]; + break; + } +-- +cgit v0.9.0.2-2-gbebe |