From c15cf5f4158704615c2d72542fe09fd1236133b9 Mon Sep 17 00:00:00 2001 From: lethosor Date: Mon, 18 Jan 2016 09:18:32 -0500 Subject: [PATCH] Rename libstdc++ automatically in Linux launcher script --- package/linux/dfhack | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/package/linux/dfhack b/package/linux/dfhack index c75620077..2b2d04465 100755 --- a/package/linux/dfhack +++ b/package/linux/dfhack @@ -15,6 +15,7 @@ # DF_VALGRIND_OPTS: Options to pass to valgrind, if it's being run # DF_HELGRIND_OPTS: Options to pass to helgrind, if it's being run # DF_POST_CMD: Shell command to be run at very end of script +# DFHACK_NO_RENAME_LIBSTDCXX: Non-empty to prevent automatically renaming libstdc++ DF_DIR=$(dirname "$0") cd "${DF_DIR}" @@ -31,6 +32,22 @@ if [ -r "./$RC" ]; then . "./$RC" fi +# Disable bundled libstdc++ +libcxx_orig="libs/libstdc++.so.6" +libcxx_backup="libs/libstdc++.so.6.backup" +if [ -z "${DFHACK_NO_RENAME_LIBSTDCXX:-}" ] && [ -e "$libcxx_orig" ] && [ ! -e "$libcxx_backup" ]; then + mv "$libcxx_orig" "$libcxx_backup" + cat <