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
6a9e290e
Commit
6a9e290e
authored
Apr 19, 1994
by
Richard Kenner
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add new options -print-file-name= and -print-prog-name=.
From-SVN: r7079
parent
f5b0eb4e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
27 additions
and
8 deletions
+27
-8
gcc/gcc.c
+27
-8
No files found.
gcc/gcc.c
View file @
6a9e290e
...
...
@@ -142,10 +142,14 @@ extern int execv (), execvp ();
#define MIN_FATAL_STATUS 1
/* Flag saying to print the full filename of
libgcc.a
/* Flag saying to print the full filename of
this file
as found through our usual search mechanism. */
static
int
print_libgcc_file_name
;
static
char
*
print_file_name
=
NULL
;
/* As print_file_name, but search for executable file. */
static
char
*
print_prog_name
=
NULL
;
/* Flag indicating whether we should print the command and arguments */
...
...
@@ -772,6 +776,8 @@ struct option_map option_map[] =
{
"--pedantic-errors"
,
"-pedantic-errors"
,
0
},
{
"--save-temps"
,
"-save-temps"
,
0
},
{
"--print-libgcc-file-name"
,
"-print-libgcc-file-name"
,
0
},
{
"--print-file-name"
,
"-print-file-name="
,
"aj"
},
{
"--print-prog-name"
,
"-print-prog-name="
,
"aj"
},
{
"--static"
,
"-static"
,
0
},
{
"--shared"
,
"-shared"
,
0
},
{
"--symbolic"
,
"-symbolic"
,
0
},
...
...
@@ -2326,9 +2332,11 @@ process_command (argc, argv)
exit
(
0
);
}
else
if
(
!
strcmp
(
argv
[
i
],
"-print-libgcc-file-name"
))
{
print_libgcc_file_name
=
1
;
}
print_file_name
=
"libgcc.a"
;
else
if
(
!
strncmp
(
argv
[
i
],
"-print-file-name="
,
17
))
print_file_name
=
argv
[
i
]
+
17
;
else
if
(
!
strncmp
(
argv
[
i
],
"-print-prog-name="
,
17
))
print_prog_name
=
argv
[
i
]
+
17
;
else
if
(
!
strcmp
(
argv
[
i
],
"-Xlinker"
))
{
/* Pass the argument of this option to the linker when we link. */
...
...
@@ -2567,6 +2575,10 @@ process_command (argc, argv)
;
else
if
(
!
strcmp
(
argv
[
i
],
"-print-libgcc-file-name"
))
;
else
if
(
!
strncmp
(
argv
[
i
],
"-print-file-name="
,
17
))
;
else
if
(
!
strncmp
(
argv
[
i
],
"-print-prog-name="
,
17
))
;
else
if
(
argv
[
i
][
0
]
==
'+'
&&
argv
[
i
][
1
]
==
'e'
)
{
/* Compensate for the +e options to the C++ front-end;
...
...
@@ -3995,13 +4007,20 @@ main (argc, argv)
if
(
!
switches
[
i
].
valid
)
error
(
"unrecognized option `-%s'"
,
switches
[
i
].
part1
);
if
(
print_libgcc_file_name
)
/* Obey some of the options. */
if
(
print_file_name
)
{
printf
(
"%s
\n
"
,
find_file
(
"libgcc.a"
));
printf
(
"%s
\n
"
,
find_file
(
print_file_name
));
exit
(
0
);
}
/* Obey some of the options. */
if
(
print_prog_name
)
{
char
*
newname
=
find_a_file
(
&
exec_prefix
,
print_prog_name
,
X_OK
);
printf
(
"%s
\n
"
,
(
newname
?
newname
:
print_prog_name
));
exit
(
0
);
}
if
(
verbose_flag
)
{
...
...
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