From: doko Date: Sat, 5 Jun 2010 15:07:32 +0000 (+0000) Subject: 2010-06-05 Matthias Klose X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=d6bff3e6520fc0288a2c6348b9c64c4b3df3cb92;p=thirdparty%2Fgcc.git 2010-06-05 Matthias Klose * 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". git-svn-id: svn+ssh://gcc.gnu.org/svn/gcc/trunk@160319 138bc75d-0d04-0410-961f-82ee72b054a4 --- diff --git a/gcc/ChangeLog b/gcc/ChangeLog index 6164ce7f4059..1f1c24a89d2a 100644 --- a/gcc/ChangeLog +++ b/gcc/ChangeLog @@ -1,3 +1,10 @@ +2010-06-05 Matthias Klose + + * 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 PR c++/44361 diff --git a/gcc/gcc.c b/gcc/gcc.c index 75409af5a851..03cfedc9a7b1 100644 --- a/gcc/gcc.c +++ b/gcc/gcc.c @@ -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= 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. */