From 77a23b7412aec16687b8a9901aead4bc545f91e4 Mon Sep 17 00:00:00 2001 From: Erich Eckner Date: Thu, 22 Sep 2022 12:10:11 +0200 Subject: _get_gcc_version_from_config(): also find the config, if prepare() was not (yet) run --- extra/linux-galileo-gen2/PKGBUILD | 5 ++++- extra/linux-olpc-xo1/PKGBUILD | 5 ++++- extra/linux-pae/PKGBUILD | 5 ++++- extra/linux-zen/PKGBUILD | 5 ++++- 4 files changed, 16 insertions(+), 4 deletions(-) (limited to 'extra') diff --git a/extra/linux-galileo-gen2/PKGBUILD b/extra/linux-galileo-gen2/PKGBUILD index c7885561..4504352b 100644 --- a/extra/linux-galileo-gen2/PKGBUILD +++ b/extra/linux-galileo-gen2/PKGBUILD @@ -101,11 +101,14 @@ _get_gcc_version_from_config() { 1!d ' else + for _config_file in "$srcdir/$_srcname/.config" "$srcdir/config.${MODEL}"; do + [ -f "$file" ] && break + done sed ' s/^CONFIG_CC_VERSION_TEXT="gcc (GCC) \([0-9.]\+\)"$/\1/ t d - ' "$srcdir/$_srcname/.config" + ' "$_config_file" fi } diff --git a/extra/linux-olpc-xo1/PKGBUILD b/extra/linux-olpc-xo1/PKGBUILD index a3a0ff77..eeefca52 100644 --- a/extra/linux-olpc-xo1/PKGBUILD +++ b/extra/linux-olpc-xo1/PKGBUILD @@ -175,11 +175,14 @@ _get_gcc_version_from_config() { 1!d ' else + for _config_file in "$srcdir/$_srcname/.config" "$srcdir/config.${MODEL}"; do + [ -f "$file" ] && break + done sed ' s/^CONFIG_CC_VERSION_TEXT="gcc (GCC) \([0-9.]\+\)"$/\1/ t d - ' "$srcdir/$_srcname/.config" + ' "$_config_file" fi } diff --git a/extra/linux-pae/PKGBUILD b/extra/linux-pae/PKGBUILD index 89582c86..051a9437 100644 --- a/extra/linux-pae/PKGBUILD +++ b/extra/linux-pae/PKGBUILD @@ -205,11 +205,14 @@ _get_gcc_version_from_config() { 1!d ' else + for _config_file in "$srcdir/$_srcname/.config" "$srcdir/config"; do + [ -f "$file" ] && break + done sed ' s/^CONFIG_CC_VERSION_TEXT="gcc (GCC) \([0-9.]\+\)"$/\1/ t d - ' "$srcdir/$_srcname/.config" + ' "$_config_file" fi } diff --git a/extra/linux-zen/PKGBUILD b/extra/linux-zen/PKGBUILD index 8a3bc266..083e1e5f 100644 --- a/extra/linux-zen/PKGBUILD +++ b/extra/linux-zen/PKGBUILD @@ -27,11 +27,14 @@ _get_gcc_version_from_config() { 1!d ' else + for _config_file in "$srcdir/$_srcname/.config" "$srcdir/config"; do + [ -f "$file" ] && break + done sed ' s/^CONFIG_CC_VERSION_TEXT="gcc (GCC) \([0-9.]\+\)"$/\1/ t d - ' "$srcdir/$_srcname/.config" + ' "$_config_file" fi } -- cgit v1.2.3-70-g09d2