Accepting request 243156 from home:coolo:branches:openSUSE:Factory

- make it work by picking patches from Fedora - memtest doesn't like
  optimizations with newer compilers.
  See https://bugs.mageia.org/show_bug.cgi?id=11661 and fedora bugs.
- Added patches (all from fedora pkg):
   memtest86+-5.01-array-size-fix.patch
   memtest86+-5.01-compile-fix.patch
   memtest86+-5.01-no-optimization.patch

OBS-URL: https://build.opensuse.org/request/show/243156
OBS-URL: https://build.opensuse.org/package/show/Base:System/memtest86+?expand=0&rev=22
This commit is contained in:
Dirk Mueller 2014-07-31 15:39:20 +00:00 committed by Git OBS Bridge
parent 37d967713d
commit a7827ead44
5 changed files with 70 additions and 16 deletions

View File

@ -0,0 +1,20 @@
--- memtest86+-5.01/controller.c~ 2013-08-10 02:01:58.000000000 +0000
+++ memtest86+-5.01/controller.c 2013-12-12 20:58:12.873555378 +0000
@@ -292,7 +292,7 @@
/* First, locate the PCI bus where the MCH is located */
- for(i = 0; i < sizeof(possible_nhm_bus); i++) {
+ for(i = 0; i < sizeof(possible_nhm_bus) / sizeof(possible_nhm_bus[0]); i++) {
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;
@@ -327,7 +327,7 @@
ctrl.mode = ECC_NONE;
/* First, locate the PCI bus where the MCH is located */
- for(i = 0; i < sizeof(possible_nhm_bus); i++) {
+ for(i = 0; i < sizeof(possible_nhm_bus) / sizeof(possible_nhm_bus[0]); i++) {
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;

View File

@ -0,0 +1,20 @@
--- memtest86+-5.01/io.h~ 2013-08-10 02:01:58.000000000 +0000
+++ memtest86+-5.01/io.h 2014-01-08 01:29:12.404465515 +0000
@@ -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##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"

View File

@ -0,0 +1,11 @@
--- memtest86+-5.01/Makefile~ 2014-01-08 01:30:11.355900076 +0000
+++ memtest86+-5.01/Makefile 2014-01-08 01:31:19.387555469 +0000
@@ -12,7 +12,7 @@
AS=as -32
CC=gcc
-CFLAGS= -Wall -march=i486 -m32 -O1 -fomit-frame-pointer -fno-builtin \
+CFLAGS= -Wall -march=i486 -m32 -O0 -fomit-frame-pointer -fno-builtin \
-ffreestanding -fPIC $(SMP_FL) -fno-stack-protector
OBJS= head.o reloc.o main.o test.o init.o lib.o patn.o screen_buffer.o \

View File

@ -1,3 +1,16 @@
-------------------------------------------------------------------
Thu Jul 31 12:26:33 UTC 2014 - coolo@suse.com
- make it work by picking patches from Fedora - memtest doesn't like
optimizations with newer compilers.
See https://bugs.mageia.org/show_bug.cgi?id=11661 and fedora bugs.
- Added patches (all from fedora pkg):
memtest86+-5.01-array-size-fix.patch
memtest86+-5.01-compile-fix.patch
memtest86+-5.01-no-optimization.patch
-------------------------------------------------------------------
Thu Nov 7 10:57:28 UTC 2013 - duwe@suse.com

View File

@ -16,7 +16,6 @@
#
Name: memtest86+
Version: 5.01
Release: 0
@ -37,6 +36,9 @@ Provides: memtest86 > 3.2
Url: http://www.memtest.org
Source: http://www.memtest.org/download/%{version}/%{name}-%{version}.tar.gz
Patch0: fix-destdir
Patch1: memtest86+-5.01-no-optimization.patch
Patch2: memtest86+-5.01-compile-fix.patch
Patch3: memtest86+-5.01-array-size-fix.patch
Summary: Memory Testing Image for x86 Architecture
License: BSD-3-Clause
Group: System/Boot
@ -45,24 +47,12 @@ Group: System/Boot
Memtest86 is an image that can be booted instead of a real OS. Once
booted, it can be used to test the computer's memory.
Authors:
--------
Samuel Demeulemeester <memtest@memtest.org>
Original memtest86 package:
John Coffman <JohnInSD@san.rr.com>
Werner Almesberger <Werner.Almesberger@epfl.ch>
PowerPC part:
Paul Mackeras <paulus@samba.org>
Cort Dougan <cort@fsmlabs.com>
Benjamin Herrenschmidt <benh@kernel.crashing.org>
Memtest86:
Chris Brady <crsbrady@earthlink.net>
%prep
%setup
%patch0 -p1
%patch1 -p1
%patch2 -p1
%patch3 -p1
%build
make