commit: e5b24d52ab056fffa21763d8a8ed09c04f4ce539
Author: Mike Frysinger <vapier <AT> gentoo <DOT> org>
AuthorDate: Sat Dec 12 23:24:22 2015 +0000
Commit: Mike Frysinger <vapier <AT> gentoo <DOT> org>
CommitDate: Sat Dec 12 23:24:37 2015 +0000
URL: https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=e5b24d52
sys-apps/memtest+: fix building w/gcc-5 #548312
.../memtest86+/files/memtest86+-5.01-gcc-473.patch | 21 ----------------
.../files/memtest86+-5.01-io-extern-inline.patch | 29 ++++++++++++++++++++++
.../files/memtest86+-5.01-reboot-def.patch | 13 ++++++++++
sys-apps/memtest86+/memtest86+-5.01-r1.ebuild | 2 ++
4 files changed, 44 insertions(+), 21 deletions(-)
diff --git a/sys-apps/memtest86+/files/memtest86+-5.01-gcc-473.patch
b/sys-apps/memtest86+/files/memtest86+-5.01-gcc-473.patch
index ff9b15a..b793c32 100644
--- a/sys-apps/memtest86+/files/memtest86+-5.01-gcc-473.patch
+++ b/sys-apps/memtest86+/files/memtest86+-5.01-gcc-473.patch
@@ -19,27 +19,6 @@ diff -Narup memtest86+-5.01-orig/controller.c
memtest86+-5.01/controller.c
pci_conf_read( possible_nhm_bus[i], 3, 4, 0x00, 2, &vid);
pci_conf_read( possible_nhm_bus[i], 3, 4, 0x02, 2, &did);
vid &= 0xFFFF;
-diff -Narup memtest86+-5.01-orig/io.h memtest86+-5.01/io.h
---- memtest86+-5.01-orig/io.h 2013-08-09 22:01:58.000000000 -0400
-+++ memtest86+-5.01/io.h 2014-06-22 11:00:19.279251873 -0400
-@@ -31,7 +31,7 @@
- */
-
- #define __OUT1(s,x) \
--extern inline void __out##s(unsigned x value, unsigned short port) {
-+static inline void __out##s(unsigned x value, unsigned short port) {
-
- #define __OUT2(s,s1,s2) \
- __asm__ __volatile__ ("out" #s " %" s1 "0,%" s2 "1"
-@@ -43,7 +43,7 @@ __OUT1(s##_p,x) __OUT2(s,s1,"w") : : "a"
- __OUT1(s##c_p,x) __OUT2(s,s1,"") : : "a" (value), "id" (port)); SLOW_DOWN_IO;
}
-
- #define __IN1(s) \
--extern inline RETURN_TYPE __in##s(unsigned short port) { RETURN_TYPE _v;
-+static inline RETURN_TYPE __in##s(unsigned short port) { RETURN_TYPE _v;
-
- #define __IN2(s,s1,s2) \
- __asm__ __volatile__ ("in" #s " %" s2 "1,%" s1 "0"
diff -Narup memtest86+-5.01-orig/Makefile memtest86+-5.01/Makefile
--- memtest86+-5.01-orig/Makefile 2013-08-09 22:01:58.000000000 -0400
+++ memtest86+-5.01/Makefile 2014-06-22 10:59:27.463573842 -0400
diff --git a/sys-apps/memtest86+/files/memtest86+-5.01-io-extern-inline.patch
b/sys-apps/memtest86+/files/memtest86+-5.01-io-extern-inline.patch
new file mode 100644
index 0000000..8dc13b1
--- /dev/null
+++ b/sys-apps/memtest86+/files/memtest86+-5.01-io-extern-inline.patch
@@ -0,0 +1,29 @@
+the meaning of extern inline changed between standards. use static inline
+for these tiny I/O functions everywhere to keep things simple.
+
+--- a/io.h
++++ b/io.h
+@@ -31,6 +31,6 @@
+ */
+
+ #define __OUT1(s,x) \
+-extern inline void __out##s(unsigned x value, unsigned short port) {
++static inline void __out##s(unsigned x value, unsigned short port) {
+
+ #define __OUT2(s,s1,s2) \
+@@ -43,6 +43,6 @@
+ __OUT1(s##c_p,x) __OUT2(s,s1,"") : : "a" (value), "id" (port)); SLOW_DOWN_IO;
}
+
+ #define __IN1(s) \
+-extern inline RETURN_TYPE __in##s(unsigned short port) { RETURN_TYPE _v;
++static inline RETURN_TYPE __in##s(unsigned short port) { RETURN_TYPE _v;
+
+ #define __IN2(s,s1,s2) \
+@@ -55,6 +55,6 @@
+ __IN1(s##c_p) __IN2(s,s1,"") : "=a" (_v) : "id" (port) ,##i ); SLOW_DOWN_IO;
return _v; }
+
+ #define __OUTS(s) \
+-extern inline void outs##s(unsigned short port, const void * addr, unsigned
long count) \
++static inline void outs##s(unsigned short port, const void * addr, unsigned
long count) \
+ { __asm__ __volatile__ ("cld ; rep ; outs" #s \
+ : "=S" (addr), "=c" (count) : "d" (port),"0" (addr),"1" (count)); }
diff --git a/sys-apps/memtest86+/files/memtest86+-5.01-reboot-def.patch
b/sys-apps/memtest86+/files/memtest86+-5.01-reboot-def.patch
new file mode 100644
index 0000000..a121fde
--- /dev/null
+++ b/sys-apps/memtest86+/files/memtest86+-5.01-reboot-def.patch
@@ -0,0 +1,13 @@
+the reboot func is used elsewhere, so don't mark it inline
+
+--- a/lib.c
++++ b/lib.c
+@@ -33,7 +33,7 @@ struct ascii_map_str {
+ int keycode;
+ };
+
+-inline void reboot(void)
++void reboot(void)
+ {
+
+ /* tell the BIOS to do a cold start */
diff --git a/sys-apps/memtest86+/memtest86+-5.01-r1.ebuild
b/sys-apps/memtest86+/memtest86+-5.01-r1.ebuild
index 1232c12..aa4a848 100644
--- a/sys-apps/memtest86+/memtest86+-5.01-r1.ebuild
+++ b/sys-apps/memtest86+/memtest86+-5.01-r1.ebuild
@@ -27,6 +27,8 @@ src_prepare() {
sed -e "s/scp memtest.bin [email protected]:\/srv\/tftp\/mt86plus//g"
-i Makefile
epatch "${FILESDIR}/${P}-gcc-473.patch" \
"${FILESDIR}/${P}-hardcoded_cc.patch"
+ epatch "${FILESDIR}"/${P}-io-extern-inline.patch #548312
+ epatch "${FILESDIR}"/${P}-reboot-def.patch #548312
if use serial ; then
sed -i \