Switched back to latest distro gcc
This commit is contained in:
parent
f8eb731d4a
commit
fad75a9a46
@ -1,36 +0,0 @@
|
||||
diff -up memtest86+-4.20/test.c.test memtest86+-4.20/test.c
|
||||
--- memtest86+-4.20/test.c.test 2011-01-23 19:11:04.000000000 +0100
|
||||
+++ memtest86+-4.20/test.c 2012-03-22 14:21:27.737524043 +0100
|
||||
@@ -260,7 +260,7 @@ void movinvr()
|
||||
int i, j, done, seed1, seed2;
|
||||
volatile ulong *pe;
|
||||
volatile ulong *start,*end;
|
||||
- ulong num;
|
||||
+ ulong num, bad;
|
||||
uintptr_t seg_start;
|
||||
|
||||
/* Initialize memory with initial sequence of random numbers. */
|
||||
@@ -296,12 +296,12 @@ void movinvr()
|
||||
break;
|
||||
}
|
||||
/* Original C code replaced with hand tuned assembly code */
|
||||
-/*
|
||||
+
|
||||
for (; p < pe; p++) {
|
||||
*p = rand();
|
||||
}
|
||||
- */
|
||||
|
||||
+/*
|
||||
asm __volatile__ (
|
||||
"jmp L200\n\t"
|
||||
".p2align 4,,7\n\t"
|
||||
@@ -315,7 +315,7 @@ void movinvr()
|
||||
: "D" (p), "b" (pe)
|
||||
: "eax", "edx"
|
||||
);
|
||||
-
|
||||
+*/
|
||||
do_tick();
|
||||
BAILR
|
||||
} while (!done);
|
20
memtest86+-5.01-array-size-fix.patch
Normal file
20
memtest86+-5.01-array-size-fix.patch
Normal 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;
|
20
memtest86+-5.01-compile-fix.patch
Normal file
20
memtest86+-5.01-compile-fix.patch
Normal 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"
|
11
memtest86+-5.01-no-optimization.patch
Normal file
11
memtest86+-5.01-no-optimization.patch
Normal 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 \
|
@ -1,35 +0,0 @@
|
||||
diff --git a/Makefile b/Makefile
|
||||
index 4b2855b..bd55c1c 100644
|
||||
--- a/Makefile
|
||||
+++ b/Makefile
|
||||
@@ -10,10 +10,10 @@
|
||||
FDISK=/dev/fd0
|
||||
|
||||
AS=as -32
|
||||
-CC=gcc
|
||||
+CC=gcc34
|
||||
|
||||
CFLAGS= -Wall -march=i486 -m32 -O1 -fomit-frame-pointer -fno-builtin \
|
||||
- -ffreestanding -fPIC $(SMP_FL) -fno-stack-protector
|
||||
+ -ffreestanding -fPIC $(SMP_FL)
|
||||
|
||||
OBJS= head.o reloc.o main.o test.o init.o lib.o patn.o screen_buffer.o \
|
||||
config.o cpuid.o linuxbios.o pci.o memsize.o spd.o error.o dmi.o controller.o \
|
||||
diff --git a/init.c b/init.c
|
||||
index 754b8d7..788c9ce 100644
|
||||
--- a/init.c
|
||||
+++ b/init.c
|
||||
@@ -637,11 +637,11 @@ void smp_default_mode(void)
|
||||
for(i = 0; i < 3; i++)
|
||||
{
|
||||
result = strstr(cpupsn , disabledcpu[i]);
|
||||
- if(result != -1) { v->fail_safe |= 0b10; }
|
||||
+ if(result != -1) { v->fail_safe |= 2; }
|
||||
}
|
||||
|
||||
// For 5.01 release, SMP disabled by defualt by config.h toggle
|
||||
- if(CONSERVATIVE_SMP) { v->fail_safe |= 0b10; }
|
||||
+ if(CONSERVATIVE_SMP) { v->fail_safe |= 2; }
|
||||
|
||||
}
|
||||
|
@ -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@redhat.com> - 5.01-2
|
||||
- Switched back to latest distro gcc
|
||||
|
||||
* Mon Feb 17 2014 Jaroslav Škarvada <jskarvad@redhat.com> - 5.01-1
|
||||
- New version
|
||||
Resolves: rhbz#1013110
|
||||
|
Loading…
Reference in New Issue
Block a user