diff options
author | Mike Frysinger <vapier@gentoo.org> | 2015-12-12 18:24:22 -0500 |
---|---|---|
committer | Mike Frysinger <vapier@gentoo.org> | 2015-12-12 18:24:37 -0500 |
commit | e5b24d52ab056fffa21763d8a8ed09c04f4ce539 (patch) | |
tree | 9f514a4232a4bc0264c44b7d61ef7084feed9af6 /sys-apps/memtest86+ | |
parent | sys-apps/memtest+: drop version 5.01 (diff) | |
download | gentoo-e5b24d52ab056fffa21763d8a8ed09c04f4ce539.tar.gz gentoo-e5b24d52ab056fffa21763d8a8ed09c04f4ce539.tar.bz2 gentoo-e5b24d52ab056fffa21763d8a8ed09c04f4ce539.zip |
sys-apps/memtest+: fix building w/gcc-5 #548312
Diffstat (limited to 'sys-apps/memtest86+')
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 ff9b15a9e4e1..b793c326b262 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 000000000000..8dc13b1307f5 --- /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 000000000000..a121fdecd75a --- /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 1232c12688c4..aa4a848888c7 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 root@192.168.0.12:\/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 \ |