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
98c197fe
Commit
98c197fe
authored
May 18, 2001
by
Bruce Korb
Committed by
Bruce Korb
May 18, 2001
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Upgrade to AutoGen 5 Template
From-SVN: r42235
parent
b3eddcee
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
131 additions
and
120 deletions
+131
-120
gcc/ChangeLog
+5
-0
gcc/fixinc/fixincl.tpl
+118
-120
gcc/fixinc/genfixes
+8
-0
No files found.
gcc/ChangeLog
View file @
98c197fe
2001
-
05
-
17
Bruce
Korb
<
bkorb
@gnu
.
org
>
*
fixinc
/
fixincl
.
tpl
:
rewritten
as
an
AutoGen
version
5
template
*
fixinc
/
genfixes
:
emit
a
warning
if
AutoGen
is
out
of
date
2001
-
05
-
17
Brendan
Conoboy
<
blc
@cygnus
.
com
>
2001
-
05
-
17
Brendan
Conoboy
<
blc
@cygnus
.
com
>
Bruce
Korb
<
bkorb
@gnu
.
org
>
Bruce
Korb
<
bkorb
@gnu
.
org
>
...
...
gcc/fixinc/fixincl.tpl
View file @
98c197fe
[=
autogen t
emplate -*- Mode: C -*-
[=
AutoGen5 T
emplate -*- Mode: C -*-
x=fixincl.x =]
x=fixincl.x =]
/*
/*
* DO NOT EDIT THIS FILE - it has been generated
* DO NOT EDIT THIS FILE - it has been generated
...
@@ -7,171 +7,167 @@ x=fixincl.x =]
...
@@ -7,171 +7,167 @@ x=fixincl.x =]
* files which are fixed to work correctly with ANSI C and placed in a
* files which are fixed to work correctly with ANSI C and placed in a
* directory that GNU C will search.
* directory that GNU C will search.
*
*
* This file contains [=
_eval fix _count
=] fixup descriptions.
* This file contains [=
(count "fix")
=] fixup descriptions.
*
*
* See README for more information.
* See README for more information.
*
*
* inclhack copyright (c) 1998, 1999, 2000, 2001
* inclhack copyright (c) 1998, 1999, 2000, 2001
* The Free Software Foundation, Inc.
* The Free Software Foundation, Inc.
*
*
[=_eval inclhack "# * " _gpl=]
[=(define re-ct 0) (define max-mach 0) (define ct 0)
(define HACK "") (define Hack "") (define tmp "")
(gpl "inclhack" " * ")=]
*/
*/
[=
_SETENV re_ct 0 =][= _SETENV max_mach 0 =][=
[=
_
FOR fix =]
FOR fix =]
/* * * * * * * * * * * * * * * * * * * * * * * * * *
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
*
* Description of [=hackname _cap=] fix
* Description of [=
(set! Hack (string-capitalize! (get "hackname")))
(set! HACK (string-upcase! (get "hackname")))
(. Hack)=] fix
*/[=
*/[=
# Note that this is not just for debugging purposes, but in case
# Note that this is not just for debugging purposes, but in case
some C fix wishes to refer to the regexps it is paired with.
some C fix wishes to refer to the regexps it is paired with.
See commentary at the top of fixfixes.c.
See commentary at the top of fixfixes.c.
=]
=]
#define [=
hackname _up #_FIXIDX + #%-32s _printf=] [=_eval _index
=]
#define [=
(sprintf "%-32s" (string-append HACK "_FIXIDX"))=] [=(for-index)
=]
tSCC z[=
hackname _cap
=]Name[] =
tSCC z[=
(. Hack)
=]Name[] =
[=hackname _krstr=]
;
"[=hackname=]"
;
/*
/*
* File name selection pattern
* File name selection pattern
*/[=
*/[=
_IF files _exist
=]
IF (exist? "files")
=]
tSCC z[=
hackname _cap
=]List[] =
tSCC z[=
(. Hack)
=]List[] =
"[=
_FOR files =]|[=files=][=/files
=]|";[=
"[=
FOR files =]|[=files=][=ENDFOR
=]|";[=
_
ELSE =]
ELSE =]
#define z[=
hackname _cap
=]List (char*)NULL[=
#define z[=
(. Hack)
=]List (char*)NULL[=
_ENDIF "files _exist"
=]
ENDIF (exist? "files")
=]
/*
/*
* Machine/OS name selection pattern
* Machine/OS name selection pattern
*/[=
*/[=
_IF mach _exist
=]
IF (exist? "mach")
=]
tSCC* apz[=
hackname _cap
=]Machs[] = {[=
tSCC* apz[=
(. Hack)
=]Machs[] = {[=
_SETENV this_mach 0
=][=
(set! ct 0)
=][=
_FOR mach =]
FOR mach =]
[=mach _krstr=],[=
[=
_SETENV this_mach mach _len this_mach _env _val 5 + +
(set! tmp (get "mach"))
=][= /mach=]
(set! ct (+ ct (string-length tmp) 5))
(kr-string tmp)=],[=
ENDFOR=]
(const char*)NULL };[=
(const char*)NULL };[=
_SETENV max_mach _mark this_mach _env _val max_mach _env _val _max
=][=
(if (> ct max-mach) (set! max-mach ct))
=][=
_
ELSE =]
ELSE =]
#define apz[=
hackname _cap
=]Machs (const char**)NULL[=
#define apz[=
(. Hack)
=]Machs (const char**)NULL[=
_ENDIF "files _exist"
=][=
ENDIF (exist? "files")
=][=
_IF select _exist
=]
IF (exist? "select")
=]
/*
/*
* content selection pattern - do fix if pattern found
* content selection pattern - do fix if pattern found
*/[=
*/[=
_
FOR select =]
FOR select =]
tSCC z[=
hackname _cap=]Select[=_eval _index
=][] =
tSCC z[=
(. Hack)=]Select[=(for-index)
=][] =
[=
select _krstr
=];[=
[=
(kr-string (get "select"))
=];[=
/
select =][=
ENDFOR
select =][=
_
ENDIF =][=
ENDIF =][=
_IF bypass _exist
=]
IF (exist? "bypass")
=]
/*
/*
* content bypass pattern - skip fix if pattern found
* content bypass pattern - skip fix if pattern found
*/[=
*/[=
_
FOR bypass =]
FOR bypass =]
tSCC z[=
hackname _cap=]Bypass[=_eval _index
=][] =
tSCC z[=
(. Hack)=]Bypass[=(for-index)
=][] =
[=
bypass _krstr
=];[=
[=
(kr-string (get "bypass"))
=];[=
/
bypass =][=
ENDFOR
bypass =][=
_
ENDIF =][=
ENDIF =][=
_IF test _exist
=]
IF (exist? "test")
=]
/*
/*
* perform the 'test' shell command - do fix on success
* perform the 'test' shell command - do fix on success
*/[=
*/[=
_
FOR test =]
FOR test =]
tSCC z[=
hackname _cap=]Test[=_eval _index
=][] =
tSCC z[=
(. Hack)=]Test[=(for-index)
=][] =
[=
test _krstr
=];[=
[=
(kr-string (get "test"))
=];[=
/test
=][=
ENDFOR
=][=
_ENDIF
=][=
ENDIF
=][=
_IF c_test _exist
=]
IF (exist? "c_test")
=]
/*
/*
* perform the C function call test
* perform the C function call test
*/[=
*/[=
_
FOR c_test =]
FOR c_test =]
tSCC z[=
hackname _cap=]FTst[=_eval _index
=][] = "[=c_test=]";[=
tSCC z[=
(. Hack)=]FTst[=(for-index)
=][] = "[=c_test=]";[=
/
c_test =][=
ENDFOR
c_test =][=
_
ENDIF =][=
ENDIF =][=
IF (set! ct (+ (count "select") (count "bypass")
(count "test") (count "c_test")))
# Build the array of test descriptions for this fix: =][=
(= ct 0)
_IF select _exist
bypass _exist |
test _exist |
c_test _exist |
=]
=]
#define [=(. HACK)=]_TEST_CT 0
#define a[=(. Hack)=]Tests (tTestDesc*)NULL[=
ELSE =]
#define [=(. HACK)=]_TEST_CT [=(. ct)=][=
(set! re-ct (+ re-ct (count "select") (count "bypass"))) =]
static tTestDesc a[=(. Hack)=]Tests[] = {[=
FOR test =]
{ TT_TEST, z[=(. Hack)=]Test[=(for-index)=], 0 /* unused */ },[=
ENDFOR test =][=
FOR c_test =]
{ TT_FUNCTION, z[=(. Hack)=]FTst[=(for-index)=], 0 /* unused */ },[=
ENDFOR c_test =][=
FOR bypass =]
{ TT_NEGREP, z[=(. Hack)=]Bypass[=(for-index)=], (regex_t*)NULL },[=
ENDFOR bypass =][=
#define [=hackname _up =]_TEST_CT [=
FOR select =]
_eval select _count
{ TT_EGREP, z[=(. Hack)=]Select[=(for-index)=], (regex_t*)NULL },[=
bypass _count +
ENDFOR select =] };[=
test _count +
ENDIF =]
c_test _count + =][=
_SETENV re_ct
re_ct _env _val
select _count +
bypass _count + =]
static tTestDesc a[=hackname _cap=]Tests[] = {[=
_FOR test =]
{ TT_TEST, z[=hackname _cap=]Test[=_eval _index=], 0 /* unused */ },[=
/test =][=
_FOR c_test =]
{ TT_FUNCTION, z[=hackname _cap=]FTst[=_eval _index=], 0 /* unused */ },[=
/c_test =][=
_FOR bypass =]
{ TT_NEGREP, z[=hackname _cap=]Bypass[=_eval _index=], (regex_t*)NULL },[=
/bypass =][=
_FOR select =]
{ TT_EGREP, z[=hackname _cap=]Select[=_eval _index=], (regex_t*)NULL },[=
/select =] };[=
_ELSE =]
#define [=hackname _up=]_TEST_CT 0
#define a[=hackname _cap=]Tests (tTestDesc*)NULL[=
_ENDIF =]
/*
/*
* Fix Command Arguments for [=
hackname _cap
=]
* Fix Command Arguments for [=
(. Hack)
=]
*/
*/
static const char* apz[=
hackname _cap
=]Patch[] = {[=
static const char* apz[=
(. Hack)
=]Patch[] = {[=
_IF sed _exist
=] "sed"[=
IF (exist? "sed")
=] "sed"[=
_
FOR sed=],
FOR sed=],
"-e", [=
sed _krstr
=][=
"-e", [=
(kr-string (get "sed"))
=][=
/
sed=],[=
ENDFOR
sed=],[=
_ELIF shell _exist
=] "sh", "-c",
ELIF (exist? "shell")
=] "sh", "-c",
[=
shell _krstr
=],[=
[=
(kr-string (get "shell"))
=],[=
_ELIF c_fix _exist =]
ELIF (exist? "c_fix")=]
[=
[=(kr-string (get "c_fix"))=],[=
c_fix _krstr=],[=
_
FOR c_fix_arg =]
FOR c_fix_arg =]
[=
c_fix_arg _krstr
=],[=
[=
(kr-string (get "c_fix_arg"))
=],[=
/
c_fix_arg =][=
ENDFOR
c_fix_arg =][=
_ELIF replace _len
=]
ELIF (> (len "replace") 0)
=]
[=
replace _krstr
=],[=
[=
(kr-string (get "replace"))
=],[=
_
ENDIF=]
ENDIF=]
(char*)NULL };
(char*)NULL };
[=
/
fix=]
[=
ENDFOR
fix=]
/* * * * * * * * * * * * * * * * * * * * * * * * * *
/* * * * * * * * * * * * * * * * * * * * * * * * * *
*
*
...
@@ -181,25 +177,27 @@ static const char* apz[=hackname _cap=]Patch[] = {[=
...
@@ -181,25 +177,27 @@ static const char* apz[=hackname _cap=]Patch[] = {[=
We also must allow for the size of the target machine machine name.
We also must allow for the size of the target machine machine name.
This allows for a 79 byte machine name. Better be enough.
This allows for a 79 byte machine name. Better be enough.
=]
=]
#define REGEX_COUNT [=
_eval re_ct _env
=]
#define REGEX_COUNT [=
(. re-ct)
=]
#define MACH_LIST_SIZE_LIMIT [=
_eval max_mach _env _val 128 +
=]
#define MACH_LIST_SIZE_LIMIT [=
(+ 128 max-mach)
=]
#define FIX_COUNT [=
_eval fix _count
=]
#define FIX_COUNT [=
(count "fix")
=]
tFixDesc fixDescList[ FIX_COUNT ] = {[=
tFixDesc fixDescList[ FIX_COUNT ] = {[=
_FOR fix ",\n" =]
FOR fix ",\n" =][=
{ z[=hackname _cap=]Name, z[=hackname _cap=]List,
(set! Hack (string-capitalize! (get "hackname")))
apz[=hackname _cap=]Machs,
(set! HACK (string-upcase! (get "hackname"))) =]
[=hackname _up=]_TEST_CT, [=
{ z[=(. Hack)=]Name, z[=(. Hack)=]List,
_IF not_machine _exist =]FD_MACH_IFNOT[=
apz[=(. Hack)=]Machs,
_ELSE =]FD_MACH_ONLY[=
[=(. HACK)=]_TEST_CT, [=
_ENDIF =][=
IF (exist? "not_machine") =]FD_MACH_IFNOT[=
_IF shell _exist =] | FD_SHELL_SCRIPT[=
ELSE =]FD_MACH_ONLY[=
_ELIF c_fix _exist =] | FD_SUBROUTINE[=
ENDIF =][=
_ELIF replace _exist =] | FD_REPLACEMENT[=
IF (exist? "shell") =] | FD_SHELL_SCRIPT[=
_ENDIF =],
ELIF (exist? "c_fix") =] | FD_SUBROUTINE[=
a[=hackname _cap=]Tests, apz[=hackname _cap=]Patch, 0 }[=
ELIF (exist? "replace") =] | FD_REPLACEMENT[=
ENDIF =],
/fix=]
a[=(. Hack)=]Tests, apz[=(. Hack)=]Patch, 0 }[=
ENDFOR =]
};
};
gcc/fixinc/genfixes
View file @
98c197fe
...
@@ -66,6 +66,14 @@ fi
...
@@ -66,6 +66,14 @@ fi
AG
=
"autogen
$AG
"
AG
=
"autogen
$AG
"
set
-e
set
-e
if
[
-z
"
`
${
AG
}
-v
| fgrep
'Ver. 5.'
`
"
]
then
echo
"Your AutoGen is either out of date or not available"
>
&2
echo
"Please get AutoGen5 from ftp.gnu.org/gnu/autogen"
>
&2
touch
$@
exit
0
fi
case
"
$1
"
in
case
"
$1
"
in
fixincl.x
|
*
/fixincl.x
)
fixincl.x
|
*
/fixincl.x
)
if
(
${
AG
}
--help
>
/dev/null 2>&1
)
if
(
${
AG
}
--help
>
/dev/null 2>&1
)
...
...
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