Bug 47223 - Fail to build gcc 4.6.0 (r168594) on mingw32
Summary: Fail to build gcc 4.6.0 (r168594) on mingw32
Status: RESOLVED DUPLICATE of bug 47225
Alias: None
Product: gcc
Classification: Unclassified
Component: plugins (show other bugs)
Version: 4.6.0
: P3 normal
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-01-08 07:16 UTC by Yuan Pengfei
Modified: 2011-01-11 13:04 UTC (History)
0 users

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Yuan Pengfei 2011-01-08 07:16:00 UTC
configured with '--disable-shared'
so lto-plugin built as static library
when configuring target libgcc
failed with 'liblto_plugin-0.dll not found' error

I think there is something wrong with the option checking in gcc/gcc.c (line 6812)
LTOPLUGINSONAME is invalid when configured with '--disable-shared'
because there is no dynamic library
Comment 1 Dmitry Gorbachev 2011-01-08 14:01:47 UTC
Try to configure with `--disable-shared --enable-shared=lto-plugin'.
Comment 2 Jan Hubicka 2011-01-08 14:38:20 UTC
What is the failure?

Honza
Comment 3 Yuan Pengfei 2011-01-08 14:42:14 UTC
(In reply to comment #2)
> What is the failure?
> 
> Honza

when configuring target-libgcc,
failed with xgcc cannot create executable
config.log shows 'liblto_plugin-0.dll not found'
maybe -fuse-linker-plugin option not handled correctly
Comment 4 Jan Hubicka 2011-01-08 14:56:10 UTC
> when configuring target-libgcc,
> failed with xgcc cannot create executable
> config.log shows 'liblto_plugin-0.dll not found'
> maybe -fuse-linker-plugin option not handled correctly

Yes, it seems that linker plugin handling on cygwin is not done well.
Is linker plugin built for you and does the linker support it?

Honza
Comment 5 Yuan Pengfei 2011-01-08 15:05:29 UTC
(In reply to comment #4)
> > when configuring target-libgcc,
> > failed with xgcc cannot create executable
> > config.log shows 'liblto_plugin-0.dll not found'
> > maybe -fuse-linker-plugin option not handled correctly
> 
> Yes, it seems that linker plugin handling on cygwin is not done well.
> Is linker plugin built for you and does the linker support it?
> 
> Honza

lto and linker plugin was OK in 20110101 snapshot
in which '-fuse-linker-plugin' was off by default
but in rev 168594, the option becomes on by default

this option causes checking LTOPLUGINSONAME in gcc/gcc.c (line
6812 around), which is not built with '--disable-shared'

something is wrong either with makefile or with gcc/gcc.c
Comment 6 Jan Hubicka 2011-01-08 15:17:54 UTC
> lto and linker plugin was OK in 20110101 snapshot
> in which '-fuse-linker-plugin' was off by default
> but in rev 168594, the option becomes on by default

Yes, I've changed the default when linker is detected to have linker support and
lto-plugin is build.
> 
> this option causes checking LTOPLUGINSONAME in gcc/gcc.c (line
> 6812 around), which is not built with '--disable-shared'
> 
> something is wrong either with makefile or with gcc/gcc.c
How this worked before?
On windows I would expect LTOPLUGINSONAME to point to the plugin DLL...

Honza
Comment 7 Jan Hubicka 2011-01-08 18:58:46 UTC
Hi,
is this dup of PR47225?  I.e. is the --disable-shared the problem?

Honza
Comment 8 Jan Hubicka 2011-01-08 19:16:09 UTC
Hi,
I posed patch to the aforementioned PR, hopefully it will fix this one too.
Comment 9 Richard Biener 2011-01-11 13:04:30 UTC
dup

*** This bug has been marked as a duplicate of bug 47225 ***