This is the mail archive of the
gdb-patches@sourceware.org
mailing list for the GDB project.
Re: [PATCH 4/4] compile: Add 'set compile-gcc'
- From: Eli Zaretskii <eliz at gnu dot org>
- To: Jan Kratochvil <jan dot kratochvil at redhat dot com>
- Cc: gdb-patches at sourceware dot org, pmuldoon at redhat dot com
- Date: Fri, 24 Apr 2015 09:16:28 +0300
- Subject: Re: [PATCH 4/4] compile: Add 'set compile-gcc'
- Authentication-results: sourceware.org; auth=none
- References: <20150421213635 dot 14147 dot 15653 dot stgit at host1 dot jankratochvil dot net> <20150421213657 dot 14147 dot 60506 dot stgit at host1 dot jankratochvil dot net> <83ioco4oid dot fsf at gnu dot org> <20150423210916 dot GA8816 at host1 dot jankratochvil dot net>
- Reply-to: Eli Zaretskii <eliz at gnu dot org>
> Date: Thu, 23 Apr 2015 23:09:16 +0200
> From: Jan Kratochvil <jan.kratochvil@redhat.com>
> Cc: gdb-patches@sourceware.org, pmuldoon@redhat.com
>
> > > +Besides the compiler driver @value{GDBN} needs also shared library
> > > +@file{libcc1.so}. It is searched in default shared library search path
> > > +(overridable with usual environment variable @code{LD_LIBRARY_PATH}),
> > > +unrelated to @code{PATH} or @code{set compile-gcc} settings.
> >
> > This is Unix logic, btw. On Windows, libcc1.dll will either be in the
> > same directory where the GCC driver is, or on PATH, or in libexec. So
> > maybe you should qualify the above by saying this is on Posix hosts;
> > we could then amend it when this is supported on Windows (assuming it
> > isn't for now).
>
> I do not think it would work on MS-Windows host as gcc/libcc1/ uses:
> # If any of these functions are missing, simply don't bother building
> # this plugin.
> GCC_ENABLE_PLUGINS
> AC_CHECK_FUNC(socketpair, , enable_plugin=no)
> AC_CHECK_FUNC(select, , enable_plugin=no)
> AC_CHECK_FUNC(fork, , enable_plugin=no)
> AM_CONDITIONAL(ENABLE_PLUGIN, test $enable_plugin = yes)
You underestimate the hacker power ;-) Trust me, soon enough this
will work on Windows, and these conditions will then change. So I
still think we should qualify the above logic by saying that it is
specific to Posix systems.
Thanks.