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
6ed4bb9a
Commit
6ed4bb9a
authored
Mar 27, 1998
by
Michael Meissner
Committed by
Michael Meissner
Mar 27, 1998
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make GCC_EXEC_PREFIX work again
From-SVN: r18856
parent
7fe6899f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
49 additions
and
6 deletions
+49
-6
gcc/ChangeLog
+13
-0
gcc/gcc.c
+15
-0
gcc/prefix.c
+21
-6
No files found.
gcc/ChangeLog
View file @
6ed4bb9a
Fri Mar 27 16:04:49 1998 Michael Meissner <meissner@cygnus.com>
* gcc.c (set_std_prefix): Add declaration.
(process_command): If GCC_EXEC_PREFIX is set, remove /lib/gcc-lib/
suffix, and update the standard prefix prefix.c uses.
* prefix.c (std_prefix): New global to hold default prefix value.
(get_key_value): Change to use std_prefix instead of PREFIX.
(translate_name): Ditto.
(update_path): Ditto.
(get_key_value): Release allocated scratch storage.
(set_std_prefix): New function to reset the standard prefix.
Fri Mar 27 18:08:21 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
Fri Mar 27 18:08:21 1998 J"orn Rennecke <amylaar@cygnus.co.uk>
* sh.c (find_barrier): Fix calculations for alignment increase.
* sh.c (find_barrier): Fix calculations for alignment increase.
...
...
gcc/gcc.c
View file @
6ed4bb9a
...
@@ -51,6 +51,7 @@ extern int pexecute PROTO ((const char *, char * const *, const char *,
...
@@ -51,6 +51,7 @@ extern int pexecute PROTO ((const char *, char * const *, const char *,
const
char
*
,
char
**
,
char
**
,
int
));
const
char
*
,
char
**
,
char
**
,
int
));
extern
int
pwait
PROTO
((
int
,
int
*
,
int
));
extern
int
pwait
PROTO
((
int
,
int
*
,
int
));
extern
char
*
update_path
PROTO
((
char
*
,
char
*
));
extern
char
*
update_path
PROTO
((
char
*
,
char
*
));
extern
void
set_std_prefix
PROTO
((
char
*
,
int
));
/* Flag arguments to pexecute. */
/* Flag arguments to pexecute. */
#define PEXECUTE_FIRST 1
#define PEXECUTE_FIRST 1
#define PEXECUTE_LAST 2
#define PEXECUTE_LAST 2
...
@@ -2378,6 +2379,20 @@ process_command (argc, argv)
...
@@ -2378,6 +2379,20 @@ process_command (argc, argv)
if
(
gcc_exec_prefix
)
if
(
gcc_exec_prefix
)
{
{
int
len
=
strlen
(
gcc_exec_prefix
);
if
(
len
>
sizeof
(
"/lib/gcc-lib/"
)
-
1
&&
(
gcc_exec_prefix
[
len
-
1
]
==
'/'
||
gcc_exec_prefix
[
len
-
1
]
==
DIR_SEPARATOR
))
{
temp
=
gcc_exec_prefix
+
len
-
sizeof
(
"/lib/gcc-lib/"
)
+
1
;
if
((
*
temp
==
'/'
||
*
temp
==
DIR_SEPARATOR
)
&&
strncmp
(
temp
+
1
,
"lib"
,
3
)
==
0
&&
(
temp
[
4
]
==
'/'
||
temp
[
4
]
==
DIR_SEPARATOR
)
&&
strncmp
(
temp
+
5
,
"gcc-lib"
,
7
)
==
0
)
len
-=
sizeof
(
"/lib/gcc-lib/"
)
-
1
;
}
set_std_prefix
(
gcc_exec_prefix
,
len
);
add_prefix
(
&
exec_prefixes
,
gcc_exec_prefix
,
"GCC"
,
0
,
0
,
NULL_PTR
);
add_prefix
(
&
exec_prefixes
,
gcc_exec_prefix
,
"GCC"
,
0
,
0
,
NULL_PTR
);
add_prefix
(
&
startfile_prefixes
,
gcc_exec_prefix
,
"GCC"
,
0
,
0
,
NULL_PTR
);
add_prefix
(
&
startfile_prefixes
,
gcc_exec_prefix
,
"GCC"
,
0
,
0
,
NULL_PTR
);
}
}
...
...
gcc/prefix.c
View file @
6ed4bb9a
/* Utility to update paths from internal to external forms.
/* Utility to update paths from internal to external forms.
Copyright (C) 1997 Free Software Foundation, Inc.
Copyright (C) 1997
, 1998
Free Software Foundation, Inc.
This file is part of GNU CC.
This file is part of GNU CC.
...
@@ -76,6 +76,8 @@ Boston, MA 02111-1307, USA. */
...
@@ -76,6 +76,8 @@ Boston, MA 02111-1307, USA. */
#include "gansidecl.h"
#include "gansidecl.h"
static
char
*
std_prefix
=
PREFIX
;
static
char
*
get_key_value
PROTO
((
char
*
));
static
char
*
get_key_value
PROTO
((
char
*
));
static
char
*
translate_name
PROTO
((
char
*
));
static
char
*
translate_name
PROTO
((
char
*
));
static
char
*
concat
PVPROTO
((
char
*
,
...));
static
char
*
concat
PVPROTO
((
char
*
,
...));
...
@@ -93,16 +95,20 @@ get_key_value (key)
...
@@ -93,16 +95,20 @@ get_key_value (key)
char
*
key
;
char
*
key
;
{
{
char
*
prefix
=
0
;
char
*
prefix
=
0
;
char
*
temp
=
0
;
#ifdef _WIN32
#ifdef _WIN32
prefix
=
lookup_key
(
key
);
prefix
=
lookup_key
(
key
);
#endif
#endif
if
(
prefix
==
0
)
if
(
prefix
==
0
)
prefix
=
getenv
(
concat
(
key
,
"_ROOT"
,
NULL_PTR
));
prefix
=
getenv
(
temp
=
concat
(
key
,
"_ROOT"
,
NULL_PTR
));
if
(
prefix
==
0
)
if
(
prefix
==
0
)
prefix
=
PREFIX
;
prefix
=
std_prefix
;
if
(
temp
)
free
(
temp
);
return
prefix
;
return
prefix
;
}
}
...
@@ -259,7 +265,7 @@ translate_name (name)
...
@@ -259,7 +265,7 @@ translate_name (name)
{
{
prefix
=
get_key_value
(
key
);
prefix
=
get_key_value
(
key
);
if
(
prefix
==
0
)
if
(
prefix
==
0
)
prefix
=
PREFIX
;
prefix
=
std_prefix
;
}
}
else
else
{
{
...
@@ -289,12 +295,12 @@ update_path (path, key)
...
@@ -289,12 +295,12 @@ update_path (path, key)
char
*
path
;
char
*
path
;
char
*
key
;
char
*
key
;
{
{
if
(
!
strncmp
(
path
,
PREFIX
,
strlen
(
PREFIX
))
&&
key
!=
0
)
if
(
!
strncmp
(
path
,
std_prefix
,
strlen
(
std_prefix
))
&&
key
!=
0
)
{
{
if
(
key
[
0
]
!=
'$'
)
if
(
key
[
0
]
!=
'$'
)
key
=
concat
(
"@"
,
key
,
NULL_PTR
);
key
=
concat
(
"@"
,
key
,
NULL_PTR
);
path
=
concat
(
key
,
&
path
[
strlen
(
PREFIX
)],
NULL_PTR
);
path
=
concat
(
key
,
&
path
[
strlen
(
std_prefix
)],
NULL_PTR
);
while
(
path
[
0
]
==
'@'
||
path
[
0
]
==
'$'
)
while
(
path
[
0
]
==
'@'
||
path
[
0
]
==
'$'
)
path
=
translate_name
(
path
);
path
=
translate_name
(
path
);
...
@@ -315,3 +321,12 @@ update_path (path, key)
...
@@ -315,3 +321,12 @@ update_path (path, key)
return
path
;
return
path
;
}
}
/* Reset the standard prefix */
void
set_std_prefix
(
prefix
,
len
)
char
*
prefix
;
int
len
;
{
std_prefix
=
save_string
(
prefix
,
len
);
}
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