diff options
author | Matthias Klose <doko@ubuntu.com> | 2010-06-05 15:07:32 +0000 |
---|---|---|
committer | Matthias Klose <doko@gcc.gnu.org> | 2010-06-05 15:07:32 +0000 |
commit | c1ce46a54585e1897e6226e880a1501a950f98f5 (patch) | |
tree | 1360183678bee3ef521c6cf60b009cc2d9b78c49 /gcc | |
parent | 913bf7d152ea277398385a275c88fbe5460351f5 (diff) | |
download | gcc-c1ce46a54585e1897e6226e880a1501a950f98f5.zip gcc-c1ce46a54585e1897e6226e880a1501a950f98f5.tar.gz gcc-c1ce46a54585e1897e6226e880a1501a950f98f5.tar.bz2 |
gcc.c (cc1_options, [...]): Use find-plugindir spec function to add the -iplugindir option.
2010-06-05 Matthias Klose <doko@ubuntu.com>
* gcc.c (cc1_options, cpp_unique_options): Use find-plugindir spec
function to add the -iplugindir option.
(find_plugindir_spec_function): Add new declaration and function.
(static_spec_func): Use it for "find-plugindir".
From-SVN: r160319
Diffstat (limited to 'gcc')
-rw-r--r-- | gcc/ChangeLog | 7 | ||||
-rw-r--r-- | gcc/gcc.c | 26 |
2 files changed, 29 insertions, 4 deletions
diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6164ce7..1f1c24a8 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2010-06-05 Matthias Klose <doko@ubuntu.com> + + * gcc.c (cc1_options, cpp_unique_options): Use find-plugindir spec + function to add the -iplugindir option. + (find_plugindir_spec_function): Add new declaration and function. + (static_spec_func): Use it for "find-plugindir". + 2010-06-05 Jakub Jelinek <jakub@redhat.com> PR c++/44361 @@ -399,6 +399,7 @@ static const char *replace_outfile_spec_function (int, const char **); static const char *version_compare_spec_function (int, const char **); static const char *include_spec_function (int, const char **); static const char *find_file_spec_function (int, const char **); +static const char *find_plugindir_spec_function (int, const char **); static const char *print_asm_header_spec_function (int, const char **); static const char *compare_debug_dump_opt_spec_function (int, const char **); static const char *compare_debug_self_opt_spec_function (int, const char **); @@ -862,7 +863,7 @@ static const char *cpp_unique_options = %{M} %{MM} %{MF*} %{MG} %{MP} %{MQ*} %{MT*}\ %{!E:%{!M:%{!MM:%{!MT:%{!MQ:%{MD|MMD:%{o*:-MQ %*}}}}}}}\ %{remap} %{g3|ggdb3|gstabs3|gcoff3|gxcoff3|gvms3:-dD}\ - %{!iplugindir*:%{fplugin*:-iplugindir=%:find-file(plugin)}}\ + %{!iplugindir*:%{fplugin*:%:find-plugindir()}}\ %{H} %C %{D*&U*&A*} %{i*} %Z %i\ %{fmudflap:-D_MUDFLAP -include mf-runtime.h}\ %{fmudflapth:-D_MUDFLAP -D_MUDFLAPTH -include mf-runtime.h}\ @@ -885,7 +886,7 @@ static const char *cpp_debug_options = "%{d*}"; /* NB: This is shared amongst all front-ends, except for Ada. */ static const char *cc1_options = "%{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\ - %{!iplugindir*:%{fplugin*:-iplugindir=%:find-file(plugin)}}\ + %{!iplugindir*:%{fplugin*:%:find-plugindir()}}\ %1 %{!Q:-quiet} %{!dumpbase:-dumpbase %B} %{d*} %{m*} %{a*}\ %{fcompare-debug-second:%:compare-debug-auxbase-opt(%b)} \ %{!fcompare-debug-second:%{c|S:%{o*:-auxbase-strip %*}%{!o*:-auxbase %b}}}%{!c:%{!S:-auxbase %b}} \ @@ -1719,6 +1720,7 @@ static const struct spec_function static_spec_functions[] = { "version-compare", version_compare_spec_function }, { "include", include_spec_function }, { "find-file", find_file_spec_function }, + { "find-plugindir", find_plugindir_spec_function }, { "print-asm-header", print_asm_header_spec_function }, { "compare-debug-dump-opt", compare_debug_dump_opt_spec_function }, { "compare-debug-self-opt", compare_debug_self_opt_spec_function }, @@ -8657,11 +8659,11 @@ include_spec_function (int argc, const char **argv) return NULL; } -/* %:find-file spec function. This function replace its argument by +/* %:find-file spec function. This function replaces its argument by the file found thru find_file, that is the -print-file-name gcc program option. */ static const char * -find_file_spec_function (int argc, const char**argv) +find_file_spec_function (int argc, const char **argv) { const char *file; @@ -8673,6 +8675,22 @@ find_file_spec_function (int argc, const char**argv) } +/* %:find-plugindir spec function. This function replaces its argument + by the -iplugindir=<dir> option. `dir' is found thru find_file, that + is the -print-file-name gcc program option. */ +static const char * +find_plugindir_spec_function (int argc, const char **argv ATTRIBUTE_UNUSED) +{ + const char *option; + + if (argc != 0) + abort (); + + option = concat ("-iplugindir=", find_file ("plugin"), NULL); + return option; +} + + /* %:print-asm-header spec function. Print a banner to say that the following output is from the assembler. */ |