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
58e1e5ad
Commit
58e1e5ad
authored
Jun 30, 1999
by
Nick Clifton
Committed by
Nick Clifton
Jun 30, 1999
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move proc gcc_target_object_format from ecos.exp to file-format.exp
From-SVN: r27842
parent
2e477ae8
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
93 additions
and
54 deletions
+93
-54
gcc/testsuite/ChangeLog
+12
-0
gcc/testsuite/gcc.dg/special/ecos.exp
+4
-53
gcc/testsuite/lib/c-torture.exp
+2
-0
gcc/testsuite/lib/file-format.exp
+73
-0
gcc/testsuite/lib/gcc-dg.exp
+2
-1
No files found.
gcc/testsuite/ChangeLog
View file @
58e1e5ad
1999-06-29 Nick Clifton <nickc@cygnus.com>
* lib/file-format.exp: New file: Move definition of proc
gcc_target_object_format to here from
gcc.dg/special/ecos.exp.
* lib/c-torture.exp: Include lib file-format.exp.
* lib/gcc-dg.exp: Include lib file-format.exp.
* gcc.dg/special/ecos.exp: Remove definition of proc
gcc_target_object_format.
Mon Jun 28 08:20:51 1999 Jeffrey A Law (law@cygnus.com)
* gcc.c-torture/execute/990628-1.c: New test.
...
...
gcc/testsuite/gcc.dg/special/ecos.exp
View file @
58e1e5ad
...
...
@@ -24,59 +24,10 @@
# Load support procs.
load_lib gcc-dg.exp
###################################
# proc gcc_target_object_format { }
###################################
proc gcc_target_object_format { } {
global gcc_target_object_format_saved
if [info exists gcc_target_object_format_saved] {
verbose "gcc_target_object_format returning saved $gcc_target_object_format_saved" 2
return $gcc_target_object_format_saved
} else {
set objdump_name [find_binutils_prog objdump]
set open_file [open objfmtst.c w]
puts $open_file "void foo(void) { }"
close $open_file
gcc_target_compile objfmtst.c objfmtst.o object ""
set output [exec $objdump_name --file-headers objfmtst.o ]
file delete objfmtst.o
if ![ regexp "file format (.*)arch" $output dummy objformat ] {
verbose "Could not parse objdump output" 2
set gcc_target_object_format_saved unknown
} else {
switch -regexp $objformat {
elf {
verbose "gcc_target_object_format returning elf" 2
set gcc_target_object_format_saved elf
}
ecoff {
verbose "gcc_target_object_format returning ecoff" 2
set gcc_target_object_format_saved ecoff
}
coff {
verbose "gcc_target_object_format returning coff" 2
set gcc_target_object_format_saved coff
}
a\.out {
verbose "gcc_target_object_format returning a.out" 2
set gcc_target_object_format_saved a.out
}
default {
verbose "gcc_target_object_format returning unknown" 2
set gcc_target_object_format_saved unknown
}
}
}
return $gcc_target_object_format_saved
}
}
###############################
# proc gcc_target_object_format {}
###############################
# has been moved to: gcc/testsuite/lib/file-format.exp
###############################
# proc check_weak_available { }
...
...
gcc/testsuite/lib/c-torture.exp
View file @
58e1e5ad
...
...
@@ -19,6 +19,8 @@
# This file was written by Rob Savoye. (rob@cygnus.com)
load_lib file-format.exp
# The default option list can be overridden by
# TORTURE_OPTIONS="{ { list1 } ... { listN } }"
...
...
gcc/testsuite/lib/file-format.exp
0 → 100644
View file @
58e1e5ad
# Copyright (C) 1999 Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
# the Free Software Foundation; either version 2 of the License, or
# (at your option) any later version.
#
# This program is distributed in the hope that it will be useful,
# but WITHOUT ANY WARRANTY; without even the implied warranty of
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
# GNU General Public License for more details.
#
# You should have received a copy of the GNU General Public License
# along with this program; if not, write to the Free Software
# Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
# Please email any bugs, comments, and/or additions to this file to:
# egcs-bugs@egcs.cygnus.com
# This file defines a proc for determining the file format in use by the
# target. This is useful for tests that are only supported by certain file
# formats. This procedure is defined in a seperate file so that it can be
# included by other expect library files.
proc gcc_target_object_format { } {
global gcc_target_object_format_saved
if [info exists gcc_target_object_format_saved] {
verbose "gcc_target_object_format returning saved $gcc_target_object_format_saved" 2
} else {
set objdump_name [find_binutils_prog objdump]
set open_file [open objfmtst.c w]
puts $open_file "void foo(void) { }"
close $open_file
gcc_target_compile objfmtst.c objfmtst.o object ""
set output [exec $objdump_name --file-headers objfmtst.o ]
file delete objfmtst.o
if ![ regexp "file format (.*)arch" $output dummy objformat ] {
verbose "Could not parse objdump output" 2
set gcc_target_object_format_saved unknown
} else {
switch -regexp $objformat {
elf {
set gcc_target_object_format_saved elf
}
ecoff {
set gcc_target_object_format_saved ecoff
}
coff {
set gcc_target_object_format_saved coff
}
a\.out {
set gcc_target_object_format_saved a.out
}
pe {
set gcc_target_object_format_saved pe
}
default {
verbose "Unknown file format: $objformat" 3
set gcc_target_object_format_saved unknown
}
}
verbose "gcc_target_object_format returning $gcc_target_object_format_saved" 2
}
}
return $gcc_target_object_format_saved
}
gcc/testsuite/lib/gcc-dg.exp
View file @
58e1e5ad
# Copyright (C) 1997 Free Software Foundation, Inc.
# Copyright (C) 1997
, 1999
Free Software Foundation, Inc.
# This program is free software; you can redistribute it and/or modify
# it under the terms of the GNU General Public License as published by
...
...
@@ -20,6 +20,7 @@
# Define gcc callbacks for dg.exp.
load_lib dg.exp
load_lib file-format.exp
proc gcc-dg-test { prog do_what extra_tool_flags } {
# Set up the compiler flags, based on what we're going to do.
...
...
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