This is the mail archive of the gcc-patches@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: [PATCH] to fix plugin.c bootstrap failure


On Sat, Oct 10, 2009 at 11:57 PM, Gerald Pfeifer <gerald@pfeifer.com> wrote:
> On FreeBSD dlerror actually is const char *dlerror(void), thus the
> following patch
>
> ?2009-10-09 ?Ian Lance Taylor ?<iant@google.com>
>
> ? ? ? ?* configure.ac: Use AC_SEARCH_LIBS to find dlopen.
> ? ? ? ?* configure: Rebuild.
>
> which enabled plugin support there indirectly breaks the bootstrap from
> what I can tell:
>
> ?/usr/test/gcc/gcc/plugin.c: In function 'try_init_one_plugin':
> ?/usr/test/gcc/gcc/plugin.c:437:12: error: assignment discards qualifiers
> ?from pointer target type
> ?gmake[3]: *** [plugin.o] Error 1
> ?gmake[3]: Leaving directory `/usr/nabil-files/pfeifer/OBJ-1010-2140/gcc'
> ?gmake[2]: *** [all-stage2-gcc] Error 2
>
>
> How about the patch below, assuming it passes bootstrap on
> i386-unknown-freebsd7.2 where it already is past the original
> point of failure?

Ok.

Thanks,
Richard.

> Gerald
>
>
> 2009-10-10 ?Gerald Pfeifer ?<gerald@pfeifer.com>
>
> ? ? ? ?* plugin.c (try_init_one_plugin): Improve constness of variable
> ? ? ? ?err.
>
> Index: plugin.c
> ===================================================================
> --- plugin.c ? ?(revision 152627)
> +++ plugin.c ? ?(working copy)
> @@ -408,7 +408,7 @@
> ?{
> ? void *dl_handle;
> ? plugin_init_func plugin_init;
> - ?char *err;
> + ?const char *err;
> ? PTR_UNION_TYPE (plugin_init_func) plugin_init_union;
>
> ? /* We use RTLD_NOW to accelerate binding and detect any mismatch
>


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]