File gcc-add-defaultsspec.diff of Package gcc12 (Revision 2fa8203bb0ccce654b92f89b151f33af)
Currently displaying revision 2fa8203bb0ccce654b92f89b151f33af , Show latest
52
1
Index: gcc/gcc.cc
2
===================================================================
3
--- gcc/gcc.cc.orig 2013-11-26 15:41:59.000000000 +0100
4
+++ gcc/gcc.cc 2013-11-26 16:40:35.780548125 +0100
5
6
static const char *remove_outfile_spec_function (int, const char **);
7
static const char *version_compare_spec_function (int, const char **);
8
static const char *include_spec_function (int, const char **);
9
+static const char *include_noerr_spec_function (int, const char **);
10
static const char *find_file_spec_function (int, const char **);
11
static const char *find_plugindir_spec_function (int, const char **);
12
static const char *print_asm_header_spec_function (int, const char **);
13
14
{ "remove-outfile", remove_outfile_spec_function },
15
{ "version-compare", version_compare_spec_function },
16
{ "include", include_spec_function },
17
+ { "include_noerr", include_noerr_spec_function },
18
{ "find-file", find_file_spec_function },
19
{ "find-plugindir", find_plugindir_spec_function },
20
{ "print-asm-header", print_asm_header_spec_function },
21
22
if (access (specs_file, R_OK) == 0)
23
read_specs (specs_file, true, false);
24
25
+ do_self_spec ("%:include_noerr(defaults.spec)%(default_spec)");
26
+
27
/* Process any configure-time defaults specified for the command line
28
options, via OPTION_DEFAULT_SPECS. */
29
for (i = 0; i < ARRAY_SIZE (option_default_specs); i++)
30
31
return ret ^ getpid ();
32
}
33
34
+static const char *
35
+include_noerr_spec_function (int argc, const char **argv)
36
+{
37
+ char *file;
38
+
39
+ if (argc != 1)
40
+ abort ();
41
+
42
+ file = find_a_file (&startfile_prefixes, argv[0], R_OK, 0);
43
+ if (file)
44
+ read_specs (file, FALSE, TRUE);
45
+
46
+ return NULL;
47
+}
48
+
49
/* %:compare-debug-dump-opt spec function. Save the last argument,
50
expected to be the last -fdump-final-insns option, or generate a
51
temporary. */
52