[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index] [Xen-devel] [PATCH staging-4.10 v1] tools: set DEBUG_DIR from configure
From: Roger Pau Monne <roger.pau@xxxxxxxxxx> The default DEBUG_DIR=/usr/lib/debug can not be used for rpm builds because that directory is "owned" by rpm-packaging itself to store the autogenerated ${pkg}-debuginfo.rpm data. Thats why I set it to /boot. This worked fine until recently, only /boot/xen-syms was affected by that change, and in fact only the "xen" build needed DEBUG_DIR as make cmdline option. Since commit cee8bb62ff ("build: remove shim related targets") tools/firmware/Makefile also uses DEBUG_DIR. To set DEBUG_DIR the tools build must be done like "make DEBUG_DIR=/my/dir". But this breaks build with --enable-ovmf because ovmf.git makes use of the very same variable. For some reason it can not deal with a custom value, some autogenerated file will not be found: [ 126s] make[8]: *** No rule to make target '/boot/AutoGen.h', needed by '/home/abuild/rpmbuild/BUILD/xen-4.11.20180228T150620.cb671efbf1/non-dbg/tools/firmware/ovmf-dir-remote/Build/OvmfX64/DEBUG_GCC5/X64/OvmfPkg/ResetVector/ResetVector/OUTPUT/ResetVector.bin'. Allow the path to be set from a configure command line option. Signed-off-by: Roger Pau Monné <roger.pau@xxxxxxxxxx> Acked-by: Wei Liu <wei.liu2@xxxxxxxxxx> [ wei: run autogen.sh ] master commit: 641f9ce2fab1b85479c564d9b27dfeb18a93ed87 master date: Sun Apr 1 18:15:32 2018 +0100 --- Perhaps scripts/get_maintainer.pl has to be adjusted to bother only the relevant persons with such backport requests... config/Paths.mk.in | 1 + configure | 16 ++++++++++++++++ docs/configure | 16 ++++++++++++++++ m4/paths.m4 | 9 +++++++++ tools/configure | 16 ++++++++++++++++ 5 files changed, 58 insertions(+) diff --git a/config/Paths.mk.in b/config/Paths.mk.in index a603295146..8a518d5a5d 100644 --- a/config/Paths.mk.in +++ b/config/Paths.mk.in @@ -51,6 +51,7 @@ BASH_COMPLETION_DIR := $(CONFIG_DIR)/bash_completion.d XEN_LOCK_DIR := @XEN_LOCK_DIR@ XEN_PAGING_DIR := @XEN_PAGING_DIR@ XEN_DUMP_DIR := @XEN_DUMP_DIR@ +DEBUG_DIR := @DEBUG_DIR@ XENFIRMWAREDIR := @XENFIRMWAREDIR@ diff --git a/configure b/configure index 5270388e5c..a35edf5765 100755 --- a/configure +++ b/configure @@ -595,6 +595,7 @@ tools xen subdirs githttp +DEBUG_DIR XEN_DUMP_DIR XEN_PAGING_DIR XEN_LOCK_DIR @@ -671,6 +672,7 @@ with_sysconfig_leaf_dir with_libexec_leaf_dir with_xen_dumpdir with_rundir +with_debugdir enable_githttp enable_xen enable_tools @@ -1330,6 +1332,8 @@ Optional Packages: [LOCALSTATEDIR/lib/xen/dump] --with-rundir=DIR Path to directory for runtime data. [LOCALSTATEDIR/run] + --with-debugdir=DIR Path to directory for debug symbols. + [PREFIX/lib/debug] Report bugs to <xen-devel@xxxxxxxxxxxxx>. Xen Hypervisor home page: <http://www.xen.org/>. @@ -1991,6 +1995,15 @@ else fi + +# Check whether --with-debugdir was given. +if test "${with_debugdir+set}" = set; then : + withval=$with_debugdir; debugdir_path=$withval +else + debugdir_path=$prefix/lib/debug +fi + + if test "$libexecdir" = '${exec_prefix}/libexec' ; then case "$host_os" in *netbsd*) ;; @@ -2054,6 +2067,9 @@ XEN_PAGING_DIR=$localstatedir/lib/xen/xenpaging XEN_DUMP_DIR=$xen_dumpdir_path +DEBUG_DIR=$debugdir_path + + # Check whether --enable-githttp was given. if test "${enable_githttp+set}" = set; then : diff --git a/docs/configure b/docs/configure index fb346dd787..c5f0b4afae 100755 --- a/docs/configure +++ b/docs/configure @@ -594,6 +594,7 @@ POD2TEXT POD2HTML POD2MAN FIG2DEV +DEBUG_DIR XEN_DUMP_DIR XEN_PAGING_DIR XEN_LOCK_DIR @@ -662,6 +663,7 @@ with_sysconfig_leaf_dir with_libexec_leaf_dir with_xen_dumpdir with_rundir +with_debugdir ' ac_precious_vars='build_alias host_alias @@ -1305,6 +1307,8 @@ Optional Packages: [LOCALSTATEDIR/lib/xen/dump] --with-rundir=DIR Path to directory for runtime data. [LOCALSTATEDIR/run] + --with-debugdir=DIR Path to directory for debug symbols. + [PREFIX/lib/debug] Some influential environment variables: FIG2DEV Path to fig2dev tool @@ -1897,6 +1901,15 @@ else fi + +# Check whether --with-debugdir was given. +if test "${with_debugdir+set}" = set; then : + withval=$with_debugdir; debugdir_path=$withval +else + debugdir_path=$prefix/lib/debug +fi + + if test "$libexecdir" = '${exec_prefix}/libexec' ; then case "$host_os" in *netbsd*) ;; @@ -1960,6 +1973,9 @@ XEN_PAGING_DIR=$localstatedir/lib/xen/xenpaging XEN_DUMP_DIR=$xen_dumpdir_path +DEBUG_DIR=$debugdir_path + + diff --git a/m4/paths.m4 b/m4/paths.m4 index f208b7e39f..89d3bb8312 100644 --- a/m4/paths.m4 +++ b/m4/paths.m4 @@ -82,6 +82,12 @@ AC_ARG_WITH([rundir], [rundir_path=$withval], [rundir_path=$localstatedir/run]) +AC_ARG_WITH([debugdir], + AS_HELP_STRING([--with-debugdir=DIR], + [Path to directory for debug symbols. [PREFIX/lib/debug]]), + [debugdir_path=$withval], + [debugdir_path=$prefix/lib/debug]) + if test "$libexecdir" = '${exec_prefix}/libexec' ; then case "$host_os" in *netbsd*) ;; @@ -146,6 +152,9 @@ AC_SUBST(XEN_PAGING_DIR) XEN_DUMP_DIR=$xen_dumpdir_path AC_SUBST(XEN_DUMP_DIR) + +DEBUG_DIR=$debugdir_path +AC_SUBST(DEBUG_DIR) ]) case "$host_os" in diff --git a/tools/configure b/tools/configure index f3bb412f51..95b79acd3f 100755 --- a/tools/configure +++ b/tools/configure @@ -712,6 +712,7 @@ ocamltools monitors githttp rpath +DEBUG_DIR XEN_DUMP_DIR XEN_PAGING_DIR XEN_LOCK_DIR @@ -798,6 +799,7 @@ with_sysconfig_leaf_dir with_libexec_leaf_dir with_xen_dumpdir with_rundir +with_debugdir enable_rpath enable_githttp enable_monitors @@ -1514,6 +1516,8 @@ Optional Packages: [LOCALSTATEDIR/lib/xen/dump] --with-rundir=DIR Path to directory for runtime data. [LOCALSTATEDIR/run] + --with-debugdir=DIR Path to directory for debug symbols. + [PREFIX/lib/debug] --with-linux-backend-modules="mod1 mod2" List of Linux backend module or modalias names to be autoloaded on startup. @@ -3947,6 +3951,15 @@ else fi + +# Check whether --with-debugdir was given. +if test "${with_debugdir+set}" = set; then : + withval=$with_debugdir; debugdir_path=$withval +else + debugdir_path=$prefix/lib/debug +fi + + if test "$libexecdir" = '${exec_prefix}/libexec' ; then case "$host_os" in *netbsd*) ;; @@ -4010,6 +4023,9 @@ XEN_PAGING_DIR=$localstatedir/lib/xen/xenpaging XEN_DUMP_DIR=$xen_dumpdir_path +DEBUG_DIR=$debugdir_path + + # Enable/disable options _______________________________________________ Xen-devel mailing list Xen-devel@xxxxxxxxxxxxxxxxxxxx https://lists.xenproject.org/mailman/listinfo/xen-devel
|
Lists.xenproject.org is hosted with RackSpace, monitoring our |