From: Pedro Alves <palves@redhat.com>
To: Tom Tromey <tromey@redhat.com>
Cc: Joel Brobecker <brobecker@adacore.com>, gdb-patches@sourceware.org
Subject: Re: [RFA] nameless LOAD_DLL_DEBUG_EVENT causes ntdll.dll to be missing
Date: Fri, 13 Dec 2013 10:06:00 -0000 [thread overview]
Message-ID: <52AADC1D.9060207@redhat.com> (raw)
In-Reply-To: <87ob4lzpuf.fsf@fleche.redhat.com>
On 12/12/2013 10:06 PM, Tom Tromey wrote:
>>>>>> "Joel" == Joel Brobecker <brobecker@adacore.com> writes:
>
> Joel> which is good enough for our purposes. But for the second issue,
> Joel> I only had a handful of bad options for our current situation:
> Joel> 1. Import the module from gnulib; but that's never an innocent
> Joel> change, and also the documentation says that it does not work
> Joel> for Windows paths;
> Joel> 2. Import the libiberty module by hand, which itself depends on
> Joel> their safe-ctype.h module.
> Joel> 3. Write a quick ad hoc function that implements basename.
>
> Now that we are on git and can move stuff around without much hassle, I
> think it's a good time for someone to tackle rearranging the tree a bit
> so that this artificial "gdbserver cannot use libiberty" restriction can
> be lifted.
Not speaking for or against the plan, but I don't recall that the current
restriction was based on directory structure. With ACX_CONFIGURE_DIR, we
can build libiberty within gdbserver's build dir, like we do gnulib (see below),
so it seems that's a non-issue (even if that was is not the cleanest).
Rather, the main issue was that libiberty won't build out of the box on some
of the gdbserver targets, like Windows CE and Lynx, IIRC. CE is probably
already broken for a while, so it's fine with me to not have it
block such a change.
---
gdb/gdbserver/configure | 97 ++++++++++++++++++++++++++++++++++++++++++++++
gdb/gdbserver/configure.ac | 2 +
2 files changed, 99 insertions(+)
diff --git a/gdb/gdbserver/configure b/gdb/gdbserver/configure
index fac7fb3..9c49ae2 100755
--- a/gdb/gdbserver/configure
+++ b/gdb/gdbserver/configure
@@ -4714,6 +4714,103 @@ $as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cach
cd "$ac_popdir"
+
+ in_src="../../libiberty"
+ in_build="build-libiberty-gdbserver"
+
+ # Remove --cache-file, --srcdir, and --disable-option-checking arguments
+ # so they do not pile up.
+ ac_sub_configure_args=
+ ac_prev=
+ eval "set x $ac_configure_args"
+ shift
+ for ac_arg
+ do
+ if test -n "$ac_prev"; then
+ ac_prev=
+ continue
+ fi
+ case $ac_arg in
+ -cache-file | --cache-file | --cache-fil | --cache-fi \
+ | --cache-f | --cache- | --cache | --cach | --cac | --ca | --c)
+ ac_prev=cache_file ;;
+ -cache-file=* | --cache-file=* | --cache-fil=* | --cache-fi=* \
+ | --cache-f=* | --cache-=* | --cache=* | --cach=* | --cac=* | --ca=* \
+ | --c=*)
+ ;;
+ --config-cache | -C)
+ ;;
+ -srcdir | --srcdir | --srcdi | --srcd | --src | --sr)
+ ac_prev=srcdir ;;
+ -srcdir=* | --srcdir=* | --srcdi=* | --srcd=* | --src=* | --sr=*)
+ ;;
+ -prefix | --prefix | --prefi | --pref | --pre | --pr | --p)
+ ac_prev=prefix ;;
+ -prefix=* | --prefix=* | --prefi=* | --pref=* | --pre=* | --pr=* | --p=*)
+ ;;
+ --disable-option-checking)
+ ;;
+ *)
+ case $ac_arg in
+ *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ as_fn_append ac_sub_configure_args " '$ac_arg'" ;;
+ esac
+ done
+
+ # Always prepend --prefix to ensure using the same prefix
+ # in subdir configurations.
+ ac_arg="--prefix=$prefix"
+ case $ac_arg in
+ *\'*) ac_arg=`$as_echo "$ac_arg" | sed "s/'/'\\\\\\\\''/g"` ;;
+ esac
+ ac_sub_configure_args="'$ac_arg' $ac_sub_configure_args"
+
+ # Pass --silent
+ if test "$silent" = yes; then
+ ac_sub_configure_args="--silent $ac_sub_configure_args"
+ fi
+
+ # Always prepend --disable-option-checking to silence warnings, since
+ # different subdirs can have different --enable and --with options.
+ ac_sub_configure_args="--disable-option-checking $ac_sub_configure_args"
+
+ ac_popdir=`pwd`
+ ac_dir=$in_build
+
+ ac_msg="=== configuring in $ac_dir (`pwd`/$ac_dir)"
+ $as_echo "$as_me:${as_lineno-$LINENO}: $ac_msg" >&5
+ $as_echo "$ac_msg" >&6
+ as_dir="$ac_dir"; as_fn_mkdir_p
+
+ case $srcdir in
+ [\\/]* | ?:[\\/]* )
+ ac_srcdir=$srcdir/$in_src ;;
+ *) # Relative name.
+ ac_srcdir=../$srcdir/$in_src ;;
+ esac
+
+ cd "$ac_dir"
+
+ ac_sub_configure=$ac_srcdir/configure
+
+ # Make the cache file name correct relative to the subdirectory.
+ case $cache_file in
+ [\\/]* | ?:[\\/]* ) ac_sub_cache_file=$cache_file ;;
+ *) # Relative name.
+ ac_sub_cache_file=$ac_top_build_prefix$cache_file ;;
+ esac
+
+ { $as_echo "$as_me:${as_lineno-$LINENO}: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&5
+$as_echo "$as_me: running $SHELL $ac_sub_configure $ac_sub_configure_args --cache-file=$ac_sub_cache_file --srcdir=$ac_srcdir" >&6;}
+ # The eval makes quoting arguments work.
+ eval "\$SHELL \"\$ac_sub_configure\" $ac_sub_configure_args \
+ --cache-file=\"\$ac_sub_cache_file\" --srcdir=\"\$ac_srcdir\"" ||
+ as_fn_error "$ac_sub_configure failed for $ac_dir" "$LINENO" 5
+
+ cd "$ac_popdir"
+
+
for ac_header in sgtty.h termio.h termios.h sys/reg.h string.h proc_service.h sys/procfs.h linux/elf.h errno.h fcntl.h signal.h sys/file.h malloc.h sys/ioctl.h netinet/in.h sys/socket.h netdb.h netinet/tcp.h arpa/inet.h
do :
as_ac_Header=`$as_echo "ac_cv_header_$ac_header" | $as_tr_sh`
diff --git a/gdb/gdbserver/configure.ac b/gdb/gdbserver/configure.ac
index 1c61843..5b39acc 100644
--- a/gdb/gdbserver/configure.ac
+++ b/gdb/gdbserver/configure.ac
@@ -77,6 +77,8 @@ AC_PROG_MAKE_SET
# build it in the same directory, when building in the source dir.
ACX_CONFIGURE_DIR(["../gnulib"], ["build-gnulib-gdbserver"])
+ACX_CONFIGURE_DIR(["../../libiberty"], ["build-libiberty-gdbserver"])
+
AC_CHECK_HEADERS(sgtty.h termio.h termios.h sys/reg.h string.h dnl
proc_service.h sys/procfs.h linux/elf.h dnl
errno.h fcntl.h signal.h sys/file.h malloc.h dnl
--
1.7.11.7
next prev parent reply other threads:[~2013-12-13 10:06 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2013-12-03 11:31 Joel Brobecker
2013-12-03 19:51 ` Pedro Alves
2013-12-03 20:11 ` Eli Zaretskii
2013-12-05 10:54 ` Joel Brobecker
2013-12-05 12:38 ` Pedro Alves
2013-12-09 11:33 ` Joel Brobecker
2013-12-09 17:08 ` Pedro Alves
2013-12-10 10:06 ` pushed: " Joel Brobecker
2013-12-10 10:06 ` Joel Brobecker
2013-12-10 10:56 ` Joel Brobecker
2013-12-10 13:41 ` Pedro Alves
2013-12-10 13:58 ` Pedro Alves
2013-12-12 18:18 ` Joel Brobecker
2013-12-12 18:51 ` Eli Zaretskii
2013-12-12 19:08 ` Pedro Alves
2013-12-12 22:06 ` Tom Tromey
2013-12-13 10:06 ` Pedro Alves [this message]
2013-12-13 11:04 ` Joel Brobecker
2013-12-13 11:21 ` Pedro Alves
2013-12-13 19:38 ` Tom Tromey
2013-12-13 14:17 ` Joel Brobecker
2013-12-13 14:42 ` Pedro Alves
2013-12-13 15:45 ` Joel Brobecker
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=52AADC1D.9060207@redhat.com \
--to=palves@redhat.com \
--cc=brobecker@adacore.com \
--cc=gdb-patches@sourceware.org \
--cc=tromey@redhat.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox