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
a1d9074c
Commit
a1d9074c
authored
Nov 10, 1999
by
Tom Tromey
Committed by
Tom Tromey
Nov 10, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
* gcc.c (do_spec_1): Support text between `%u' and `%O'.
From-SVN: r30478
parent
6c9821b7
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
19 deletions
+35
-19
gcc/ChangeLog
+4
-0
gcc/gcc.c
+31
-19
No files found.
gcc/ChangeLog
View file @
a1d9074c
Wed
Nov
10
10
:
52
:
42
1999
Tom
Tromey
<
tromey
@cygnus
.
com
>
*
gcc
.
c
(
do_spec_1
)
:
Support
text
between
`
%
u
'
and
`
%
O
'
.
Wed
Nov
10
12
:
43
:
21
1999
Philippe
De
Muyter
<
phdm
@macqel
.
be
>
Kaveh
R
.
Ghazi
<
ghazi
@caip
.
rutgers
.
edu
>
...
...
gcc/gcc.c
View file @
a1d9074c
...
...
@@ -283,11 +283,11 @@ or with constant text in a single argument.
chosen in a way that is hard to predict even when previously
chosen file names are known. For example, `%g.s ... %g.o ... %g.s'
might turn into `ccUVUUAU.s ccXYAXZ12.o ccUVUUAU.s'. SUFFIX matches
the regexp "[.A-Za-z]*
" or the special string "%O", which is
treated exactly as if %O had been pre-processed. Previously, %g
w
as simply substituted with a file name chosen once per compilation,
without regard to any appended suffix (which was therefore treated
just like
ordinary text), making such attacks more likely to succeed.
the regexp "[.A-Za-z]*
%O"; "%O" is treated exactly as if it
had been pre-processed. Previously, %g was simply substituted
w
ith a file name chosen once per compilation, without regard
to any appended suffix (which was therefore treated just like
ordinary text), making such attacks more likely to succeed.
%uSUFFIX
like %g, but generates a new temporary file name even if %uSUFFIX
was already seen.
...
...
@@ -317,12 +317,13 @@ or with constant text in a single argument.
at all, but they are included among the output files, so they will
be linked.
%O substitutes the suffix for object files. Note that this is
handled specially when it immediately follows %g, %u, or %U,
because of the need for those to form complete file names. The
handling is such that %O is treated exactly as if it had already
been substituted, except that %g, %u, and %U do not currently
support additional SUFFIX characters following %O as they would
following, for example, `.o'.
handled specially when it immediately follows %g, %u, or %U
(with or without a suffix argument) because of the need for
those to form complete file names. The handling is such that
%O is treated exactly as if it had already been substituted,
except that %g, %u, and %U do not currently support additional
SUFFIX characters following %O as they would following, for
example, `.o'.
%p substitutes the standard macro predefinitions for the
current target machine. Use this when running cpp.
%P like %p, but puts `__' before and after the name of each macro.
...
...
@@ -3980,21 +3981,29 @@ do_spec_1 (spec, inswitch, soft_matched_part)
struct
temp_name
*
t
;
int
suffix_length
;
const
char
*
suffix
=
p
;
char
*
saved_suffix
=
NULL
;
while
(
*
p
==
'.'
||
ISALPHA
((
unsigned
char
)
*
p
))
p
++
;
suffix_length
=
p
-
suffix
;
if
(
p
[
0
]
==
'%'
&&
p
[
1
]
==
'O'
)
{
p
+=
2
;
/* We don't support extra suffix characters after %O. */
if
(
*
p
==
'.'
||
ISALPHA
((
unsigned
char
)
*
p
))
abort
();
suffix
=
OBJECT_SUFFIX
;
suffix_length
=
strlen
(
OBJECT_SUFFIX
);
}
else
{
while
(
*
p
==
'.'
||
ISALPHA
((
unsigned
char
)
*
p
))
p
++
;
suffix_length
=
p
-
suffix
;
if
(
suffix_length
==
0
)
suffix
=
OBJECT_SUFFIX
;
else
{
saved_suffix
=
(
char
*
)
xmalloc
(
suffix_length
+
strlen
(
OBJECT_SUFFIX
));
strncpy
(
saved_suffix
,
suffix
,
suffix_length
);
strcpy
(
saved_suffix
+
suffix_length
,
OBJECT_SUFFIX
);
}
suffix_length
+=
strlen
(
OBJECT_SUFFIX
);
}
/* See if we already have an association of %g/%u/%U and
...
...
@@ -4023,6 +4032,9 @@ do_spec_1 (spec, inswitch, soft_matched_part)
t
->
filename_length
=
temp_filename_length
;
}
if
(
saved_suffix
)
free
(
saved_suffix
);
obstack_grow
(
&
obstack
,
t
->
filename
,
t
->
filename_length
);
delete_this_arg
=
1
;
#else
...
...
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