Bug 39968 - Should plugins use shared library?
Summary: Should plugins use shared library?
Status: RESOLVED FIXED
Alias: None
Product: gcc
Classification: Unclassified
Component: bootstrap (show other bugs)
Version: 4.5.0
: P3 enhancement
Target Milestone: ---
Assignee: Not yet assigned to anyone
URL:
Keywords: build
Depends on:
Blocks:
 
Reported: 2009-04-29 17:19 UTC by Dominique d'Humieres
Modified: 2013-10-05 12:58 UTC (History)
5 users (show)

See Also:
Host:
Target:
Build:
Known to work:
Known to fail:
Last reconfirmed: 2009-04-30 00:34:30


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Dominique d'Humieres 2009-04-29 17:19:05 UTC
Yet another bootstrap error on i686-apple-darwin9:

...
/opt/gcc/i686-darwin/./prev-gcc/xgcc -B/opt/gcc/i686-darwin/./prev-gcc/ -B/opt/gcc/gcc4.5w/i686-apple-darwin9/bin/ -c  -g -O2 -fomit-frame-pointer -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing-prototypes -Wcast-qual -Wold-style-definition -Wc++-compat -Wmissing-format-attribute -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength-strings -Werror -fno-common  -DHAVE_CONFIG_H -I. -I. -I../../gcc-4.5-work/gcc -I../../gcc-4.5-work/gcc/. -I../../gcc-4.5-work/gcc/../include -I./../intl -I../../gcc-4.5-work/gcc/../libcpp/include -I/sw/include  -I../../gcc-4.5-work/gcc/../libdecnumber -I../../gcc-4.5-work/gcc/../libdecnumber/dpd -I../libdecnumber -I/sw/include  -I/sw/include -DCLOOG_PPL_BACKEND   ../../gcc-4.5-work/gcc/pointer-set.c -o pointer-set.o
cc1: warnings being treated as errors
./plugin-version.h:11: error: 'gcc_version' defined but not used
make[3]: *** [plugin.o] Error 1
make[3]: *** Waiting for unfinished jobs....
rm gcj-dbtool.pod fsf-funding.pod jcf-dump.pod jv-convert.pod grmic.pod gcov.pod gcj.pod gc-analyze.pod gfdl.pod cpp.pod gij.pod gcc.pod gfortran.pod
make[2]: *** [all-stage2-gcc] Error 2
make[1]: *** [stage2-bubble] Error 2
make: *** [all] Error 2
Comment 1 pinskia@gmail.com 2009-04-29 23:13:31 UTC
Subject: Re:   New: [4.5 Regression] ./plugin-version.h:11: error: 'gcc_version' defined but not used

