From 0f4b66d9e1542aeb8e6e79f69a7c2a395d82e59f Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Wed, 21 Sep 2022 08:18:45 +0200 Subject: extra/linux-galileo-gen2: pin gcc version --- extra/linux-galileo-gen2/PKGBUILD | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'extra/linux-galileo-gen2') diff --git a/extra/linux-galileo-gen2/PKGBUILD b/extra/linux-galileo-gen2/PKGBUILD index 754f1cd3..034247a1 100644 --- a/extra/linux-galileo-gen2/PKGBUILD +++ b/extra/linux-galileo-gen2/PKGBUILD @@ -93,6 +93,14 @@ _package() { rm "$modulesdir"/{source,build} } +get_gcc_version_from_config() { + sed ' + s/^CONFIG_CC_VERSION_TEXT="gcc (GCC) \([0-9.]\+\)"$/\1/ + t + d + ' "$srcdir/$_srcname/.config" +} + _package-headers() { pkgdesc="Headers and scripts for building modules for the $pkgdesc kernel" @@ -164,6 +172,7 @@ _package-headers() { echo "Adding symlink..." mkdir -p "$pkgdir/usr/src" ln -sr "$builddir" "$pkgdir/usr/src/$pkgbase" + depends+=(gcc-libs=$(get_gcc_version_from_config)) } _package-docs() { -- cgit v1.2.3-70-g09d2