OSDN Git Service

gcc/
authordoko <doko@138bc75d-0d04-0410-961f-82ee72b054a4>
Mon, 12 Apr 2010 23:58:18 +0000 (23:58 +0000)
committerMasaki Muranaka <monaka@monami-software.com>
Sun, 23 May 2010 05:31:51 +0000 (14:31 +0900)
2010-04-13  Matthias Klose  <doko@ubuntu.com>

* gcc.c (cc1_options): Handle -iplugindir before processing
the cc1 spec. Only add -iplugindir once.
(cpp_unique_options): Add -iplugindir option if -fplugin* options
found.
* common.opt (iplugindir): Remove `Separate' property, initialize.
* plugin.c (default_plugin_dir_name): Error with missing -iplugindir
option.
* Makefile.in (check-%, check-parallel-%): Create plugin dir.
(distclean): Remove plugin dir.

2010-04-13  Basile Starynkevitch  <basile@starynkevitch.net>

* doc/plugins.texi (Loading Plugins): Document short
-fplugin=foo option.
(Plugin API): Mention default_plugin_dir_name function.

* gcc.c (find_file_spec_function): Add new declaration.
(static_spec_func): Use it for "find-file".
(find_file_spec_function): Add new function.
(cc1_options): Add -iplugindir option if -fplugin* options found.

* gcc-plugin.h (default_plugin_dir_name): Added new declaration.

* plugin.c (add_new_plugin): Updated comment, and handle short
plugin name.
(default_plugin_dir_name): Added new function.

* common.opt (iplugindir): New option to set the plugin
directory.

gcc/testsuite/

2010-04-13  Matthias Klose  <doko@ubuntu.com>

* gcc.dg/plugindir1.c: New testcase.
* gcc.dg/plugindir2.c: New testcase.
* gcc.dg/plugindir3.c: New testcase.
* gcc.dg/plugindir4.c: New testcase.

git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@158247 138bc75d-0d04-0410-961f-82ee72b054a4

gcc/ChangeLog
gcc/doc/invoke.texi
gcc/plugin.c
gcc/testsuite/ChangeLog
gcc/testsuite/gcc.dg/plugindir1.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/plugindir2.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/plugindir3.c [new file with mode: 0644]
gcc/testsuite/gcc.dg/plugindir4.c [new file with mode: 0644]

index e4b9429..61706ee 100644 (file)
@@ -1,3 +1,36 @@
+2010-04-13  Matthias Klose  <doko@ubuntu.com>
+
+       * gcc.c (cc1_options): Handle -iplugindir before processing
+       the cc1 spec. Only add -iplugindir once.
+       (cpp_unique_options): Add -iplugindir option if -fplugin* options
+       found.
+       * common.opt (iplugindir): Remove `Separate' property, initialize.
+       * plugin.c (default_plugin_dir_name): Error with missing -iplugindir
+       option.
+       * Makefile.in (check-%, check-parallel-%): Create plugin dir.
+       (distclean): Remove plugin dir.
+       * doc/invoke.texi: Document -iplugindir.
+
+2010-04-13  Basile Starynkevitch  <basile@starynkevitch.net>
+
+       * doc/plugins.texi (Loading Plugins): Document short
+       -fplugin=foo option.
+       (Plugin API): Mention default_plugin_dir_name function.
+
+       * gcc.c (find_file_spec_function): Add new declaration.
+       (static_spec_func): Use it for "find-file".
+       (find_file_spec_function): Add new function.
+       (cc1_options): Add -iplugindir option if -fplugin* options found.
+
+       * gcc-plugin.h (default_plugin_dir_name): Added new declaration.
+
+       * plugin.c (add_new_plugin): Updated comment, and handle short
+       plugin name.
+       (default_plugin_dir_name): Added new function.
+
+       * common.opt (iplugindir): New option to set the plugin
+       directory.
+
 2010-04-12  Uros Bizjak  <ubizjak@gmail.com>
 
        * config/i386/i386.md (any_rotate): New code iterator.
 2010-04-12  Uros Bizjak  <ubizjak@gmail.com>
 
        * config/i386/i386.md (any_rotate): New code iterator.
