Checking -fPIC Failed when building the gcc 4.5.1 with --enable-plugin on cygwin

Ian Lance Taylor iant@google.com
Fri Dec 24 00:09:00 GMT 2010


Lucky Lu <Lucky.Lu@exigenservices.com> writes:

> I am having trouble with building the gcc 4.5.1 with --enable-plugin on Cygwin.

As far as I know gcc plugins don't work on cygwin.

> The configure string is "--enable-plugin --enable-languages=c,c++ --disable-bootstrap".
> The error is ,
>   checking for -rdynamic... objdump: conftest: not a dynamic object no
>   checking for library containing dlopen... none required
>   checking for -fPIC -shared... no
>   configure: error:
>   Building GCC with plugin support requires a host that supports
>   -fPIC, -shared, -ldl and -rdynamic.
>   make[1]: *** [configure-gcc] Error 1
>
> When I jump the -fPIC checking, it's success. And then failed when building a gcc plugin, print following,
>
>   plugin.c:1:0: warning: -fPIC ignored for target (all code is position independent)
>   /tmp/ccU93aXF.o:plugin.c:(.text+0xd1): undefined reference to `_build3_stat'
>   /tmp/ccU93aXF.o:plugin.c:(.text+0xff): undefined reference to `_gimple_assign_single_p'
>   .....

That's in essence because -rdynamic doesn't do anything on Windows.  It
goes further, in that I don't know that there is any way it can be made
to work given the way that Windows DLLs work.  There may be some way to
make it work; I just don't know of one.

Ian



More information about the Gcc-help mailing list