]> xenbits.xensource.com Git - livepatch-build-tools.git/commitdiff
Add support for specifying the path to xen-syms
authorRoss Lagerwall <ross.lagerwall@citrix.com>
Tue, 20 Oct 2015 09:55:16 +0000 (10:55 +0100)
committerRoss Lagerwall <ross.lagerwall@citrix.com>
Tue, 20 Oct 2015 09:55:16 +0000 (10:55 +0100)
This allows linking against a different xen-syms from the original
built. This may be useful if the compile environment or source code is
slightly different.

xsplice-build

index 8b917a1bc309279f21a716b28933db1aa0f1f28c..ff8e1c0db90ca5b662b000efab02adf0dbb48c80 100755 (executable)
@@ -29,6 +29,7 @@ CPUS="$(getconf _NPROCESSORS_ONLN)"
 DEBUG=n
 XEN_DEBUG=n
 SKIP=
+XENSYMS=xen-syms
 
 warn() {
     echo "ERROR: $1" >&2
@@ -109,7 +110,7 @@ function create_patch()
         mkdir -p "output/$(dirname $i)" || die
         echo "Processing ${i}"
         echo "Run create-diff-object on $i" >> "${OUTPUT}/create-diff-object.log"
-        "${SCRIPTDIR}"/create-diff-object $debugopt "original/$i" "patched/$i" xen-syms "output/$i" &>> "${OUTPUT}/create-diff-object.log"
+        "${SCRIPTDIR}"/create-diff-object $debugopt "original/$i" "patched/$i" "$XENSYMS" "output/$i" &>> "${OUTPUT}/create-diff-object.log"
         rc="${PIPESTATUS[0]}"
         if [[ $rc = 139 ]]; then
             warn "create-diff-object SIGSEGV"
@@ -148,9 +149,10 @@ usage() {
        echo "          -k, --skip         Skip build or diff phase" >&2
        echo "          -d, --debug        Enable debug logging" >&2
        echo "          --xen-debug        Build debug Xen" >&2
+       echo "          --xen-syms         Build against a xen-syms" >&2
 }
 
-options=$(getopt -o hs:p:o:j:k:d -l "help,srcdir:patch:output:cpus:,skip:,debug,xen-debug" -- "$@") || die "getopt failed"
+options=$(getopt -o hs:p:o:j:k:d -l "help,srcdir:patch:output:cpus:,skip:,debug,xen-debug,xen-syms:" -- "$@") || die "getopt failed"
 
 eval set -- "$options"
 
@@ -193,6 +195,12 @@ while [[ $# -gt 0 ]]; do
             outputarg="$1"
             shift
             ;;
+        --xen-syms)
+            shift
+            XENSYMS="$(realpath -m -- "$1")"
+            [ -f "$XENSYMS" ] || die "xen-syms file does not exist"
+            shift
+            ;;
         --)
             shift
             break