Looks like this failson non elf hosts (well darwin supports dlopen so  
I don't understand why it fails on darwin).

Sent from my iPhone

On Apr 29, 2009, at 10:19 AM, "dominiq at lps dot ens dot fr" <gcc-bugzilla@gcc.gnu.org 
 > wrote:

> Yet another bootstrap error on i686-apple-darwin9:
>
> ...
> /opt/gcc/i686-darwin/./prev-gcc/xgcc -B/opt/gcc/i686-darwin/./prev- 
> gcc/
> -B/opt/gcc/gcc4.5w/i686-apple-darwin9/bin/ -c  -g -O2 -fomit-frame- 
> pointer
> -DIN_GCC   -W -Wall -Wwrite-strings -Wstrict-prototypes -Wmissing- 
> prototypes
> -Wcast-qual -Wold-style-definition -Wc++-compat -Wmissing-format- 
> attribute
> -pedantic -Wno-long-long -Wno-variadic-macros -Wno-overlength- 
> strings -Werror
> -fno-common  -DHAVE_CONFIG_H -I. -I. -I../../gcc-4.5-work/gcc
> -I../../gcc-4.5-work/gcc/. -I../../gcc-4.5-work/gcc/../include - 
> I./../intl
> -I../../gcc-4.5-work/gcc/../libcpp/include -I/sw/include
> -I../../gcc-4.5-work/gcc/../libdecnumber
> -I../../gcc-4.5-work/gcc/../libdecnumber/dpd -I../libdecnumber -I/sw/ 
> include
> -I/sw/include -DCLOOG_PPL_BACKEND   ../../gcc-4.5-work/gcc/pointer- 
> set.c -o
> pointer-set.o
> cc1: warnings being treated as errors
> ./plugin-version.h:11: error: 'gcc_version' defined but not used
> make[3]: *** [plugin.o] Error 1
> make[3]: *** Waiting for unfinished jobs....
> rm gcj-dbtool.pod fsf-funding.pod jcf-dump.pod jv-convert.pod  
> grmic.pod
> gcov.pod gcj.pod gc-analyze.pod gfdl.pod cpp.pod gij.pod gcc.pod  
> gfortran.pod
> make[2]: *** [all-stage2-gcc] Error 2
> make[1]: *** [stage2-bubble] Error 2
> make: *** [all] Error 2
>
>
> -- 
>           Summary: [4.5 Regression] ./plugin-version.h:11: error:
>                    'gcc_version' defined but not used
>           Product: gcc
>           Version: 4.5.0
>            Status: UNCONFIRMED
>          Severity: normal
>          Priority: P3
>         Component: bootstrap
>        AssignedTo: unassigned at gcc dot gnu dot org
>        ReportedBy: dominiq at lps dot ens dot fr
> GCC build triplet: i686-apple-darwin9
>  GCC host triplet: i686-apple-darwin9
> GCC target triplet: i686-apple-darwin9
>
>
> http://gcc.gnu.org/bugzilla/show_bug.cgi?id=39968
>
Comment 2 lcwu 2009-04-30 00:34:30 UTC
The sole use of gcc_version in plugin.c is in function try_init_one_plugin, which is guarded by the macro ENABLE_PLUGIN. Since ENABLE_PLUGIN is set to 0 on the Darwin systems, the function was compiled out. I think we need to guard the inclusion of plugin-version.h with ENABLE_PLUGIN as well.
Comment 3 Andrew Pinski 2009-04-30 00:40:47 UTC
Really I think plugin support is flawed.  There should really be a shared library which the plugins link against and this library is what the main GCC links against too.  
Comment 4 Rafael Avila de Espindola 2009-04-30 08:07:32 UTC
Probably fixed on 146998.

Andrew Pinski, we cannot use a shared library for this. The idea is for the plugin to remember what gcc version it was compiled for. A shared library can change after the fact.
Comment 5 jsm-csl@polyomino.org.uk 2009-04-30 10:09:47 UTC
Subject: Re:  [4.5 Regression] ./plugin-version.h:11:
 error: 'gcc_version' defined but not used

On Thu, 30 Apr 2009, pinskia at gcc dot gnu dot org wrote:

> Really I think plugin support is flawed.  There should really be a shared
> library which the plugins link against and this library is what the main GCC
> links against too.  

This may be needed to support plugins on Windows hosts (and plugins do 
definitely need a common GCC-provided build infrastructure so that plugins 
people write will naturally build for other OSes as soon as support for 
them is added to that infrastructure), but we should not need to slow down 
GCC on Linux hosts by putting most of it in a shared library.

Comment 6 Dominique d'Humieres 2009-05-04 11:42:31 UTC
This pr is fixed as long as *-apple-darwin9 is concerned. Due to comments #3 to #5, I don't close it as fixed. If someone wants to keep this PR open, (s)he should change subject and priority.

Comment 7 Francois-Xavier Coudert 2009-06-03 21:35:06 UTC
Changing subject according to comment #6.
Comment 8 Richard Biener 2010-04-06 11:20:04 UTC
GCC 4.5.0 is being released.  Deferring to 4.5.1.
Comment 9 Richard Biener 2010-07-31 09:29:24 UTC
GCC 4.5.1 is being released, adjusting target milestone.
Comment 10 Richard Biener 2010-12-16 13:03:43 UTC
GCC 4.5.2 is being released, adjusting target milestone.
Comment 11 Dominique d'Humieres 2013-07-30 07:43:46 UTC
Any point to keep this four year old PR open?
Comment 12 Dominique d'Humieres 2013-10-05 12:58:15 UTC
> Any point to keep this four year old PR open?

No answer since two months, closing as fixed.
Please open a new PR for plugin problems.