diff options
Diffstat (limited to 'libre')
-rw-r--r-- | libre/linux-libre-lts/0002-gcc-plugins-modern-gcc-plugin-infrastructure-requres.patch | 76 | ||||
-rw-r--r-- | libre/linux-libre-lts/PKGBUILD | 35 | ||||
-rw-r--r-- | libre/linux-libre-lts/config.x86_64 | 16 |
3 files changed, 105 insertions, 22 deletions
diff --git a/libre/linux-libre-lts/0002-gcc-plugins-modern-gcc-plugin-infrastructure-requres.patch b/libre/linux-libre-lts/0002-gcc-plugins-modern-gcc-plugin-infrastructure-requres.patch new file mode 100644 index 000000000..8e6cee084 --- /dev/null +++ b/libre/linux-libre-lts/0002-gcc-plugins-modern-gcc-plugin-infrastructure-requres.patch @@ -0,0 +1,76 @@ +From 50b29ce228d0622eae2b9854c5e4b9334c540a7a Mon Sep 17 00:00:00 2001 +From: Levente Polyak <levente@leventepolyak.net> +Date: Thu, 1 Sep 2021 22:19:19 +0200 +Subject: [PATCH] gcc-plugins: modern gcc plugin infrastructure requres c++11 + std + +Bump the used std to c++11 to avoid detection failure. This fixes the +support check on modern gcc plugin infrastructure that requires a +minimum standard of c++11 to compile. + +This effectively requires GCC 4.8.1. + +Signed-off-by: Levente Polyak <levente@leventepolyak.net> +--- + scripts/gcc-plugin.sh | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/scripts/gcc-plugin.sh b/scripts/gcc-plugin.sh +index b79fd0bea838..7abc00f60a8b 100755 +--- a/scripts/gcc-plugin.sh ++++ b/scripts/gcc-plugin.sh +@@ -8,7 +8,7 @@ srctree=$(dirname "$0") + gccplugins_dir=$($* -print-file-name=plugin) + + # we need a c++ compiler that supports the designated initializer GNU extension +-$HOSTCC -c -x c++ -std=gnu++98 - -fsyntax-only -I $srctree/gcc-plugins -I $gccplugins_dir/include 2>/dev/null <<EOF ++$HOSTCC -c -x c++ -std=gnu++11 - -fsyntax-only -I $srctree/gcc-plugins -I $gccplugins_dir/include 2>/dev/null <<EOF + #include "gcc-common.h" + class test { + public: +-- +2.33.0 + +commit 67a5a68013056cbcf0a647e36cb6f4622fb6a470 +Author: Valdis Kletnieks <valdis.kletnieks@vt.edu> +Date: Sat Dec 26 13:21:58 2020 -0500 + + gcc-plugins: fix gcc 11 indigestion with plugins... + + Fedora Rawhide has started including gcc 11,and the g++ compiler + throws a wobbly when it hits scripts/gcc-plugins: + + HOSTCXX scripts/gcc-plugins/latent_entropy_plugin.so + In file included from /usr/include/c++/11/type_traits:35, + from /usr/lib/gcc/x86_64-redhat-linux/11/plugin/include/system.h:244, + from /usr/lib/gcc/x86_64-redhat-linux/11/plugin/include/gcc-plugin.h:28, + from scripts/gcc-plugins/gcc-common.h:7, + from scripts/gcc-plugins/latent_entropy_plugin.c:78: + /usr/include/c++/11/bits/c++0x_warning.h:32:2: error: #error This file requires compiler and library support for the ISO + C++ 2011 standard. This support must be enabled with the -std=c++11 or -std=gnu++11 compiler options. + 32 | #error This file requires compiler and library support \ + + In fact, it works just fine with c++11, which has been in gcc since 4.8, + and we now require 4.9 as a minimum. + + Signed-off-by: Valdis Kletnieks <valdis.kletnieks@vt.edu> + Acked-by: Josh Poimboeuf <jpoimboe@redhat.com> + Signed-off-by: Kees Cook <keescook@chromium.org> + Link: https://lore.kernel.org/r/82487.1609006918@turing-police + +diff --git a/scripts/gcc-plugins/Makefile b/scripts/gcc-plugins/Makefile +index d66949bfeba4..b5487cce69e8 100644 +--- a/scripts/gcc-plugins/Makefile ++++ b/scripts/gcc-plugins/Makefile +@@ -22,9 +22,9 @@ always-y += $(GCC_PLUGIN) + GCC_PLUGINS_DIR = $(shell $(CC) -print-file-name=plugin) + + plugin_cxxflags = -Wp,-MMD,$(depfile) $(KBUILD_HOSTCXXFLAGS) -fPIC \ +- -I $(GCC_PLUGINS_DIR)/include -I $(obj) -std=gnu++98 \ ++ -I $(GCC_PLUGINS_DIR)/include -I $(obj) -std=gnu++11 \ + -fno-rtti -fno-exceptions -fasynchronous-unwind-tables \ +- -ggdb -Wno-narrowing -Wno-unused-variable -Wno-c++11-compat \ ++ -ggdb -Wno-narrowing -Wno-unused-variable \ + -Wno-format-diag + + plugin_ldflags = -shared diff --git a/libre/linux-libre-lts/PKGBUILD b/libre/linux-libre-lts/PKGBUILD index 31f8eed1d..55a4c7d6e 100644 --- a/libre/linux-libre-lts/PKGBUILD +++ b/libre/linux-libre-lts/PKGBUILD @@ -9,18 +9,16 @@ # Based on linux-lts package -# NOTE: Don't build htmldocs due to an error in sphinx (armv7h only) - _replacesarchkernel=('linux%') # '%' gets replaced with kernel suffix _replacesoldkernels=() # '%' gets replaced with kernel suffix _replacesoldmodules=() # '%' gets replaced with kernel suffix pkgbase=linux-libre-lts -pkgver=5.10.56 +pkgver=5.10.72 pkgrel=1 pkgdesc='LTS Linux-libre' -rcnver=5.10.56 -rcnrel=armv7-x45 +rcnver=5.10.72 +rcnrel=armv7-x53 url='https://linux-libre.fsfla.org/' arch=(i686 x86_64 armv7h) license=(GPL2) @@ -31,8 +29,8 @@ makedepends=( options=('!strip') _srcname=linux-5.10 source=( - "https://linux-libre.fsfla.org/pub/linux-libre/releases/${_srcname##*-}-gnu/linux-libre-${_srcname##*-}-gnu.tar.xz"{,.sign} - "https://linux-libre.fsfla.org/pub/linux-libre/releases/$pkgver-gnu/patch-${_srcname##*-}-gnu-$pkgver-gnu.xz"{,.sign} + "https://linux-libre.fsfla.org/pub/linux-libre/releases/${_srcname##*-}-gnu1/linux-libre-${_srcname##*-}-gnu1.tar.xz"{,.sign} + "https://linux-libre.fsfla.org/pub/linux-libre/releases/$pkgver-gnu1/patch-${_srcname##*-}-gnu1-$pkgver-gnu1.xz"{,.sign} "https://repo.parabola.nu/other/linux-libre/logos/logo_linux_"{clut224.ppm,vga16.ppm,mono.pbm}{,.sig} config.i686 config.x86_64 config.armv7h # the main kernel config files linux-armv7h.preset # armv7h preset file for mkinitcpio ramdisk @@ -46,6 +44,7 @@ source=( 0002-fix-Atmel-maXTouch-touchscreen-support.patch # Arch Linux patches 0001-ZEN-Add-sysctl-and-CONFIG-to-disallow-unprivileged-C.patch + 0002-gcc-plugins-modern-gcc-plugin-infrastructure-requres.patch ) source_i686=( # avoid using zstd compression in ultra mode (exhausts virtual memory) @@ -59,9 +58,9 @@ validpgpkeys=( '474402C8C582DAFBE389C427BCB7CF877E7D47A7' # Alexandre Oliva '6DB9C4B4F0D8C0DC432CF6E4227CA7C556B2BA78' # David P. ) -sha512sums=('ccc52db049a66ff146d9fc84fb00e783f2d04211156233a382f87589fec7631b8fbb3e76bfd94279607b883d25f9745e6c7d2bd62b13311dc6b425002bd42ec0' +sha512sums=('4bf48611e8a217931c2347f1aa3257da5ba210f263fb35edef43e935fd3fcab5333fc884198fe6ab180cc11ed11dd48b71dff4071b85f18830a6bf9e1c2cf97f' 'SKIP' - '44f57270e8c973d03515ff8526865e5cecd7e7ae29c4c10468a2ee33b98baa20cdca07fe64910740a3b38c4a08eeb5727fb26d415cfd719403b976685d0e2b86' + 'a25bf1a32e8dba38a910eae4d6436f2a6716807e810655f0170f8ea90d136aa353057fd8cc5d05281ca8a684efef7ef4036ac96039f8d122f62d5b1f362229c3' 'SKIP' '13cb5bc42542e7b8bb104d5f68253f6609e463b6799800418af33eb0272cc269aaa36163c3e6f0aacbdaaa1d05e2827a4a7c4a08a029238439ed08b89c564bb3' 'SKIP' @@ -70,14 +69,15 @@ sha512sums=('ccc52db049a66ff146d9fc84fb00e783f2d04211156233a382f87589fec7631b8fb '267295aa0cea65684968420c68b32f1a66a22d018b9d2b2c1ef14267bcf4cb68aaf7099d073cbfefe6c25c8608bdcbbd45f7ac8893fdcecbf1e621abdfe9ecc1' 'SKIP' '42e5e4913993650bb9bb22accbc1c272e8e0be4891e5bb82fb7c0f140d56bdc6f5282f353d53d49e4aa3a010d464c64001fb6d14d615c6778c10bec204435ea3' - 'f7397cfec791ba8df9e342a850f4794acc5e69707a5c4e5f9c03b14c75f975317055a2be59ee51c3fd22bb8c534639454931bac79d9f3761453a62fc085d8801' + 'd6e61670635d717e84c2c3caca17fcc284d23cab85768246fece85b274e8668933392fe66c2d2f0d742fe5b4fab2e799a18389b32c21c075f8c54c68ea224950' '6012fa7b97c15ada82f0c205ea983bebac8b672ca498e22f524d219bdd8715784b24ce7d457803e8221a945c3daff95c4e467f70a420b9c2aa95d627f2d160a9' '53103bf55b957b657039510527df0df01279dec59cda115a4d6454e4135025d4546167fa30bdc99107f232561c1e096d8328609ab5a876cf7017176f92ad3e0b' '02af4dd2a007e41db0c63822c8ab3b80b5d25646af1906dc85d0ad9bb8bbf5236f8e381d7f91cf99ed4b0978c50aee37cb9567cdeef65b7ec3d91b882852b1af' 'b8fe56e14006ab866970ddbd501c054ae37186ddc065bb869cf7d18db8c0d455118d5bda3255fb66a0dde38b544655cfe9040ffe46e41d19830b47959b2fb168' - 'aed7844c51ec705ef1ef5d9f1adf27939073c99d4fcc97051bed2fba1ec161fdde4c57cbe039209fb86c72918493bea55ed26189c1dda3dbea3a3a7019363818') + 'aed7844c51ec705ef1ef5d9f1adf27939073c99d4fcc97051bed2fba1ec161fdde4c57cbe039209fb86c72918493bea55ed26189c1dda3dbea3a3a7019363818' + 'd1db702f9e3a09288ad591361b89ec35b991e421494553e61cc3998037cb6c60627d77d7b7e41f7e7fdab90245a4ee2e4844d68ce96eeaa021dde8548f2673f7') sha512sums_i686=('3a346ff5e0fdefafd28bc3dd0e4b6cd68e3f0014e59d1611d99f2edb8d074fd32649eeb0894a7e340e4f907b5cfc0e08e0753e0427a68dc113bb22835a892968') -sha512sums_armv7h=('8105ecb83dd3afa8b20f1a0846ff63ae5e6368a46e3e2f5a270d94e1ef5886b2b48eb9a8ff6ce9be2d0474abcc793c760984cd9df37b53914d0a8f68e010f20e' +sha512sums_armv7h=('cf29c386ccfaa33a14bb9028bbc8d783b2e872b420e96174e6040faf93d0a1d73d4df75a7d4fb0b8a0dbaae32593b698d16da47436aa29b8b483bdf4c91bb515' 'SKIP') _replacesarchkernel=("${_replacesarchkernel[@]/\%/${pkgbase#linux-libre}}") @@ -98,7 +98,7 @@ prepare() { if [ "${_srcname##*-}" != "$pkgver" ]; then echo "Applying upstream patch..." - patch -Np1 < "../patch-${_srcname##*-}-gnu-$pkgver-gnu" + patch -Np1 < "../patch-${_srcname##*-}-gnu1-$pkgver-gnu1" fi echo "Adding freedo as boot logo..." @@ -144,7 +144,7 @@ prepare() { echo "Setting config..." cp ../config.$CARCH .config make olddefconfig - +#return 1 make -s kernelrelease > version echo "Prepared $pkgbase version $(<version)" } @@ -152,9 +152,7 @@ prepare() { build() { cd $_srcname make all - if ! [ "$CARCH" = armv7h ]; then - make htmldocs - fi + make htmldocs } _package() { @@ -318,8 +316,7 @@ _package-docs() { ln -sr "$builddir/Documentation" "$pkgdir/usr/share/doc/$pkgbase" } -pkgname=("$pkgbase" "$pkgbase-headers") -[[ $CARCH = armv7h ]] || pkgname+=("$pkgbase-docs") +pkgname=("$pkgbase" "$pkgbase-headers" "$pkgbase-docs") for _p in "${pkgname[@]}"; do eval "package_$_p() { $(declare -f "_package${_p#$pkgbase}") diff --git a/libre/linux-libre-lts/config.x86_64 b/libre/linux-libre-lts/config.x86_64 index f0c036634..994646e12 100644 --- a/libre/linux-libre-lts/config.x86_64 +++ b/libre/linux-libre-lts/config.x86_64 @@ -1,6 +1,6 @@ # # Automatically generated file; DO NOT EDIT. -# Linux/x86 5.10.56-gnu Kernel Configuration +# Linux/x86 5.10.72-gnu1 Kernel Configuration # CONFIG_CC_VERSION_TEXT="gcc (GCC) 11.1.0" CONFIG_CC_IS_GCC=y @@ -864,6 +864,9 @@ CONFIG_ARCH_HAS_GCOV_PROFILE_ALL=y # end of GCOV-based kernel profiling CONFIG_HAVE_GCC_PLUGINS=y +CONFIG_GCC_PLUGINS=y +# CONFIG_GCC_PLUGIN_LATENT_ENTROPY is not set +# CONFIG_GCC_PLUGIN_RANDSTRUCT is not set # end of General architecture-dependent options CONFIG_RT_MUTEXES=y @@ -9541,11 +9544,17 @@ CONFIG_LSM="lockdown,yama" # # Kernel hardening options # +CONFIG_GCC_PLUGIN_STRUCTLEAK=y # # Memory initialization # -CONFIG_INIT_STACK_NONE=y +# CONFIG_INIT_STACK_NONE is not set +# CONFIG_GCC_PLUGIN_STRUCTLEAK_USER is not set +# CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF is not set +CONFIG_GCC_PLUGIN_STRUCTLEAK_BYREF_ALL=y +# CONFIG_GCC_PLUGIN_STRUCTLEAK_VERBOSE is not set +# CONFIG_GCC_PLUGIN_STACKLEAK is not set CONFIG_INIT_ON_ALLOC_DEFAULT_ON=y # CONFIG_INIT_ON_FREE_DEFAULT_ON is not set # end of Memory initialization @@ -9813,7 +9822,8 @@ CONFIG_SYSTEM_TRUSTED_KEYS="" CONFIG_SECONDARY_TRUSTED_KEYRING=y CONFIG_SYSTEM_BLACKLIST_KEYRING=y CONFIG_SYSTEM_BLACKLIST_HASH_LIST="" -# CONFIG_SYSTEM_REVOCATION_LIST is not set +CONFIG_SYSTEM_REVOCATION_LIST=y +CONFIG_SYSTEM_REVOCATION_KEYS="" # end of Certificates for signature checking CONFIG_BINARY_PRINTF=y |