[packages/kernel] - fix orc_dump build on x32

arekm arekm at pld-linux.org
Mon Nov 13 09:39:32 CET 2017


commit 778e721c1a2eedb28312242b051a31c1f21ebce4
Author: Arkadiusz Miśkiewicz <arekm at maven.pl>
Date:   Mon Nov 13 09:39:29 2017 +0100

    - fix orc_dump build on x32

 kernel-small_fixes.patch | 44 ++++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 44 insertions(+)
---
diff --git a/kernel-small_fixes.patch b/kernel-small_fixes.patch
index 28517b8b..81d01fa5 100644
--- a/kernel-small_fixes.patch
+++ b/kernel-small_fixes.patch
@@ -27,3 +27,47 @@
  			fi
  		done
 
+; kernel-orc.patch
+Index: linux-2.6/tools/objtool/orc_dump.c
+===================================================================
+--- linux-2.6.orig/tools/objtool/orc_dump.c
++++ linux-2.6/tools/objtool/orc_dump.c
+@@ -76,7 +76,8 @@ int orc_dump(const char *_objname)
+ 	int fd, nr_entries, i, *orc_ip = NULL, orc_size = 0;
+ 	struct orc_entry *orc = NULL;
+ 	char *name;
+-	unsigned long nr_sections, orc_ip_addr = 0;
++	size_t nr_sections;
++	Elf64_Addr orc_ip_addr = 0;
+ 	size_t shstrtab_idx;
+ 	Elf *elf;
+ 	Elf_Scn *scn;
+@@ -187,10 +188,10 @@ int orc_dump(const char *_objname)
+ 				return -1;
+ 			}
+ 
+-			printf("%s+%lx:", name, rela.r_addend);
++			printf("%s+%llx:", name, (unsigned long long)rela.r_addend);
+ 
+ 		} else {
+-			printf("%lx:", orc_ip_addr + (i * sizeof(int)) + orc_ip[i]);
++			printf("%llx:", (unsigned long long)(orc_ip_addr + (i * sizeof(int)) + orc_ip[i]));
+ 		}
+ 
+ 
+Index: linux-2.6/tools/objtool/Makefile
+===================================================================
+--- linux-2.6.orig/tools/objtool/Makefile
++++ linux-2.6/tools/objtool/Makefile
+@@ -7,8 +7,9 @@ ARCH := x86
+ endif
+ 
+ # always use the host compiler
+-CC = gcc
+-LD = ld
++CC = $(HOSTCC)
++HOSTLD ?= ld
++LD = $(HOSTLD)
+ AR = ar
+ 
+ ifeq ($(srctree),)
================================================================

---- gitweb:

http://git.pld-linux.org/gitweb.cgi/packages/kernel.git/commitdiff/778e721c1a2eedb28312242b051a31c1f21ebce4



More information about the pld-cvs-commit mailing list