hardcode the version and update the prepare script

This commit is contained in:
Sylvestre Ledru 2017-01-07 15:04:28 +00:00
parent bbdfe1239f
commit cdf913da75
2 changed files with 6 additions and 28 deletions

View File

@ -12,38 +12,16 @@ which could then break something else.
This probably should have upstream bug but I couldn't find any existing report.
Index: llvm-toolchain-snapshot_4.0~svn286225/CMakeLists.txt
Index: llvm-toolchain-snapshot_4.0~svn291344/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
===================================================================
--- llvm-toolchain-snapshot_4.0~svn286225.orig/CMakeLists.txt
+++ llvm-toolchain-snapshot_4.0~svn286225/CMakeLists.txt
@@ -49,6 +49,10 @@ project(LLVM
${cmake_3_0_LANGUAGES}
C CXX ASM)
+set(DEBIAN_VERSION_SUFFIX "" CACHE STRING "Versioned program suffix that is required to exec correct subtool.")
+
+add_definitions( -DDEBIAN_VERSION_SUFFIX=\"${DEBIAN_VERSION_SUFFIX}\")
+
if (NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
message(STATUS "No build type selected, default to Debug")
set(CMAKE_BUILD_TYPE "Debug" CACHE STRING "Build type (default Debug)" FORCE)
Index: llvm-toolchain-snapshot_4.0~svn286225/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
===================================================================
--- llvm-toolchain-snapshot_4.0~svn286225.orig/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
+++ llvm-toolchain-snapshot_4.0~svn286225/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
@@ -36,10 +36,14 @@
// Project includes
#include "ProcessGDBRemoteLog.h"
+#ifndef DEBIAN_VERSION_SUFFIX
+#define DEBIAN_VERSION_SUFFIX ""
+#endif
+
--- llvm-toolchain-snapshot_4.0~svn291344.orig/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
+++ llvm-toolchain-snapshot_4.0~svn291344/lldb/source/Plugins/Process/gdb-remote/GDBRemoteCommunication.cpp
@@ -39,7 +39,7 @@
#if defined(__APPLE__)
#define DEBUGSERVER_BASENAME "debugserver"
#else
-#define DEBUGSERVER_BASENAME "lldb-server"
+# define DEBUGSERVER_BASENAME "lldb-server" DEBIAN_VERSION_SUFFIX
+# define DEBUGSERVER_BASENAME "lldb-server-4.0"
#endif
#if defined(HAVE_LIBCOMPRESSION)

View File

@ -9,7 +9,7 @@ for F in $LIST; do
TARGET=`echo $F|sed -e "s|$ORIG_VERSION|$TARGET_VERSION|g"`
svn mv $F $TARGET
done
LIST=`ls debian/*$TARGET_VERSION* debian/control debian/*.install debian/*.links debian/orig-tar.sh debian/rules debian/patches/clang-analyzer-force-version.diff debian/patches/clang-format-version.diff debian/patches/python-clangpath.diff debian/patches/scan-build-clang-path.diff debian/patches/lldb-libname.diff debian/patches/fix-scan-view-path.diff`
LIST=`ls debian/*$TARGET_VERSION* debian/control debian/*.install debian/*.links debian/orig-tar.sh debian/rules debian/patches/clang-analyzer-force-version.diff debian/patches/clang-format-version.diff debian/patches/python-clangpath.diff debian/patches/scan-build-clang-path.diff debian/patches/lldb-libname.diff debian/patches/fix-scan-view-path.diff debian/patches/lldb-addversion-suffix-to-llvm-server-exec.patch`
for F in $LIST; do
sed -i -e "s|$ORIG_VERSION_2|$TARGET_VERSION_2|g" $F
sed -i -e "s|$ORIG_VERSION|$TARGET_VERSION|g" $F