From: espindola Date: Wed, 29 Apr 2009 13:20:53 +0000 (+0000) Subject: 2009-04-29 Rafael Avila de Espindola X-Git-Tag: upstream/4.9.2~36283 X-Git-Url: http://review.tizen.org/git/?a=commitdiff_plain;h=e8ad34e4a69a29cb786009ded39aa33ab13cf6bf;p=platform%2Fupstream%2Flinaro-gcc.git 2009-04-29 Rafael Avila de Espindola * Makefile.in (PLUGIN_VERSION_H): New. (OBJS-common): Remove plugin-version.o. (plugin.o): Depend on (PLUGIN_VERSION_H). (plugin-version.o): Remove. * configure: Regenerate * configure.ac: Create plugin-version.h. * gcc-plugin.h (plugin_gcc_version): Remove. (plugin_default_version_check): Change signature. * plugin-version.c: Remove. * plugin.c: Include plugin-version.h. (str_plugin_gcc_version_name): Remove. (try_init_one_plugin): Pass gcc version to plugin_init. (plugin_default_version_check): Both gcc and plugin versions are now arguments. git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@146962 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 883f1b8..8b95f61 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,20 @@ +2009-04-29 Rafael Avila de Espindola + + * Makefile.in (PLUGIN_VERSION_H): New. + (OBJS-common): Remove plugin-version.o. + (plugin.o): Depend on (PLUGIN_VERSION_H). + (plugin-version.o): Remove. + * configure: Regenerate + * configure.ac: Create plugin-version.h. + * gcc-plugin.h (plugin_gcc_version): Remove. + (plugin_default_version_check): Change signature. + * plugin-version.c: Remove. + * plugin.c: Include plugin-version.h. + (str_plugin_gcc_version_name): Remove. + (try_init_one_plugin): Pass gcc version to plugin_init. + (plugin_default_version_check): Both gcc and plugin versions are now + arguments. + 2009-04-29 Bernd Schmidt * config/bfin/bfin.c (bfin_optimize_loop): Unify handling of diff --git a/gcc/Makefile.in b/gcc/Makefile.in index e01f0fb..2283138 100644 --- a/gcc/Makefile.in +++ b/gcc/Makefile.in @@ -881,6 +881,7 @@ IPA_PROP_H = ipa-prop.h $(TREE_H) vec.h $(CGRAPH_H) GSTAB_H = gstab.h stab.def BITMAP_H = bitmap.h $(HASHTAB_H) statistics.h PLUGIN_H = plugin.h gcc-plugin.h +PLUGIN_VERSION_H = plugin-version.h configargs.h # # Now figure out from those variables how to compile and link. @@ -1158,7 +1159,6 @@ OBJS-common = \ params.o \ passes.o \ plugin.o \ - plugin-version.o \ pointer-set.o \ postreload-gcse.o \ postreload.o \ @@ -2475,13 +2475,7 @@ passes.o : passes.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TREE_H) \ gt-passes.h $(DF_H) $(PREDICT_H) plugin.o : plugin.c $(PLUGIN_H) $(CONFIG_H) $(SYSTEM_H) coretypes.h \ - $(TOPLEV_H) $(TREE_H) $(TREE_PASS_H) intl.h - -plugin-version.o : plugin-version.c $(SYSTEM_H) gcc-plugin.h configargs.h - $(CC) $(ALL_CFLAGS) $(ALL_CPPFLAGS) \ - -DBASEVER=$(BASEVER_s) -DDATESTAMP=$(DATESTAMP_s) \ - -DREVISION=$(REVISION_s) -DDEVPHASE=$(DEVPHASE_s) -c \ - -DPLUGIN $(srcdir)/plugin-version.c $(OUTPUT_OPTION) + $(TOPLEV_H) $(TREE_H) $(TREE_PASS_H) intl.h $(PLUGIN_VERSION_H) main.o : main.c $(CONFIG_H) $(SYSTEM_H) coretypes.h $(TM_H) $(TOPLEV_H) diff --git a/gcc/configure b/gcc/configure index 2415a6c..e96fcf5 100755 --- a/gcc/configure +++ b/gcc/configure @@ -13451,6 +13451,30 @@ static const struct { } configure_default_options[] = $configure_default_options; EOF +gcc_BASEVER=$(cat $srcdir/BASE-VER) +gcc_DEVPHASE=$(cat $srcdir/DEV-PHASE) +gcc_DATESTAMP=$(cat $srcdir/DATESTAMP) +if test -f $srcdir/REVISION ; then + gcc_REVISION=$(cat $srcdir/REVISION) +else + gcc_REVISION="" +fi +cat > plugin-version.h < conftest.$ac_ext - (eval echo "\"\$as_me:14362: $ac_compile\"" >&5) + (eval echo "\"\$as_me:14386: $ac_compile\"" >&5) (eval "$ac_compile" 2>conftest.err) cat conftest.err >&5 - (eval echo "\"\$as_me:14365: $NM \\\"conftest.$ac_objext\\\"\"" >&5) + (eval echo "\"\$as_me:14389: $NM \\\"conftest.$ac_objext\\\"\"" >&5) (eval "$NM \"conftest.$ac_objext\"" 2>conftest.err > conftest.out) cat conftest.err >&5 - (eval echo "\"\$as_me:14368: output\"" >&5) + (eval echo "\"\$as_me:14392: output\"" >&5) cat conftest.out >&5 if $GREP 'External.*some_variable' conftest.out > /dev/null; then lt_cv_nm_interface="MS dumpbin" @@ -15522,7 +15546,7 @@ ia64-*-hpux*) ;; *-*-irix6*) # Find out which ABI we are using. - echo '#line 15525 "configure"' > conftest.$ac_ext + echo '#line 15549 "configure"' > conftest.$ac_ext if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 (eval $ac_compile) 2>&5 ac_status=$? @@ -16821,11 +16845,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:16824: $lt_compile\"" >&5) + (eval echo "\"\$as_me:16848: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:16828: \$? = $ac_status" >&5 + echo "$as_me:16852: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -17160,11 +17184,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:17163: $lt_compile\"" >&5) + (eval echo "\"\$as_me:17187: $lt_compile\"" >&5) (eval "$lt_compile" 2>conftest.err) ac_status=$? cat conftest.err >&5 - echo "$as_me:17167: \$? = $ac_status" >&5 + echo "$as_me:17191: \$? = $ac_status" >&5 if (exit $ac_status) && test -s "$ac_outfile"; then # The compiler can only warn and ignore the option if not recognized # So say no if there are warnings other than the usual output. @@ -17265,11 +17289,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:17268: $lt_compile\"" >&5) + (eval echo "\"\$as_me:17292: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:17272: \$? = $ac_status" >&5 + echo "$as_me:17296: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -17320,11 +17344,11 @@ else -e 's:.*FLAGS}\{0,1\} :&$lt_compiler_flag :; t' \ -e 's: [^ ]*conftest\.: $lt_compiler_flag&:; t' \ -e 's:$: $lt_compiler_flag:'` - (eval echo "\"\$as_me:17323: $lt_compile\"" >&5) + (eval echo "\"\$as_me:17347: $lt_compile\"" >&5) (eval "$lt_compile" 2>out/conftest.err) ac_status=$? cat out/conftest.err >&5 - echo "$as_me:17327: \$? = $ac_status" >&5 + echo "$as_me:17351: \$? = $ac_status" >&5 if (exit $ac_status) && test -s out/conftest2.$ac_objext then # The compiler can only warn and ignore the option if not recognized @@ -20132,7 +20156,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 20135 "configure" +#line 20159 "configure" #include "confdefs.h" #if HAVE_DLFCN_H @@ -20228,7 +20252,7 @@ else lt_dlunknown=0; lt_dlno_uscore=1; lt_dlneed_uscore=2 lt_status=$lt_dlunknown cat > conftest.$ac_ext <<_LT_EOF -#line 20231 "configure" +#line 20255 "configure" #include "confdefs.h" #if HAVE_DLFCN_H diff --git a/gcc/configure.ac b/gcc/configure.ac index 849b856..306adc1 100644 --- a/gcc/configure.ac +++ b/gcc/configure.ac @@ -1495,6 +1495,32 @@ static const struct { EOF changequote([,])dnl +changequote(,)dnl +gcc_BASEVER=$(cat $srcdir/BASE-VER) +gcc_DEVPHASE=$(cat $srcdir/DEV-PHASE) +gcc_DATESTAMP=$(cat $srcdir/DATESTAMP) +if test -f $srcdir/REVISION ; then + gcc_REVISION=$(cat $srcdir/REVISION) +else + gcc_REVISION="" +fi +cat > plugin-version.h <full_name, RTLD_NOW); if (!dl_handle) @@ -593,12 +591,9 @@ try_init_one_plugin (struct plugin_name_args *plugin) return false; } - PTR_UNION_AS_VOID_PTR (version_union) = - dlsym (dl_handle, str_plugin_gcc_version_name); - version = PTR_UNION_AS_CAST_PTR (version_union); - /* Call the plugin-provided initialization routine with the arguments. */ - if ((*plugin_init) (plugin->base_name, version, plugin->argc, plugin->argv)) + if ((*plugin_init) (plugin->base_name, &gcc_version, plugin->argc, + plugin->argv)) { error ("Fail to initialize plugin %s", plugin->full_name); return false; @@ -816,22 +811,23 @@ debug_active_plugins (void) /* The default version check. Compares every field in VERSION. */ bool -plugin_default_version_check(struct plugin_gcc_version *version) +plugin_default_version_check (struct plugin_gcc_version *gcc_version, + struct plugin_gcc_version *plugin_version) { /* version is NULL if the plugin was not linked with plugin-version.o */ - if (!version) + if (!gcc_version || !plugin_version) return false; - if (strcmp (version->basever, plugin_gcc_version.basever)) + if (strcmp (gcc_version->basever, plugin_version->basever)) return false; - if (strcmp (version->datestamp, plugin_gcc_version.datestamp)) + if (strcmp (gcc_version->datestamp, plugin_version->datestamp)) return false; - if (strcmp (version->devphase, plugin_gcc_version.devphase)) + if (strcmp (gcc_version->devphase, plugin_version->devphase)) return false; - if (strcmp (version->revision, plugin_gcc_version.revision)) + if (strcmp (gcc_version->revision, plugin_version->revision)) return false; - if (strcmp (version->configuration_arguments, - plugin_gcc_version.configuration_arguments)) + if (strcmp (gcc_version->configuration_arguments, + plugin_version->configuration_arguments)) return false; return true; }