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
6ba57472
Commit
6ba57472
authored
Aug 12, 2001
by
David Edelsohn
Committed by
David Edelsohn
Aug 12, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Revert Rainer Orth's Java and gcc.c patch.
From-SVN: r44834
parent
270fc29b
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
87 additions
and
87 deletions
+87
-87
gcc/ChangeLog
+14
-0
gcc/config/alpha/osf.h
+2
-2
gcc/gcc.c
+48
-61
gcc/gcc.h
+1
-2
gcc/java/ChangeLog
+13
-0
gcc/java/jvgenmain.c
+3
-10
gcc/java/jvspec.c
+6
-12
No files found.
gcc/ChangeLog
View file @
6ba57472
2001
-
08
-
12
David
Edelsohn
<
edelsohn
@gnu
.
org
>
Revert
:
2001
-
08
-
02
Rainer
Orth
<
ro
@TechFak
.
Uni
-
Bielefeld
.
DE
>
*
gcc
.
c
(
set_collect_gcc_options
)
:
New
function
,
split
out
from
main
.
Ignore
elided
switches
.
(
do_spec_1
)
:
Invoke
before
executing
command
.
(
set_input
)
:
Export
.
Move
declaration
...
*
gcc
.
h
(
set_input
)
:
...
here
.
*
config
/
alpha
/
osf
.
h
(
ASM_FINAL_SPEC
)
:
Use
%
U
.
s
to
refer
to
input
file
.
2001
-
08
-
12
Richard
Henderson
<
rth
@redhat
.
com
>
*
config
/
rs6000
/
rs6000
.
c
(
rs6000_elf_section_type_flags
)
:
Fix
...
...
gcc/config/alpha/osf.h
View file @
6ba57472
...
...
@@ -121,7 +121,7 @@ Boston, MA 02111-1307, USA. */
%{K: -I %b.o~} \
%{!K: %{save-temps: -I %b.o~}} \
%{c:%W{o*}%{!o*:-o %b.o}}%{!c:-o %U.o} \
%{.s:%i} %{!.s:%
U
.s}}}"
%{.s:%i} %{!.s:%
g
.s}}}"
#else
#define ASM_FINAL_SPEC "\
...
...
@@ -130,7 +130,7 @@ Boston, MA 02111-1307, USA. */
%{K: -I %b.o~} \
%{!K: %{save-temps: -I %b.o~}} \
%{c:%W{o*}%{!o*:-o %b.o}}%{!c:-o %U.o} \
%{.s:%i} %{!.s:%
U
.s}}}"
%{.s:%i} %{!.s:%
g
.s}}}"
#endif
...
...
gcc/gcc.c
View file @
6ba57472
...
...
@@ -289,7 +289,6 @@ static void clear_failure_queue PARAMS ((void));
static
int
check_live_switch
PARAMS
((
int
,
int
));
static
const
char
*
handle_braces
PARAMS
((
const
char
*
));
static
char
*
save_string
PARAMS
((
const
char
*
,
int
));
static
void
set_collect_gcc_options
PARAMS
((
void
));
static
int
do_spec_1
PARAMS
((
const
char
*
,
int
,
const
char
*
));
static
const
char
*
find_file
PARAMS
((
const
char
*
));
static
int
is_directory
PARAMS
((
const
char
*
,
const
char
*
,
int
));
...
...
@@ -313,6 +312,7 @@ static void process_command PARAMS ((int, const char *const *));
static
int
execute
PARAMS
((
void
));
static
void
clear_args
PARAMS
((
void
));
static
void
fatal_error
PARAMS
((
int
));
static
void
set_input
PARAMS
((
const
char
*
));
static
void
init_gcc_specs
PARAMS
((
struct
obstack
*
,
const
char
*
,
const
char
*
));
...
...
@@ -3960,63 +3960,6 @@ process_command (argc, argv)
switches
[
n_switches
].
part1
=
0
;
infiles
[
n_infiles
].
name
=
0
;
}
/* Store switches not filtered out but %{<S} in spec in COLLECT_GCC_OPTIONS
and place that in the environment. */
static
void
set_collect_gcc_options
()
{
int
i
;
int
first_time
;
/* Build COLLECT_GCC_OPTIONS to have all of the options specified to
the compiler. */
obstack_grow
(
&
collect_obstack
,
"COLLECT_GCC_OPTIONS="
,
sizeof
(
"COLLECT_GCC_OPTIONS="
)
-
1
);
first_time
=
TRUE
;
for
(
i
=
0
;
(
int
)
i
<
n_switches
;
i
++
)
{
const
char
*
const
*
args
;
const
char
*
p
,
*
q
;
if
(
!
first_time
)
obstack_grow
(
&
collect_obstack
,
" "
,
1
);
first_time
=
FALSE
;
/* Ignore elided switches. */
if
(
switches
[
i
].
live_cond
==
SWITCH_IGNORE
)
continue
;
obstack_grow
(
&
collect_obstack
,
"'-"
,
2
);
q
=
switches
[
i
].
part1
;
while
((
p
=
strchr
(
q
,
'\''
)))
{
obstack_grow
(
&
collect_obstack
,
q
,
p
-
q
);
obstack_grow
(
&
collect_obstack
,
"'
\\
''"
,
4
);
q
=
++
p
;
}
obstack_grow
(
&
collect_obstack
,
q
,
strlen
(
q
));
obstack_grow
(
&
collect_obstack
,
"'"
,
1
);
for
(
args
=
switches
[
i
].
args
;
args
&&
*
args
;
args
++
)
{
obstack_grow
(
&
collect_obstack
,
" '"
,
2
);
q
=
*
args
;
while
((
p
=
strchr
(
q
,
'\''
)))
{
obstack_grow
(
&
collect_obstack
,
q
,
p
-
q
);
obstack_grow
(
&
collect_obstack
,
"'
\\
''"
,
4
);
q
=
++
p
;
}
obstack_grow
(
&
collect_obstack
,
q
,
strlen
(
q
));
obstack_grow
(
&
collect_obstack
,
"'"
,
1
);
}
}
obstack_grow
(
&
collect_obstack
,
"
\0
"
,
1
);
putenv
(
obstack_finish
(
&
collect_obstack
));
}
/* Process a spec string, accumulating and running commands. */
...
...
@@ -4160,8 +4103,6 @@ do_spec_1 (spec, inswitch, soft_matched_part)
argbuf_index
--
;
}
set_collect_gcc_options
();
if
(
argbuf_index
>
0
)
{
value
=
execute
();
...
...
@@ -5545,7 +5486,7 @@ is_directory (path1, path2, linker)
/* Set up the various global variables to indicate that we're processing
the input file named FILENAME. */
void
static
void
set_input
(
filename
)
const
char
*
filename
;
{
...
...
@@ -5718,6 +5659,52 @@ main (argc, argv)
process_command
(
argc
,
argv
);
{
int
first_time
;
/* Build COLLECT_GCC_OPTIONS to have all of the options specified to
the compiler. */
obstack_grow
(
&
collect_obstack
,
"COLLECT_GCC_OPTIONS="
,
sizeof
(
"COLLECT_GCC_OPTIONS="
)
-
1
);
first_time
=
TRUE
;
for
(
i
=
0
;
(
int
)
i
<
n_switches
;
i
++
)
{
const
char
*
const
*
args
;
const
char
*
p
,
*
q
;
if
(
!
first_time
)
obstack_grow
(
&
collect_obstack
,
" "
,
1
);
first_time
=
FALSE
;
obstack_grow
(
&
collect_obstack
,
"'-"
,
2
);
q
=
switches
[
i
].
part1
;
while
((
p
=
strchr
(
q
,
'\''
)))
{
obstack_grow
(
&
collect_obstack
,
q
,
p
-
q
);
obstack_grow
(
&
collect_obstack
,
"'
\\
''"
,
4
);
q
=
++
p
;
}
obstack_grow
(
&
collect_obstack
,
q
,
strlen
(
q
));
obstack_grow
(
&
collect_obstack
,
"'"
,
1
);
for
(
args
=
switches
[
i
].
args
;
args
&&
*
args
;
args
++
)
{
obstack_grow
(
&
collect_obstack
,
" '"
,
2
);
q
=
*
args
;
while
((
p
=
strchr
(
q
,
'\''
)))
{
obstack_grow
(
&
collect_obstack
,
q
,
p
-
q
);
obstack_grow
(
&
collect_obstack
,
"'
\\
''"
,
4
);
q
=
++
p
;
}
obstack_grow
(
&
collect_obstack
,
q
,
strlen
(
q
));
obstack_grow
(
&
collect_obstack
,
"'"
,
1
);
}
}
obstack_grow
(
&
collect_obstack
,
"
\0
"
,
1
);
putenv
(
obstack_finish
(
&
collect_obstack
));
}
/* Initialize the vector of specs to just the default.
This means one element containing 0s, as a terminator. */
...
...
gcc/gcc.h
View file @
6ba57472
/* Header file for modules that link with gcc.c
Copyright (C) 1999
, 2000, 2001
Free Software Foundation, Inc.
Copyright (C) 1999 Free Software Foundation, Inc.
This file is part of GNU CC.
...
...
@@ -33,7 +33,6 @@ extern void fatal PARAMS ((const char *, ...))
ATTRIBUTE_PRINTF_1
ATTRIBUTE_NORETURN
;
extern
void
error
PARAMS
((
const
char
*
,
...))
ATTRIBUTE_PRINTF_1
;
extern
void
pfatal_with_name
PARAMS
((
const
char
*
))
ATTRIBUTE_NORETURN
;
extern
void
set_input
PARAMS
((
const
char
*
));
/* Spec files linked with gcc.c must provide definitions for these. */
...
...
gcc/java/ChangeLog
View file @
6ba57472
2001-08-12 David Edelsohn <edelsohn@gnu.org>
Revert:
2001-08-02 Rainer Orth <ro@TechFak.Uni-Bielefeld.DE>
* jvspec.c (jvgenmain_spec): Cannot use %umain, breaks
ASM_FINAL_SPEC.
(lang_specific_pre_link): Use set_input to set input_filename.
Append `main' here.
* jvgenmain.c (usage): Append literal `main' to CLASSNAME.
(main): Fix definition.
Strip `main' from classname.
Fixes PR java/227.
2001-08-11 Zack Weinberg <zackw@panix.com>
* lex.h: Don't include setjmp.h. Don't define
...
...
gcc/java/jvgenmain.c
View file @
6ba57472
...
...
@@ -61,14 +61,14 @@ static void usage (const char *) ATTRIBUTE_NORETURN;
static
void
usage
(
const
char
*
name
)
{
fprintf
(
stderr
,
"Usage: %s [OPTIONS]... CLASSNAME
main
[OUTFILE]
\n
"
,
name
);
fprintf
(
stderr
,
"Usage: %s [OPTIONS]... CLASSNAME [OUTFILE]
\n
"
,
name
);
exit
(
1
);
}
int
main
(
int
argc
,
char
**
argv
)
main
(
int
argc
,
c
onst
c
har
**
argv
)
{
c
har
*
classname
,
*
p
;
c
onst
char
*
classname
;
FILE
*
stream
;
const
char
*
mangled_classname
;
int
i
,
last_arg
;
...
...
@@ -92,13 +92,6 @@ main (int argc, char **argv)
classname
=
argv
[
i
];
/* gcj always appends `main' to classname. We need to strip this here. */
p
=
strrchr
(
classname
,
'm'
);
if
(
p
==
NULL
||
p
==
classname
||
strcmp
(
p
,
"main"
)
!=
0
)
usage
(
argv
[
0
]);
else
*
p
=
'\0'
;
gcc_obstack_init
(
mangle_obstack
);
mangled_classname
=
do_mangle_classname
(
classname
);
...
...
gcc/java/jvspec.c
View file @
6ba57472
...
...
@@ -52,8 +52,8 @@ int lang_specific_extra_outfiles = 0;
int
shared_libgcc
=
1
;
const
char
jvgenmain_spec
[]
=
"jvgenmain %{D*} %
b %{!pipe:%u
.i} |
\n
\
cc1 %{!pipe:%U.i} %1 \
"jvgenmain %{D*} %
i %{!pipe:%umain
.i} |
\n
\
cc1 %{!pipe:%U
main
.i} %1 \
%{!Q:-quiet} -dumpbase %b.c %{d*} %{m*} %{a*}\
%{g*} %{O*} \
%{v:-version} %{pg:-p} %{p}\
...
...
@@ -68,8 +68,8 @@ const char jvgenmain_spec[] =
%{f*} -fdollars-in-identifiers\
%{aux-info*}\
%{pg:%{fomit-frame-pointer:%e-pg and -fomit-frame-pointer are incompatible}}\
%{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%U.s}} |
\n
\
%{!S:as %a %Y -o %d%w%u
%O %{!pipe:%U
.s} %A
\n
}"
;
%{S:%W{o*}%{!o*:-o %b.s}}%{!S:-o %{|!pipe:%U
main
.s}} |
\n
\
%{!S:as %a %Y -o %d%w%u
main%O %{!pipe:%Umain
.s} %A
\n
}"
;
/* Return full path name of spec file if it is in DIR, or NULL if
not. */
...
...
@@ -529,14 +529,8 @@ lang_specific_pre_link ()
int
err
;
if
(
main_class_name
==
NULL
)
return
0
;
/* Append `main' to make the filename unique and allow
gcj --main=hello -save-temps hello.java
to work. jvgenmain needs to strip this `main' to arrive at the correct
class name. Append dummy `.c' that can be stripped by set_input so %b
is correct. */
set_input
(
concat
(
main_class_name
,
"main.c"
,
NULL
));
input_filename
=
main_class_name
;
input_filename_length
=
strlen
(
main_class_name
);
err
=
do_spec
(
jvgenmain_spec
);
if
(
err
==
0
)
{
...
...
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