[memtest86+] Switched back to latest distro gcc
Jaroslav Škarvada
jskarvad at fedoraproject.org
Thu Apr 3 15:35:53 UTC 2014
commit fad75a9a46fd1790cae8805afd4454ebf21771b4
Author: Jaroslav Škarvada <jskarvad at redhat.com>
Date: Thu Apr 3 17:35:37 2014 +0200
Switched back to latest distro gcc
memtest86+-4.20-gcc47-test7-workaround.patch | 36 --------------------------
memtest86+-5.01-array-size-fix.patch | 20 ++++++++++++++
memtest86+-5.01-compile-fix.patch | 20 ++++++++++++++
memtest86+-5.01-no-optimization.patch | 11 ++++++++
memtest86+-5.01-use-gcc34.patch | 35 -------------------------
memtest86+.spec | 30 +++++++++++----------
6 files changed, 67 insertions(+), 85 deletions(-)
---
diff --git a/memtest86+-5.01-array-size-fix.patch b/memtest86+-5.01-array-size-fix.patch
new file mode 100644
index 0000000..fdecd97
--- /dev/null
+++ b/memtest86+-5.01-array-size-fix.patch
@@ -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;
diff --git a/memtest86+-5.01-compile-fix.patch b/memtest86+-5.01-compile-fix.patch
new file mode 100644
index 0000000..f178259
--- /dev/null
+++ b/memtest86+-5.01-compile-fix.patch
@@ -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"
diff --git a/memtest86+-5.01-no-optimization.patch b/memtest86+-5.01-no-optimization.patch
new file mode 100644
index 0000000..76815a9
--- /dev/null
+++ b/memtest86+-5.01-no-optimization.patch
@@ -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 \
diff --git a/memtest86+.spec b/memtest86+.spec
index 6503dbd..03e4705 100644
--- a/memtest86+.spec
+++ b/memtest86+.spec
@@ -7,7 +7,7 @@
Name: memtest86+
Version: 5.01
-Release: 1%{?dist}
+Release: 2%{?dist}
License: GPLv2
Summary: Stand-alone memory tester for x86 and x86-64 computers
Group: System Environment/Base
@@ -15,17 +15,19 @@ Source0: http://www.memtest.org/download/%{version}/%{name}-%{version}.tar.gz
Source1: memtest-setup
Source2: new-memtest-pkg
Source3: 20_memtest86+
-Patch0: memtest86+-4.20-gcc47-test7-workaround.patch
-# workaround wor the rhbz#1013110
-Patch1: memtest86+-5.01-use-gcc34.patch
# reported upstream
-Patch2: memtest86+-5.01-no-scp.patch
+Patch0: memtest86+-5.01-no-scp.patch
+# patches to get memtest86+ working with gcc-4.7.2 or later + PCI scan fix
+# these patches were taken from Mageia
+# upstream report containing link to the patches:
+# http://forum.canardpc.com/threads/83443-Memtest86-V5.01-crashes-with-gcc-4.7.2-or-later
+Patch1: memtest86+-5.01-no-optimization.patch
+Patch2: memtest86+-5.01-compile-fix.patch
+Patch3: memtest86+-5.01-array-size-fix.patch
URL: http://www.memtest.org
BuildRoot: %{_tmppath}/%{name}-%{version}-%{release}-root-%(%{__id_u} -n)
# require glibc-devel.i386 via this file:
BuildRequires: %{_includedir}/gnu/stubs-32.h
-# workaround for the rhbz#1013110
-BuildRequires: compat-gcc-34
Requires: grubby sed coreutils util-linux
ExclusiveArch: %{ix86} x86_64
@@ -46,13 +48,10 @@ to add the %{name} entry to your GRUB boot menu.
%prep
%setup -q
-# We do not need this workaround with gcc-3.4
-# but letting the patch in the git in case we later
-# switch to the up-to-date gcc
-#%patch0 -p1 -b .gcc47-test7-workaround
-
-%patch1 -p1 -b .use-gcc34
-%patch2 -p1 -b .no-scp
+%patch0 -p1 -b .no-scp
+%patch1 -p1 -b .no-optimization
+%patch2 -p1 -b .compile-fix
+%patch3 -p1 -b .array-size-fix
sed -i -e's,0x5000,0x100000,' memtest.lds
%ifarch x86_64
@@ -112,6 +111,9 @@ rm -rf %{buildroot}
%{_sbindir}/memtest-setup
%changelog
+* Thu Apr 3 2014 Jaroslav Škarvada <jskarvad at redhat.com> - 5.01-2
+- Switched back to latest distro gcc
+
* Mon Feb 17 2014 Jaroslav Škarvada <jskarvad at redhat.com> - 5.01-1
- New version
Resolves: rhbz#1013110
More information about the scm-commits
mailing list