summaryrefslogtreecommitdiff
path: root/sys-apps/x86info/files
diff options
context:
space:
mode:
Diffstat (limited to 'sys-apps/x86info/files')
-rw-r--r--sys-apps/x86info/files/1.21-pic.patch14
-rw-r--r--sys-apps/x86info/files/x86info-1.29-parallel-make-cleanup.patch12
-rw-r--r--sys-apps/x86info/files/x86info-1.30-fix-build-system.patch12
-rw-r--r--sys-apps/x86info/files/x86info-1.30-makefile.patch72
-rw-r--r--sys-apps/x86info/files/x86info-1.30-pic.patch (renamed from sys-apps/x86info/files/x86info-1.24-pic.patch)8
5 files changed, 75 insertions, 43 deletions
diff --git a/sys-apps/x86info/files/1.21-pic.patch b/sys-apps/x86info/files/1.21-pic.patch
deleted file mode 100644
index 7bf89240c2c0..000000000000
--- a/sys-apps/x86info/files/1.21-pic.patch
+++ /dev/null
@@ -1,14 +0,0 @@
---- a/bench/benchmarks.c
-+++ b/bench/benchmarks.c
-@@ -19,7 +19,10 @@
- #ifdef __linux__
- TIME(asm volatile("int $0x80" :"=a" (tmp) :"0" (__NR_getppid)), "int 0x80");
- #endif
-- TIME(asm volatile("cpuid": : :"ax", "dx", "cx", "bx"), "cpuid");
-+ TIME(asm volatile("movl %%ebx,%%edi\n"
-+ "cpuid\n"
-+ "movl %%edi,%%ebx\n"
-+ : : :"%eax", "%edx", "%ecx", "%edi"), "cpuid");
-
- TIME(asm volatile("addl $1,0(%esp)"), "addl");
- TIME(asm volatile("lock ; addl $1,0(%esp)"), "locked add");
diff --git a/sys-apps/x86info/files/x86info-1.29-parallel-make-cleanup.patch b/sys-apps/x86info/files/x86info-1.29-parallel-make-cleanup.patch
deleted file mode 100644
index a9cec0397fac..000000000000
--- a/sys-apps/x86info/files/x86info-1.29-parallel-make-cleanup.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- a/Makefile
-+++ b/Makefile
-@@ -12,7 +12,8 @@
- LSMSR_TMP_HEADERS=AMD/k8.h AMD/fam10h.h AMD/fam11h.h generic_msr.h
-
- %.h: %.regs scripts/createheader.py
-- python scripts/createheader.py $< `basename $< .regs` >$@
-+ $(PYTHON) scripts/createheader.py $< `basename $< .regs` >$@.tmp ; \
-+ mv $@.tmp $@
-
- LSMSR_SRC = \
- lsmsr.c \
diff --git a/sys-apps/x86info/files/x86info-1.30-fix-build-system.patch b/sys-apps/x86info/files/x86info-1.30-fix-build-system.patch
deleted file mode 100644
index 21034d99edc5..000000000000
--- a/sys-apps/x86info/files/x86info-1.30-fix-build-system.patch
+++ /dev/null
@@ -1,12 +0,0 @@
---- a/Makefile
-+++ b/Makefile
-@@ -1,9 +1,5 @@
- VERSION=1.30
-
--CFLAGS = -g -O2 -Werror -Wall -Wshadow -Wextra -Wmissing-declarations -Wdeclaration-after-statement -Wredundant-decls
--LDFLAGS = -Wl,-z,relro,-z,now
--CC = gcc
--
- SHELL = /bin/sh
-
- all: x86info test lsmsr
diff --git a/sys-apps/x86info/files/x86info-1.30-makefile.patch b/sys-apps/x86info/files/x86info-1.30-makefile.patch
new file mode 100644
index 000000000000..9e1768d68958
--- /dev/null
+++ b/sys-apps/x86info/files/x86info-1.30-makefile.patch
@@ -0,0 +1,72 @@
+--- a/lsmsr/Makefile
++++ b/lsmsr/Makefile
+@@ -40,7 +40,8 @@
+ generic_msr.h
+
+ %.h: %.regs createheader.py
+- @python createheader.py $< `basename $< .regs` >$@
++ $(PYTHON) createheader.py $< `basename $< .regs` >$@.tmp ; \
++ mv $@.tmp $@
+
+ LSMSR_SRC = \
+ lsmsr.c \
+--- a/Makefile
++++ b/Makefile
+@@ -2,7 +2,7 @@
+
+ CFLAGS = -DVERSION="$(VERSION)"
+
+-CFLAGS += -Wall -W -g -O2 -D_FORTIFY_SOURCE=2 -I. -Iinclude
++CFLAGS += -Wall -W -I. -Iinclude
+ ifneq ($(SYSROOT),)
+ CFLAGS += --sysroot=$(SYSROOT)
+ endif
+@@ -18,7 +18,7 @@
+ CFLAGS += -Wswitch-enum
+ CFLAGS += -Wundef
+ CFLAGS += -Wwrite-strings
+-CFLAGS += $(shell pkg-config --cflags libpci)
++CFLAGS += $(shell $$PKG_CONFIG --cflags libpci)
+
+ # gcc specific
+ ifneq ($(shell $(CC) -v 2>&1 | grep -c "clang"), 1)
+@@ -33,20 +33,8 @@
+ CPP_MAJOR := $(shell $(CPP) -dumpversion 2>&1 | cut -d'.' -f1)
+ CPP_MINOR := $(shell $(CPP) -dumpversion 2>&1 | cut -d'.' -f2)
+ DEVEL := $(shell grep VERSION Makefile | head -n1 | grep pre | wc -l)
+-CFLAGS += $(shell if [ $(CPP_MAJOR) -eq 6 -a $(CPP_MINOR) -ge 3 -a $(DEVEL) -eq 1 ] ; then echo "-Werror"; else echo ""; fi)
+
+-LDFLAGS = -Wl,-z,relro,-z,now
+-LDFLAGS += $(shell pkg-config --libs libpci)
+-
+-ifeq ($(CC),"")
+-CC = gcc
+-endif
+-
+-ifdef STATIC_LIBPCI
+-LIBPCI = -Wl,-Bstatic -lpci -Wl,-Bdynamic -lz
+-else
+-LIBPCI = -lpci
+-endif
++LIBS += $(shell $$PKG_CONFIG --libs libpci)
+
+ SHELL = /bin/sh
+
+@@ -68,15 +56,14 @@
+ $(sort $(patsubst %.c,%.o,$(wildcard vendors/*/*.c)))
+
+ x86info: $(X86INFO_OBJS) $(X86INFO_HEADERS)
+- $(QUIET_CC)$(CC) $(CFLAGS) $(LDFLAGS) -o x86info $(X86INFO_OBJS) \
+- $(LIBPCI)
++ $(CC) $(CFLAGS) $(LDFLAGS) -o x86info $(X86INFO_OBJS) $(LIBS)
+
+ DEPDIR= .deps
+ -include $(X86INFO_SRC:%.c=$(DEPDIR)/%.d)
+ df = $(DEPDIR)/$(*D)/$(*F)
+
+ %.o : %.c
+- $(QUIET_CC)$(CC) $(CFLAGS) -o $@ -c $<
++ $(CC) $(CPPFLAGS) $(CFLAGS) -o $@ -c $<
+ @mkdir -p $(DEPDIR)/$(*D)
+ @$(CC) -MM $(CFLAGS) $*.c > $(df).d
+ @mv -f $(df).d $(df).d.tmp
diff --git a/sys-apps/x86info/files/x86info-1.24-pic.patch b/sys-apps/x86info/files/x86info-1.30-pic.patch
index b4098c5c68c2..6288846b48b7 100644
--- a/sys-apps/x86info/files/x86info-1.24-pic.patch
+++ b/sys-apps/x86info/files/x86info-1.30-pic.patch
@@ -1,10 +1,8 @@
-http://bugs.gentoo.org/270388
-
--- a/cpuid.c
+++ b/cpuid.c
-@@ -62,12 +62,28 @@
- sched_setaffinity(getpid(), sizeof(set), &set);
- }
+@@ -25,12 +25,28 @@
+
+ bind_cpu(cpunr);
+#ifdef __PIC__
+ /* GCC on i386 bitches if you clobber ebx. So hide it behind