From a63182bc739fa2ef86861a939898717e04cb7153 Mon Sep 17 00:00:00 2001 From: Isaac David Date: Fri, 9 Jun 2017 15:44:53 -0500 Subject: libre-testing/uboot4extlinux-*: new versions and configs also patch old u-boot tarballs to build with gcc7 --- ...x-compiler-gcc5.h-to-fix-builds-with-gcc5.patch | 93 ---------------------- .../0001-kernel-add-support-for-gcc-7.patch | 68 ++++++++++++++++ libre-testing/uboot4extlinux-chiliboard/PKGBUILD | 11 ++- .../uboot4extlinux-chiliboard.install | 2 +- 4 files changed, 74 insertions(+), 100 deletions(-) delete mode 100644 libre-testing/uboot4extlinux-chiliboard/0001-Add-linux-compiler-gcc5.h-to-fix-builds-with-gcc5.patch create mode 100644 libre-testing/uboot4extlinux-chiliboard/0001-kernel-add-support-for-gcc-7.patch (limited to 'libre-testing/uboot4extlinux-chiliboard') diff --git a/libre-testing/uboot4extlinux-chiliboard/0001-Add-linux-compiler-gcc5.h-to-fix-builds-with-gcc5.patch b/libre-testing/uboot4extlinux-chiliboard/0001-Add-linux-compiler-gcc5.h-to-fix-builds-with-gcc5.patch deleted file mode 100644 index bdb6699e6..000000000 --- a/libre-testing/uboot4extlinux-chiliboard/0001-Add-linux-compiler-gcc5.h-to-fix-builds-with-gcc5.patch +++ /dev/null @@ -1,93 +0,0 @@ -From 0a3f119b5221e16feb1cbe4036cc16d1dc4c194c Mon Sep 17 00:00:00 2001 -From: Hans de Goede -Date: Sat, 7 Feb 2015 22:52:40 +0100 -Subject: [PATCH 1/6] Add linux/compiler-gcc5.h to fix builds with gcc5 - -Add linux/compiler-gcc5/h from the kernel sources at: - -commit 5631b8fba640a4ab2f8a954f63a603fa34eda96b -Author: Steven Noonan -Date: Sat Oct 25 15:09:42 2014 -0700 - - compiler/gcc4+: Remove inaccurate comment about 'asm goto' miscompiles - -Signed-off-by: Hans de Goede ---- - include/linux/compiler-gcc5.h | 65 +++++++++++++++++++++++++++++++++++++++++++ - 1 file changed, 65 insertions(+) - create mode 100644 include/linux/compiler-gcc5.h - -diff --git a/include/linux/compiler-gcc5.h b/include/linux/compiler-gcc5.h -new file mode 100644 -index 0000000..c8c5659 ---- /dev/null -+++ b/include/linux/compiler-gcc5.h -@@ -0,0 +1,65 @@ -+#ifndef __LINUX_COMPILER_H -+#error "Please don't include directly, include instead." -+#endif -+ -+#define __used __attribute__((__used__)) -+#define __must_check __attribute__((warn_unused_result)) -+#define __compiler_offsetof(a, b) __builtin_offsetof(a, b) -+ -+/* Mark functions as cold. gcc will assume any path leading to a call -+ to them will be unlikely. This means a lot of manual unlikely()s -+ are unnecessary now for any paths leading to the usual suspects -+ like BUG(), printk(), panic() etc. [but let's keep them for now for -+ older compilers] -+ -+ Early snapshots of gcc 4.3 don't support this and we can't detect this -+ in the preprocessor, but we can live with this because they're unreleased. -+ Maketime probing would be overkill here. -+ -+ gcc also has a __attribute__((__hot__)) to move hot functions into -+ a special section, but I don't see any sense in this right now in -+ the kernel context */ -+#define __cold __attribute__((__cold__)) -+ -+#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) -+ -+#ifndef __CHECKER__ -+# define __compiletime_warning(message) __attribute__((warning(message))) -+# define __compiletime_error(message) __attribute__((error(message))) -+#endif /* __CHECKER__ */ -+ -+/* -+ * Mark a position in code as unreachable. This can be used to -+ * suppress control flow warnings after asm blocks that transfer -+ * control elsewhere. -+ * -+ * Early snapshots of gcc 4.5 don't support this and we can't detect -+ * this in the preprocessor, but we can live with this because they're -+ * unreleased. Really, we need to have autoconf for the kernel. -+ */ -+#define unreachable() __builtin_unreachable() -+ -+/* Mark a function definition as prohibited from being cloned. */ -+#define __noclone __attribute__((__noclone__)) -+ -+/* -+ * Tell the optimizer that something else uses this function or variable. -+ */ -+#define __visible __attribute__((externally_visible)) -+ -+/* -+ * GCC 'asm goto' miscompiles certain code sequences: -+ * -+ * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670 -+ * -+ * Work it around via a compiler barrier quirk suggested by Jakub Jelinek. -+ * -+ * (asm goto is automatically volatile - the naming reflects this.) -+ */ -+#define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0) -+ -+#ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP -+#define __HAVE_BUILTIN_BSWAP32__ -+#define __HAVE_BUILTIN_BSWAP64__ -+#define __HAVE_BUILTIN_BSWAP16__ -+#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */ --- -2.5.0 - diff --git a/libre-testing/uboot4extlinux-chiliboard/0001-kernel-add-support-for-gcc-7.patch b/libre-testing/uboot4extlinux-chiliboard/0001-kernel-add-support-for-gcc-7.patch new file mode 100644 index 000000000..ca59b159a --- /dev/null +++ b/libre-testing/uboot4extlinux-chiliboard/0001-kernel-add-support-for-gcc-7.patch @@ -0,0 +1,68 @@ +diff --git a/include/linux/compiler-gcc7.h b/include/linux/compiler-gcc7.h +new file mode 100644 +index 0000000..ba064fa +--- /dev/null ++++ b/include/linux/compiler-gcc7.h +@@ -0,0 +1,59 @@ ++#ifndef __LINUX_COMPILER_H ++#error "Please don't include directly, include instead." ++#endif ++ ++#define __used __attribute__((__used__)) ++#define __must_check __attribute__((warn_unused_result)) ++#define __compiler_offsetof(a, b) __builtin_offsetof(a, b) ++ ++/* Mark functions as cold. gcc will assume any path leading to a call ++ to them will be unlikely. This means a lot of manual unlikely()s ++ are unnecessary now for any paths leading to the usual suspects ++ like BUG(), printk(), panic() etc. [but let's keep them for now for ++ older compilers] ++ ++ gcc also has a __attribute__((__hot__)) to move hot functions into ++ a special section, but I don't see any sense in this right now in ++ the kernel context */ ++#define __cold __attribute__((__cold__)) ++ ++#define __UNIQUE_ID(prefix) __PASTE(__PASTE(__UNIQUE_ID_, prefix), __COUNTER__) ++ ++#ifndef __CHECKER__ ++# define __compiletime_warning(message) __attribute__((warning(message))) ++# define __compiletime_error(message) __attribute__((error(message))) ++#endif /* __CHECKER__ */ ++ ++/* ++ * Mark a position in code as unreachable. This can be used to ++ * suppress control flow warnings after asm blocks that transfer ++ * control elsewhere. ++ */ ++#define unreachable() __builtin_unreachable() ++ ++/* Mark a function definition as prohibited from being cloned. */ ++#define __noclone __attribute__((__noclone__)) ++ ++/* ++ * Tell the optimizer that something else uses this function or variable. ++ */ ++#define __visible __attribute__((externally_visible)) ++ ++/* ++ * GCC 'asm goto' miscompiles certain code sequences: ++ * ++ * http://gcc.gnu.org/bugzilla/show_bug.cgi?id=58670 ++ * ++ * Work it around via a compiler barrier quirk suggested by Jakub Jelinek. ++ * ++ * (asm goto is automatically volatile - the naming reflects this.) ++ */ ++#define asm_volatile_goto(x...) do { asm goto(x); asm (""); } while (0) ++ ++#ifdef CONFIG_ARCH_USE_BUILTIN_BSWAP ++#define __HAVE_BUILTIN_BSWAP32__ ++#define __HAVE_BUILTIN_BSWAP64__ ++#define __HAVE_BUILTIN_BSWAP16__ ++#endif /* CONFIG_ARCH_USE_BUILTIN_BSWAP */ ++ ++#define KASAN_ABI_VERSION 4 +-- +2.1.4 + diff --git a/libre-testing/uboot4extlinux-chiliboard/PKGBUILD b/libre-testing/uboot4extlinux-chiliboard/PKGBUILD index c05ed95eb..5e6de9222 100644 --- a/libre-testing/uboot4extlinux-chiliboard/PKGBUILD +++ b/libre-testing/uboot4extlinux-chiliboard/PKGBUILD @@ -1,7 +1,6 @@ # U-Boot: ChiliBoard -# Maintainer: André Silva - -buildarch=4 +# Maintainer: Isaac David +# Contributor: André Silva pkgname=uboot4extlinux-chiliboard pkgver=2014.07 @@ -15,7 +14,7 @@ license=('GPL') backup=(boot/extlinux/extlinux.conf) install=${pkgname}.install source=("ftp://ftp.denx.de/pub/u-boot/u-boot-${pkgver}.tar.bz2" - '0001-Add-linux-compiler-gcc5.h-to-fix-builds-with-gcc5.patch' + '0001-kernel-add-support-for-gcc-7.patch' '0002-ARM-asm-io.h-use-static-inline.patch' '0003-common-main.c-make-show_boot_progress-__weak.patch' '0004-common-board_f-cosmetic-use-__weak-for-leds.patch' @@ -24,7 +23,7 @@ source=("ftp://ftp.denx.de/pub/u-boot/u-boot-${pkgver}.tar.bz2" 'extlinux.conf' 'uEnv.txt') sha256sums=('b4f83b8db325c21671a997198ec3a373e2e00dde2fcf17be9b9afd7cfd727f56' - '993ec4c20d8e25e8c882282b82b6f9cb27111855e5f5c7fb6eda8218b470278e' + '9e80aa27cccdb07b03d56a970f247c91d586d0b936868c076c20acc2e68a3968' '91b2711f36fbe1bae5d02b3a1eec81383ffd50a4b71426b82920cfd70af40237' '0bb7ddee0b33ba7ca830f09b6aaacc945c7a662749a19b128eb1cab71f5b100a' '2795b55f0ef03aef6c05fd074ab9839d0f89fdc5a3c99dd849eb74cd09e59045' @@ -35,7 +34,7 @@ sha256sums=('b4f83b8db325c21671a997198ec3a373e2e00dde2fcf17be9b9afd7cfd727f56' prepare() { cd u-boot-${pkgver} - patch -Np1 -i ../0001-Add-linux-compiler-gcc5.h-to-fix-builds-with-gcc5.patch + patch -Np1 -i ../0001-kernel-add-support-for-gcc-7.patch patch -Np1 -i ../0002-ARM-asm-io.h-use-static-inline.patch patch -Np1 -i ../0003-common-main.c-make-show_boot_progress-__weak.patch patch -Np1 -i ../0004-common-board_f-cosmetic-use-__weak-for-leds.patch diff --git a/libre-testing/uboot4extlinux-chiliboard/uboot4extlinux-chiliboard.install b/libre-testing/uboot4extlinux-chiliboard/uboot4extlinux-chiliboard.install index 4467c694e..93306e01e 100644 --- a/libre-testing/uboot4extlinux-chiliboard/uboot4extlinux-chiliboard.install +++ b/libre-testing/uboot4extlinux-chiliboard/uboot4extlinux-chiliboard.install @@ -4,7 +4,7 @@ flash_instructions() { } extlinux_warning() { - echo "==> WARNING: U-Boot uses Extlinux support to boot up. For setting it up, edit /boot/extlinux/extlinux.conf" + echo "==> WARNING: Remember to set up your kernels in /boot/extlinux/extlinux.conf" } flash_uboot() { -- cgit v1.2.2