Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1238881 > unrolled thread
| Started by | Alexander Kapshuk <alexander.kapshuk@gmail.com> |
|---|---|
| First post | 2015-10-03 15:50 +0200 |
| Last post | 2015-10-03 15:50 +0200 |
| Articles | 1 — 1 participant |
Back to article view | Back to linux.kernel
[PATCH 17/24] ver_linux: libcpp.patch Alexander Kapshuk <alexander.kapshuk@gmail.com> - 2015-10-03 15:50 +0200
| From | Alexander Kapshuk <alexander.kapshuk@gmail.com> |
|---|---|
| Date | 2015-10-03 15:50 +0200 |
| Subject | [PATCH 17/24] ver_linux: libcpp.patch |
| Message-ID | <qfvmh-3qk-3@gated-at.bofh.it> |
Neither 'libg++.so', nor 'libstdc++.so' were found where the current
implementation expects them to be found in the distros below.
Gentoo Linux
Debian 6.0.10
Oracle Linux Server release 7.1
The proposed implementation relies on 'ldconfig' to locate the libraries
in question. 'Sed' is used to do the text processing.
Signed-off-by: Alexander Kapshuk <alexander.kapshuk@gmail.com>
---
--- linux/scripts/ver_linux.orig 2015-10-03 13:41:57.118790241 +0300
+++ linux/scripts/ver_linux 2015-10-03 13:58:19.822084916 +0300
@@ -65,8 +65,19 @@
ldd -v > /dev/null 2>&1 && ldd -v || ldd --version |head -n 1 | awk \
'NR==1{print "Dynamic linker (ldd) ", $NF}'
-ls -l /usr/lib/libg++.so /usr/lib/libstdc++.so 2>/dev/null | awk -F. \
- '{print "Linux C++ Library " $4"."$5"."$6}'
+libcpp=`test -x "$ldconfig" &&
+ $ldconfig -p |
+ awk '/(libg|stdc)[+]+\.so/ {
+ print $NF
+ exit
+ }
+'`
+test -r "$libcpp" &&
+ls -l $libcpp |
+sed '
+ s!.*so\.!!
+ s!^!Linux C++ Library\t!
+'
ps --version 2>&1 | grep version | awk \
'NR==1{print "Procps ", $NF}'
--
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/
Back to top | Article view | linux.kernel
csiph-web