From: asm warrior <asmwarrior@gmail.com>
To: Pierre Muller <pierre.muller@ics-cnrs.unistra.fr>
Cc: gdb-patches@sourceware.org, Eli Zaretskii <eliz@gnu.org>,
Tom Tromey <tromey@redhat.com>
Subject: Re: Possible fix for mingw32 directory relocation problems
Date: Tue, 17 Jan 2012 02:49:00 -0000 [thread overview]
Message-ID: <CAFVy0AZA2KqDiv+tRyX1RZweLMDw3Q5nsEEm628ixN2WiLdrtw@mail.gmail.com> (raw)
In-Reply-To: <4f143c35.4fecd80a.473e.ffffbd75SMTPIN_ADDED@mx.google.com>
On Mon, Jan 16, 2012 at 11:03 PM, Pierre Muller
<pierre.muller@ics-cnrs.unistra.fr> wrote:
>
> After some debugging,
> we finally managed to find out that
> mingw32 specific directory relocations are related
> to msys -> mingw32 argument conversions.
>
> http://sourceware.org/ml/gdb-patches/2012-01/msg00537.html
>
> This is explained in:
>
> http://www.mingw.org/wiki/Posix_path_conversion
>
> This page also allows to understand why
> using mingw32 style paths for prefix at configure
> level works and avoid the troubles encountered.
>
> This conversion concerns defines passed by command line arguments
> to gcc, which are specific to main.o
> compilation, as found in gdb/Makefile.in
> 1520-
> 1521:# main.o needs an explicit build rule to get TARGET_SYSTEM_ROOT and
> BINDIR.
> 1522-main.o: $(srcdir)/main.c
> 1523: $(COMPILE) $(TARGET_SYSTEM_ROOT_DEFINE) -DBINDIR=\"$(bindir)\"
> $(srcdir)/main.c
> 1524- $(POSTCOMPILE)
> 1525-
>
> But this leads to a conversion:
> -DBINDIR="/usr/local/bin\"
> gets transformed into '-D' 'BINDIR="E:/msys/mingw32/msys/1.0/local/bin"'
>
> While other pates used in relocate_gdb_directory calls
> are macros defined inside gdb/config.h
>
> config.h:#define DEBUGDIR "/usr/local/lib/debug"
> config.h:#define GDB_DATADIR "/usr/local/share/gdb"
> config.h:#define JIT_READER_DIR "/usr/local/lib/gdb"
>
> Those are of course not affected by msys command-line argument conversion.
>
> The first question is:
> Why do we need to pass BINDIR (and TARGET_SYSTEM_ROOT_DEFINE)
> at the command line instead of inside config.h as for other
> directories?
>
> If the answer to the first question is "we don't",
> then I need help about how to convert those
> Makefile.in variables into new entries of generated config.h file.
I agree that we don't need BINDIR=xxxxx in the compiler command line option.
>
> I don't have enough knowledge about autoconf scripts to
> handle this...
> An extra bonus of this change would be that it would
> render the special rule for main.o compilation unnecessary.
>
> Comments most welcome and help needed...
>
> Pierre Muller
> GDB pascal language maintainer
>
>
I'm not quite familiar with autoconf either. So, suppose we can put
BINDIR in config.h, I think we still have some problem.
Those values (DEBUGDIR, GDB_DATADIR, JIT_READER_DIR, BINDIR) were
macro definition strings, so there are location are still fixed.
But under Windows, I think there are many conditions that gdb.exe and
other related gdb's share folder will be copied and pasted to many
different paths. So, a true relocate scheme is still necessary.
asmwarrior
next parent reply other threads:[~2012-01-17 1:08 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <4f143c35.4fecd80a.473e.ffffbd75SMTPIN_ADDED@mx.google.com>
2012-01-17 2:49 ` asm warrior [this message]
[not found] ` <CADPb22SvBMEt9=EwMNZE6m+=_jfJZxTt1C2Pn-rH9OpHKUJCJQ@mail.gmail.com>
[not found] ` <4F150434.3020102@gmail.com>
[not found] ` <CADPb22TK7_csatjnORZoLeuRty9aXM+=hzBykYeWk6XzG-aPjQ@mail.gmail.com>
2012-01-17 6:48 ` asmwarrior
2012-01-17 7:00 ` Asmwarrior
[not found] <4f143c53.ca3c440a.1d95.ffff9b71SMTPIN_ADDED@mx.google.com>
2012-01-17 9:56 ` Doug Evans
2012-01-17 13:40 ` asmwarrior
2012-01-17 14:15 ` asmwarrior
2012-01-17 15:03 ` Pierre Muller
[not found] ` <4f158a75.65ecd80a.69cb.7083SMTPIN_ADDED@mx.google.com>
2012-01-17 15:34 ` asmwarrior
[not found] ` <4f158a77.833ed80a.629b.7837SMTPIN_ADDED@mx.google.com>
2012-01-17 16:11 ` Doug Evans
2012-01-18 19:01 ` Doug Evans
2012-01-16 15:17 Pierre Muller
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=CAFVy0AZA2KqDiv+tRyX1RZweLMDw3Q5nsEEm628ixN2WiLdrtw@mail.gmail.com \
--to=asmwarrior@gmail.com \
--cc=eliz@gnu.org \
--cc=gdb-patches@sourceware.org \
--cc=pierre.muller@ics-cnrs.unistra.fr \
--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