Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/extra/linux-pae/PKGBUILD
diff options
context:
space:
mode:
Diffstat (limited to 'extra/linux-pae/PKGBUILD')
-rw-r--r--extra/linux-pae/PKGBUILD18
1 files changed, 13 insertions, 5 deletions
diff --git a/extra/linux-pae/PKGBUILD b/extra/linux-pae/PKGBUILD
index 6451244a..89582c86 100644
--- a/extra/linux-pae/PKGBUILD
+++ b/extra/linux-pae/PKGBUILD
@@ -198,11 +198,19 @@ _package-headers() {
}
_get_gcc_version_from_config() {
- sed '
- s/^CONFIG_CC_VERSION_TEXT="gcc (GCC) \([0-9.]\+\)"$/\1/
- t
- d
- ' "$srcdir/$_srcname/.config"
+ if [ -z "$srcdir" ]; then
+ gcc --version \
+ | sed '
+ s@^.* @@
+ 1!d
+ '
+ else
+ sed '
+ s/^CONFIG_CC_VERSION_TEXT="gcc (GCC) \([0-9.]\+\)"$/\1/
+ t
+ d
+ ' "$srcdir/$_srcname/.config"
+ fi
}
_package-docs() {