diff --git a/board/intel/galileo/patches/linux/0001-x86-relocs-Make-per_cpu_load_addr-static.patch b/board/intel/galileo/patches/linux/0001-x86-relocs-Make-per_cpu_load_addr-static.patch new file mode 100644 index 0000000000..1d206cc6d1 --- /dev/null +++ b/board/intel/galileo/patches/linux/0001-x86-relocs-Make-per_cpu_load_addr-static.patch @@ -0,0 +1,39 @@ +From eeeda4cd06e828b331b15741a204ff9f5874d28d Mon Sep 17 00:00:00 2001 +From: Ben Hutchings +Date: Wed, 24 Sep 2014 13:30:12 +0100 +Subject: [PATCH] x86/relocs: Make per_cpu_load_addr static + +per_cpu_load_addr is only used for 64-bit relocations, but is +declared in both configurations of relocs.c - with different +types. This has undefined behaviour in general. GNU ld is +documented to use the larger size in this case, but other tools +may differ and some warn about this. + +References: https://bugs.debian.org/748577 +Reported-by: Michael Tautschnig +Signed-off-by: Ben Hutchings +Cc: 748577@bugs.debian.org +Cc: Linus Torvalds +Link: http://lkml.kernel.org/r/1411561812.3659.23.camel@decadent.org.uk +Signed-off-by: Ingo Molnar +Signed-off-by: Giulio Benetti +--- + arch/x86/tools/relocs.c | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/arch/x86/tools/relocs.c b/arch/x86/tools/relocs.c +index bbb1d2259ecf..a5efb21d5228 100644 +--- a/arch/x86/tools/relocs.c ++++ b/arch/x86/tools/relocs.c +@@ -695,7 +695,7 @@ static void walk_relocs(int (*process)(struct section *sec, Elf_Rel *rel, + * + */ + static int per_cpu_shndx = -1; +-Elf_Addr per_cpu_load_addr; ++static Elf_Addr per_cpu_load_addr; + + static void percpu_init(void) + { +-- +2.25.1 + diff --git a/configs/galileo_defconfig b/configs/galileo_defconfig index 03ca23f414..a8fd0a6dcc 100644 --- a/configs/galileo_defconfig +++ b/configs/galileo_defconfig @@ -1,4 +1,5 @@ BR2_x86_x1000=y +BR2_GLOBAL_PATCH_DIR=board/intel/galileo/patches # Needed for TARGET_GRUB2 BR2_TOOLCHAIN_BUILDROOT_WCHAR=y # Linux headers same as kernel, a 3.14 series