index ce2d207..6afc713 100644 (file)
@@ -426,8 +426,9 @@ Objective-C and Objective-C++ Dialects}.
 
 @item Directory Options
 @xref{Directory Options,,Options for Directory Search}.
 
 @item Directory Options
 @xref{Directory Options,,Options for Directory Search}.
-@gccoptlist{-B@var{prefix}  -I@var{dir}  -iquote@var{dir}  -L@var{dir}
--specs=@var{file}  -I- --sysroot=@var{dir}}
+@gccoptlist{-B@var{prefix} -I@var{dir} -iplugindir=@var{dir}}
+-iquote@var{dir} -L@var{dir} -specs=@var{file} -I-
+--sysroot=@var{dir}
 
 @item Machine Dependent Options
 @xref{Submodel Options,,Hardware Models and Configurations}.
 
 @item Machine Dependent Options
 @xref{Submodel Options,,Hardware Models and Configurations}.
index 707d2dd..c0dd2ec 100644 (file)
@@ -139,8 +139,6 @@ add_new_plugin (const char* plugin_name)
   bool name_is_short;
   const char *pc;
 
   bool name_is_short;
   const char *pc;
 
-  flag_plugin_added = true;
-
   /* Replace short names by their full path when relevant.  */
   name_is_short  = !IS_ABSOLUTE_PATH (plugin_name);
   for (pc = plugin_name; name_is_short && *pc; pc++)
   /* Replace short names by their full path when relevant.  */
   name_is_short  = !IS_ABSOLUTE_PATH (plugin_name);
   for (pc = plugin_name; name_is_short && *pc; pc++)
index ebfa2a9..c02f860 100644 (file)
@@ -1,3 +1,10 @@
+2010-04-13  Matthias Klose  <doko@ubuntu.com>
+
+       * gcc.dg/plugindir1.c: New testcase.
+       * gcc.dg/plugindir2.c: New testcase.
+       * gcc.dg/plugindir3.c: New testcase.
+       * gcc.dg/plugindir4.c: New testcase.
+
 2010-04-12  Uros Bizjak  <ubizjak@gmail.com>
 
        * gcc.target/i386/rotate-2.c: New test.
 2010-04-12  Uros Bizjak  <ubizjak@gmail.com>
 
        * gcc.target/i386/rotate-2.c: New test.
diff --git a/gcc/testsuite/gcc.dg/plugindir1.c b/gcc/testsuite/gcc.dg/plugindir1.c
new file mode 100644 (file)
index 0000000..a973ec0
--- /dev/null
@@ -0,0 +1,4 @@
+/* { dg-do compile } */
+/* { dg-options "-c -fplugin=foo" } */
+
+/* { dg-prune-output ".*inacessible plugin file.*foo\.so expanded from short plugin name.*" } */
diff --git a/gcc/testsuite/gcc.dg/plugindir2.c b/gcc/testsuite/gcc.dg/plugindir2.c
new file mode 100644 (file)
index 0000000..58c1505
--- /dev/null
@@ -0,0 +1,4 @@
+/* { dg-do compile } */
+/* { dg-options "-save-temps -c -fplugin=foo" } */
+
+/* { dg-prune-output ".*inacessible plugin file.*foo\.so expanded from short plugin name.*" } */
diff --git a/gcc/testsuite/gcc.dg/plugindir3.c b/gcc/testsuite/gcc.dg/plugindir3.c
new file mode 100644 (file)
index 0000000..4103753
--- /dev/null
@@ -0,0 +1,4 @@
+/* { dg-do preprocess } */
+/* { dg-options "-fplugin=foo" } */
+
+/* { dg-prune-output ".*inacessible plugin file.*foo\.so expanded from short plugin name.*" } */
diff --git a/gcc/testsuite/gcc.dg/plugindir4.c b/gcc/testsuite/gcc.dg/plugindir4.c
new file mode 100644 (file)
index 0000000..27b2f24
--- /dev/null
@@ -0,0 +1,4 @@
+/* { dg-do preprocess } */
+/* { dg-options "-iplugindir=my-plugindir -fplugin=foo" } */
+
+/* { dg-prune-output ".*inacessible plugin file.*my-plugindir/foo\.so expanded from short plugin name.*" } */