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
da6d3adf
Commit
da6d3adf
authored
May 19, 2000
by
Bruce Korb
Committed by
Bruce Korb
May 19, 2000
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
test_text cleanups
From-SVN: r34020
parent
f2b33981
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
57 additions
and
67 deletions
+57
-67
gcc/ChangeLog
+11
-0
gcc/fixinc/README
+18
-46
gcc/fixinc/check.diff
+0
-0
gcc/fixinc/check.tpl
+18
-4
gcc/fixinc/fixincl.x
+3
-8
gcc/fixinc/inclhack.def
+7
-9
No files found.
gcc/ChangeLog
View file @
da6d3adf
2000
-
05
-
19
Bruce
Korb
<
bkorb
@gnu
.
org
>
*
fixinc
/
README
:
cleaned
up
old
documentation
*
fixinc
/
check
.
diff
:
regenerated
&
verified
on
OSR5
on
ix86
*
fixinc
/
check
.
tpl
:
compute
the
list
of
needed
directories
emit
"#if defined(name)"
because
of
conflict
omit
machine
name
differences
from
output
differences
*
fixinc
/
inclhack
.
def
(
m88k_multi_incl
)
:
Use
`
wrap
'
function
(
machine_name
)
:
change
test
text
to
use
`
sed
'
markers
*
fixinc
/
fixincl
.
x
:
regen
Fri
May
19
06
:
49
:
35
2000
Richard
Kenner
<
kenner
@vlsi1
.
ultra
.
nyu
.
edu
>
*
config
/
elfos
.
h
(
SELECT_SECTION
)
:
Don
'
t
access
DECL_INITIAL
of
...
...
gcc/fixinc/README
View file @
da6d3adf
...
...
@@ -192,49 +192,21 @@ Here are the rules for making fixes in the inclhack.def file:
5. Testing fixes.
The brute force method is, of course, to configure and build
GCC. There are easier ways, too. You can run the compiled
binaries in isolation. ``c_tests'' can be tested with
``fixtests'', ``c_fixes'' with ``fixfixes'' and any fix or
test can be tested with ``fixincl''.
``fixtests'' is invoked as follows:
fixtests filename.h your_test_name
if [ $? -ne 0 ]
then echo do not apply your_fix_name
else echo APPLY your_fix_name ; fi
and ``fixfixes'' is invoked thus:
fixfixes filename.h your_fix_name < filename.h > /tmp/fixed
The file name argument is required, but is only used as a hint
for use by ``your_fix_name'', it is not used for obtaining the
data. Also, ``your_fix_name'' and ``your_test_name'' may be
the same, since fix names and test names are in different
"name spaces."
The ``fixincl'' program is a little harder to work with :-}.
It was written with the expectation that it would be run
inside of the fixincl.sh script that handles everything.
Run it with no arguments to get usage hints, but here is what
you will need to do (approximately):
FI=${top_builddir}/gcc/fixinc/fixincl
TARGET_MACHINE=`sh ${top_srcdir}/config.guess`
SRCDIR=/usr/include
DESTDIR=/tmp/fixtest
VERBOSE=4
FIND_BASE="."
export TARGET_MACHINE SRCDIR DESTDIR VERBOSE FIND_BASE
rm -rf ${DESTDIR}
mkdir -p ${DESTDIR}
cd ${SRCDIR}
find * -follow -type f -name '*.h' > ${DESTDIR}/LIST
# you may edit this to the list you want
${FI} ${DESTDIR}/LIST > /dev/null 2> ${DESTDIR}/LOG
Check your results in ${DESTDIR}/LOG. The stdout output
is merely some shell commands that are relevant only to
the fixincl.sh shell script.
GCC. But you can also:
cd ${top_builddir}/gcc
rm -rf fixinc.sh include/ stmp-fixinc
make stmp-fixinc
I would really recommend, however:
cd ${top_builddir}/gcc/fixinc
make check
To do this, you *must* have autogen installed on your system.
The "check" step will proceed to construct a shell script that
will exercize all the fixes, using the sample test_text
provided with each fix. Once done, the changes made will
be compared against the changes saved in the source directory.
If you are changing the tests or fixes, the change will likely
be highlighted.
gcc/fixinc/check.diff
View file @
da6d3adf
This diff is collapsed.
Click to expand it.
gcc/fixinc/check.tpl
View file @
da6d3adf
...
...
@@ -21,7 +21,21 @@ export TARGET_MACHINE DESTDIR SRCDIR FIND_BASE VERBOSE
mkdir $
{
DESTDIR
}
$
{
SRCDIR
}
( cd $
{
SRCDIR
}
mkdir netinet rpc sparc sundev sunwindow sys X11 Xm )
set +e
for f in [=
_EVAL fix.files _stack _join "echo `
for f in %s
do case $f in
*/* ) echo $f | sed 's;/[^/]*$;;' ;;
esac
done | sort -u
` " _printf _shell =]
do
mkdir $f || mkdir -p $f
done ) > /dev/null 2>
&
1
[=
...
...
@@ -40,10 +54,10 @@ cat >> inc/[=
_IF files _exist =][=
files[0] =][=
_ELSE =]testing.h[=
_ENDIF =]
<
<
-
'
_HACK_EOF_
'
_ENDIF =]
<
<
-
_HACK_EOF_
#
if
ndef
[=
hackname
_up=
]_CHECK
#
if
defined
(
[=
hackname
_up=
]_CHECK
)
[=
test_text
"\
t
"
_prefix=
]
#
endif
/*
[=
hackname
_up=
]_CHECK
*/
_HACK_EOF_
...
...
@@ -65,7 +79,7 @@ do
echo
"
Only
in
inc:
inc
/$
f
"
else
diff
-c
inc
/$
f
res
/$
f
|
\
sed
-e
'
1
,
2s
;
.*;;'
sed
-e
'
1
,
2s
;
.*;;'
-e
'/
MACH_DIFF:
/,/
no
uniform
test
,/
d
'
fi
done
>
NEWDIFF
<
LIST
...
...
gcc/fixinc/fixincl.x
View file @
da6d3adf
...
...
@@ -2291,13 +2291,8 @@ tTestDesc aM88k_Multi_InclTests[] = {
/*
* Fix Command Arguments for M88k_Multi_Incl
*/
const char* apzM88k_Multi_InclPatch[] = { "sh", "-c",
"echo Fixing $file, to protect against multiple inclusion. >&2\n\
cpp_wrapper=`echo $file | sed -e 's,\\.,_,g' -e 's,/,_,g'`\n\
echo \"#ifndef __GCC_GOT_${cpp_wrapper}_\"\n\
echo \"#define __GCC_GOT_${cpp_wrapper}_\"\n\
cat\n\
echo \"#endif /* ! __GCC_GOT_${cpp_wrapper}_ */\"",
const char* apzM88k_Multi_InclPatch[] = {
"wrap",
(char*)NULL };
/* * * * * * * * * * * * * * * * * * * * * * * * * *
...
...
@@ -5070,7 +5065,7 @@ tFixDesc fixDescList[ FIX_COUNT ] = {
{ zM88k_Multi_InclName, zM88k_Multi_InclList,
apzM88k_Multi_InclMachs,
M88K_MULTI_INCL_TEST_CT, FD_MACH_ONLY | FD_S
HELL_SCRIPT
,
M88K_MULTI_INCL_TEST_CT, FD_MACH_ONLY | FD_S
UBROUTINE
,
aM88k_Multi_InclTests, apzM88k_Multi_InclPatch },
{ zMachine_Ansi_H_Va_ListName, zMachine_Ansi_H_Va_ListList,
...
...
gcc/fixinc/inclhack.def
View file @
da6d3adf
...
...
@@ -1284,13 +1284,8 @@ fix = {
mach = "m88k-tektronix-sysv3*";
files = "time.h";
bypass = "#ifndef";
shell =
"echo Fixing $file, to protect against multiple inclusion. >&2
cpp_wrapper=`echo $file | sed -e 's,\\.,_,g' -e 's,/,_,g'`
echo \"#ifndef __GCC_GOT_${cpp_wrapper}_\"
echo \"#define __GCC_GOT_${cpp_wrapper}_\"
cat
echo \"#endif /* ! __GCC_GOT_${cpp_wrapper}_ */\"";
c_fix = wrap;
test_text = "";
};
...
...
@@ -1314,8 +1309,11 @@ fix = {
hackname = machine_name;
c_test = machine_name;
c_fix = machine_name;
test_text = "#ifdef i386 /* no uniform machine_name test, so\n"
" this only works on i?86 machines */";
test_text =
"#if /* MACH_DIFF: */ \\\n"
"\t defined( i386 ) \\\n"
"\t|| defined( sparc ) /*\n"
"no uniform test, so be careful :-) */";
};
...
...
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