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
41e16835
Commit
41e16835
authored
Jun 10, 1997
by
Jason Merrill
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
x
From-SVN: r14225
parent
d7d775a0
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
24 deletions
+48
-24
gcc/collect2.c
+48
-24
No files found.
gcc/collect2.c
View file @
41e16835
...
@@ -493,6 +493,38 @@ savestring (input, size)
...
@@ -493,6 +493,38 @@ savestring (input, size)
output
[
size
]
=
0
;
output
[
size
]
=
0
;
return
output
;
return
output
;
}
}
/* Parse a reasonable subset of shell quoting syntax. */
static
char
*
extract_string
(
pp
)
char
**
pp
;
{
char
*
p
=
*
pp
;
int
backquote
=
0
;
int
inside
=
0
;
for
(;;)
{
char
c
=
*
p
;
if
(
c
==
'\0'
)
break
;
++
p
;
if
(
backquote
)
obstack_1grow
(
&
temporary_obstack
,
c
);
else
if
(
!
inside
&&
c
==
' '
)
break
;
else
if
(
!
inside
&&
c
==
'\\'
)
backquote
=
1
;
else
if
(
c
==
'\''
)
inside
=
!
inside
;
else
obstack_1grow
(
&
temporary_obstack
,
c
);
}
*
pp
=
p
;
return
obstack_finish
(
&
temporary_obstack
);
}
void
void
dump_file
(
name
)
dump_file
(
name
)
...
@@ -957,17 +989,13 @@ main (argc, argv)
...
@@ -957,17 +989,13 @@ main (argc, argv)
putenv
(
p
);
putenv
(
p
);
p
=
(
char
*
)
getenv
(
"COLLECT_GCC_OPTIONS"
);
p
=
(
char
*
)
getenv
(
"COLLECT_GCC_OPTIONS"
);
if
(
p
)
while
(
p
&&
*
p
)
while
(
*
p
)
{
{
char
*
q
=
extract_string
(
&
p
);
char
*
q
=
p
;
if
(
*
q
==
'-'
&&
(
q
[
1
]
==
'm'
||
q
[
1
]
==
'f'
))
while
(
*
q
&&
*
q
!=
' '
)
q
++
;
num_c_args
++
;
if
(
*
p
==
'-'
&&
p
[
1
]
==
'm'
)
}
num_c_args
++
;
obstack_free
(
&
temporary_obstack
,
temporary_firstobj
);
if
(
*
q
)
q
++
;
p
=
q
;
}
c_ptr
=
c_argv
=
(
char
**
)
xcalloc
(
sizeof
(
char
*
),
num_c_args
);
c_ptr
=
c_argv
=
(
char
**
)
xcalloc
(
sizeof
(
char
*
),
num_c_args
);
...
@@ -1254,19 +1282,15 @@ main (argc, argv)
...
@@ -1254,19 +1282,15 @@ main (argc, argv)
/* Get any options that the upper GCC wants to pass to the sub-GCC. */
/* Get any options that the upper GCC wants to pass to the sub-GCC. */
p
=
(
char
*
)
getenv
(
"COLLECT_GCC_OPTIONS"
);
p
=
(
char
*
)
getenv
(
"COLLECT_GCC_OPTIONS"
);
if
(
p
)
while
(
p
&&
*
p
)
while
(
*
p
)
{
{
char
*
q
=
extract_string
(
&
p
);
char
*
q
=
p
;
if
(
*
q
==
'-'
&&
(
q
[
1
]
==
'm'
||
q
[
1
]
==
'f'
))
while
(
*
q
&&
*
q
!=
' '
)
q
++
;
*
c_ptr
++
=
obstack_copy0
(
&
permanent_obstack
,
q
,
strlen
(
q
));
if
(
*
p
==
'-'
&&
(
p
[
1
]
==
'm'
||
p
[
1
]
==
'f'
))
if
(
strncmp
(
q
,
"-shared"
,
sizeof
(
"shared"
)
-
1
)
==
0
)
*
c_ptr
++
=
savestring
(
p
,
q
-
p
);
shared_obj
=
1
;
if
(
strncmp
(
p
,
"-shared"
,
sizeof
(
"shared"
)
-
1
)
==
0
)
}
shared_obj
=
1
;
obstack_free
(
&
temporary_obstack
,
temporary_firstobj
);
if
(
*
q
)
q
++
;
p
=
q
;
}
#ifdef COLLECT_EXPORT_LIST
#ifdef COLLECT_EXPORT_LIST
/* The AIX linker will discard static constructors in object files if
/* The AIX linker will discard static constructors in object files if
...
...
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