Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
R
riscv-gcc-1
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
lvzhengyang
riscv-gcc-1
Commits
d9ac3a07
Commit
d9ac3a07
authored
Oct 29, 1996
by
Michael Meissner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add -specs support
From-SVN: r13075
parent
47a22692
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
52 additions
and
1 deletions
+52
-1
gcc/gcc.c
+52
-1
No files found.
gcc/gcc.c
View file @
d9ac3a07
...
@@ -513,6 +513,13 @@ static char *multilib_defaults_raw[] = MULTILIB_DEFAULTS;
...
@@ -513,6 +513,13 @@ static char *multilib_defaults_raw[] = MULTILIB_DEFAULTS;
static
struct
{
char
*
name
,
*
spec
;
}
extra_specs
[]
=
{
EXTRA_SPECS
};
static
struct
{
char
*
name
,
*
spec
;
}
extra_specs
[]
=
{
EXTRA_SPECS
};
#endif
#endif
struct
user_specs
{
struct
user_specs
*
next
;
char
*
filename
;
};
static
struct
user_specs
*
user_specs_head
,
*
user_specs_tail
;
/* This defines which switch letters take arguments. */
/* This defines which switch letters take arguments. */
#define DEFAULT_SWITCH_TAKES_ARG(CHAR) \
#define DEFAULT_SWITCH_TAKES_ARG(CHAR) \
...
@@ -533,7 +540,7 @@ static struct { char *name, *spec; } extra_specs[] = { EXTRA_SPECS };
...
@@ -533,7 +540,7 @@ static struct { char *name, *spec; } extra_specs[] = { EXTRA_SPECS };
|| !strcmp (STR, "imacros") || !strcmp (STR, "aux-info") \
|| !strcmp (STR, "imacros") || !strcmp (STR, "aux-info") \
|| !strcmp (STR, "idirafter") || !strcmp (STR, "iprefix") \
|| !strcmp (STR, "idirafter") || !strcmp (STR, "iprefix") \
|| !strcmp (STR, "iwithprefix") || !strcmp (STR, "iwithprefixbefore") \
|| !strcmp (STR, "iwithprefix") || !strcmp (STR, "iwithprefixbefore") \
|| !strcmp (STR, "isystem"))
|| !strcmp (STR, "isystem")
|| !strcmp (STR, "specs")
)
#ifndef WORD_SWITCH_TAKES_ARG
#ifndef WORD_SWITCH_TAKES_ARG
#define WORD_SWITCH_TAKES_ARG(STR) DEFAULT_WORD_SWITCH_TAKES_ARG (STR)
#define WORD_SWITCH_TAKES_ARG(STR) DEFAULT_WORD_SWITCH_TAKES_ARG (STR)
...
@@ -815,6 +822,7 @@ struct option_map option_map[] =
...
@@ -815,6 +822,7 @@ struct option_map option_map[] =
{
"--save-temps"
,
"-save-temps"
,
0
},
{
"--save-temps"
,
"-save-temps"
,
0
},
{
"--shared"
,
"-shared"
,
0
},
{
"--shared"
,
"-shared"
,
0
},
{
"--silent"
,
"-q"
,
0
},
{
"--silent"
,
"-q"
,
0
},
{
"--specs"
,
"-specs="
,
"aj"
},
{
"--static"
,
"-static"
,
0
},
{
"--static"
,
"-static"
,
0
},
{
"--symbolic"
,
"-symbolic"
,
0
},
{
"--symbolic"
,
"-symbolic"
,
0
},
{
"--target"
,
"-b"
,
"a"
},
{
"--target"
,
"-b"
,
"a"
},
...
@@ -2438,6 +2446,36 @@ process_command (argc, argv)
...
@@ -2438,6 +2446,36 @@ process_command (argc, argv)
save_temps_flag
=
1
;
save_temps_flag
=
1
;
n_switches
++
;
n_switches
++
;
}
}
else
if
(
strcmp
(
argv
[
i
],
"-specs"
)
==
0
)
{
struct
user_specs
*
user
=
(
struct
user_specs
*
)
xmalloc
(
sizeof
(
struct
user_specs
));
if
(
++
i
>=
argc
)
fatal
(
"argument to `-specs' is missing"
);
user
->
next
=
(
struct
user_specs
*
)
0
;
user
->
filename
=
argv
[
i
];
if
(
user_specs_tail
)
user_specs_tail
->
next
=
user
;
else
user_specs_head
=
user
;
user_specs_tail
=
user
;
}
else
if
(
strncmp
(
argv
[
i
],
"-specs="
,
7
)
==
0
)
{
struct
user_specs
*
user
=
(
struct
user_specs
*
)
xmalloc
(
sizeof
(
struct
user_specs
));
if
(
strlen
(
argv
[
i
])
==
7
)
fatal
(
"argument to `-specs=' is missing"
);
user
->
next
=
(
struct
user_specs
*
)
0
;
user
->
filename
=
argv
[
i
]
+
7
;
if
(
user_specs_tail
)
user_specs_tail
->
next
=
user
;
else
user_specs_head
=
user
;
user_specs_tail
=
user
;
}
else
if
(
argv
[
i
][
0
]
==
'-'
&&
argv
[
i
][
1
]
!=
0
)
else
if
(
argv
[
i
][
0
]
==
'-'
&&
argv
[
i
][
1
]
!=
0
)
{
{
register
char
*
p
=
&
argv
[
i
][
1
];
register
char
*
p
=
&
argv
[
i
][
1
];
...
@@ -2688,6 +2726,10 @@ process_command (argc, argv)
...
@@ -2688,6 +2726,10 @@ process_command (argc, argv)
infiles
[
n_infiles
].
language
=
0
;
infiles
[
n_infiles
].
language
=
0
;
infiles
[
n_infiles
++
].
name
=
argv
[
i
];
infiles
[
n_infiles
++
].
name
=
argv
[
i
];
}
}
else
if
(
strcmp
(
argv
[
i
],
"-specs"
)
==
0
)
i
++
;
else
if
(
strncmp
(
argv
[
i
],
"-specs="
,
7
)
==
0
)
;
else
if
(
argv
[
i
][
0
]
==
'-'
&&
argv
[
i
][
1
]
!=
0
)
else
if
(
argv
[
i
][
0
]
==
'-'
&&
argv
[
i
][
1
]
!=
0
)
{
{
register
char
*
p
=
&
argv
[
i
][
1
];
register
char
*
p
=
&
argv
[
i
][
1
];
...
@@ -4076,6 +4118,7 @@ main (argc, argv)
...
@@ -4076,6 +4118,7 @@ main (argc, argv)
char
*
explicit_link_files
;
char
*
explicit_link_files
;
char
*
specs_file
;
char
*
specs_file
;
char
*
p
;
char
*
p
;
struct
user_specs
*
uptr
;
p
=
argv
[
0
]
+
strlen
(
argv
[
0
]);
p
=
argv
[
0
]
+
strlen
(
argv
[
0
]);
while
(
p
!=
argv
[
0
]
&&
p
[
-
1
]
!=
'/'
&&
p
[
-
1
]
!=
DIR_SEPARATOR
)
--
p
;
while
(
p
!=
argv
[
0
]
&&
p
[
-
1
]
!=
'/'
&&
p
[
-
1
]
!=
DIR_SEPARATOR
)
--
p
;
...
@@ -4188,6 +4231,14 @@ main (argc, argv)
...
@@ -4188,6 +4231,14 @@ main (argc, argv)
}
}
#endif
#endif
/* Process any user specified specs in the order given on the command
line. */
for
(
uptr
=
user_specs_head
;
uptr
;
uptr
=
uptr
->
next
)
{
char
*
filename
=
find_a_file
(
&
startfile_prefixes
,
uptr
->
filename
,
R_OK
);
read_specs
(
filename
?
filename
:
uptr
->
filename
);
}
/* If not cross-compiling, look for startfiles in the standard places. */
/* If not cross-compiling, look for startfiles in the standard places. */
/* The fact that these are done here, after reading the specs file,
/* The fact that these are done here, after reading the specs file,
means that it cannot be found in these directories.
means that it cannot be found in these directories.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment