summaryrefslogtreecommitdiffstats
path: root/scripts/install_copy_toolchain.sh
diff options
context:
space:
mode:
authorMarc Kleine-Budde <mkl@pengutronix.de>2006-08-30 17:12:49 +0000
committerMarc Kleine-Budde <mkl@pengutronix.de>2006-08-30 17:12:49 +0000
commit439e7790f3b9028187336479666d8b600579ab79 (patch)
tree2c0a860e896300fde6e4d2caaff8296f8104e8c2 /scripts/install_copy_toolchain.sh
parentcae64ef2aa5a115e7fb5ec9b3ff6261afa931e83 (diff)
downloadptxdist-439e7790f3b9028187336479666d8b600579ab79.tar.gz
ptxdist-439e7790f3b9028187336479666d8b600579ab79.tar.xz
* install_copy_toolchain.sh:
install extra link for libstdc++ git-svn-id: https://svn.pengutronix.de/svn/ptxdist/trunks/ptxdist-trunk@6020 33e552b5-05e3-0310-8538-816dae2090ed
Diffstat (limited to 'scripts/install_copy_toolchain.sh')
-rwxr-xr-xscripts/install_copy_toolchain.sh36
1 files changed, 29 insertions, 7 deletions
diff --git a/scripts/install_copy_toolchain.sh b/scripts/install_copy_toolchain.sh
index a91956bb1..0834d73a6 100755
--- a/scripts/install_copy_toolchain.sh
+++ b/scripts/install_copy_toolchain.sh
@@ -42,7 +42,7 @@ get_lib_path() {
# we use it
#
ptxd_install_lib() {
- local lib_path lib lib_dir sysroot prefix prefix script_lib tmp tls_lib dir
+ local lib_path lib lib_dir sysroot prefix prefix script_lib tmp tls_lib dir v_full lib_v_major
lib_path="${1}"
@@ -60,7 +60,7 @@ ptxd_install_lib() {
sysroot="${lib_dir%${prefix}}"
# if the user has given us a $prefix use it
- prefix=${dest:-${prefix}}
+ prefix="${dest:-${prefix}}"
# disabled cause tls is bad for UML
# is there a tls variant of the lib? (e.g. native build on debian)
@@ -77,7 +77,7 @@ ptxd_install_lib() {
"${ROOTDIR_DEBUG}"; do
tmp="${dir}${prefix}/${lib}"
- test -e "{tmp}" && rm -rf "${tmp}"
+ test -e "${tmp}" && rm -rf "${tmp}"
done
# do sth. with that found lib, action depends on file type (link or regular)
@@ -114,7 +114,7 @@ ptxd_install_lib() {
echo "script - ${lib_path}"
#
# the libs are in the GROUP line
- # strip all braces and install all shared libs ( *.so*), irnore "GROUP" and static libs
+ # strip all braces and install all shared libs ( *.so*), ignore "GROUP" and static libs
#
for script_lib in `sed -n -e "/GROUP/s/[()]//gp" "${lib_path}"`; do
# deal with relative and absolute libs
@@ -143,9 +143,31 @@ ptxd_install_lib() {
install -D "${lib_path}" "${dir}${prefix}/${lib}"
done
- ${STRIP} ${ROOTDIR}${prefix}/${lib}
- ${STRIP} ${IMAGEDIR}/${packet}/ipkg${prefix}/${lib}
- echo "f:${prefix}/${lib}:0:0:755" >> ${STATEDIR}/${packet}.perms
+ ${STRIP} "${ROOTDIR}${prefix}/${lib}"
+ ${STRIP} "${IMAGEDIR}/${packet}/ipkg${prefix}/${lib}"
+ echo "f:${prefix}/${lib}:0:0:755" >> "${STATEDIR}/${packet}.perms"
+
+ # now create some links to that lib
+ # e.g. libstdc++.so.6 -> libstdc++.so.6.6.6
+
+ # the fullversion (6.6.6)
+ v_full="${lib#*.so.}"
+ # library name with major version (libstdc++.so.6)
+ lib_v_major="${lib%${v_full}}${v_full%%.*}"
+
+ if test "${lib_v_major}" != "${lib}"; then
+ echo "extra link - ${prefix}/${lib_v_major}"
+
+ for dir in \
+ "${ROOTDIR}" \
+ "${ROOTDIR_DEBUG}" \
+ "${IMAGEDIR}/${packet}/ipkg"; do
+
+ if test \! -e "${ROOTDIR}${prefix}/${lib_v_major}"; then
+ ln -sf "${lib}" "${dir}${prefix}/${lib_v_major}"
+ fi
+ done
+ fi
fi
else
echo "error: found ${lib_path}, but neither file nor link"