3.7 Testing the toolchain you built: where --target_board runs each test
Source references in this chapter are to GCC 15.2.0 (releases/gcc-15.2.0).
Your arm-eabi toolchain builds, and make check runs for hours. Then
gcc.sum reports thousands of failed execution tests. The compiler is not at
fault. DejaGnu ran each ARM executable on your x86 build machine, and it said so in
one warning near the top of the log.
GCC's testsuite does not decide where a test program runs. A DejaGnu board file
decides, and --target_board names the board. A cross run with no board name
uses the board unix, which is the build machine.
This chapter assumes Chapter 1.6, for
-print-multi-directory and the multilib search, and
Chapter 3.4 and
Chapter 3.6, for the bare-metal toolchain and the
combined tree that the examples test. How to write a test is
Chapter 6.1's subject. This chapter runs all of them
against a toolchain you built.
The chapter crosses into DejaGnu, a separate GNU project, because the code that
picks a board, starts a simulator and reads the exit status is DejaGnu's. GCC's
testsuite supplies the configuration and reads the answers. DejaGnu citations are
to the dejagnu-1.6.3 tag, the newest release. GCC 15.2 requires DejaGnu 1.5.3 or
later (install.texi:574).
Nothing in this chapter was run. A test run needs a build tree, DejaGnu and, for a
cross target, a simulator or a board. The commands follow from the cited source and
the install manual. Without a build you can still read a board file from DejaGnu's
baseboards directory and a .sum file from another run, and that is enough to
follow the chapter.
make check writes site.exp, then runs runtest
The install manual documents the user-facing part on its Testing
page: make -k check in the object directory, per-language targets such as
make check-gcc, and RUNTESTFLAGS to pass options to DejaGnu. Under that, the
top-level check target runs check-host and check-target
(Makefile.tpl:993-1015), so the target libraries' testsuites run
too. In gcc/, each check-<tool> target ends in
$(RUNTEST) --tool <tool> $(RUNTESTFLAGS), run in testsuite/<tool>
(gcc/Makefile.in:4610-4625). check-gcc takes the parallel path
to the same command (:4688-4713,
gcc/c/Make-lang.in:174-180).
One file carries configure's decisions to DejaGnu. Every check target depends on
site.exp, which gcc/Makefile.in writes:
@echo "set host_triplet $(host)" >> ./site.tmp
@echo "set build_triplet $(build)" >> ./site.tmp
@echo "set target_triplet $(target)" >> ./site.tmp
@echo "set target_alias $(target_noncanonical)" >> ./site.tmp
Listing 3.7-1: the triplets in site.exp (gcc/Makefile.in:4508-4511).
DejaGnu loads this site.exp before its global configuration files
(runtest.exp:680-710). target_alias is target_noncanonical,
the target name as you typed it (Chapter 2.2).
A board file uses it later to name the simulator.
Three more lines matter for a cross build:
TEST_ALWAYS_FLAGSis--sysroot=DIRwhen you configured with--with-build-sysroot=DIR(gcc/Makefile.in:4520-4522,gcc/configure.ac:140-147).gcc_target_compileputs it first on every compile (gcc/testsuite/lib/gcc.exp:137-142).- When the build tree has a target
newlibdirectory and the host is not the target,site.expadds-Iand-Boptions for it (gcc/Makefile.in:4536-4553). The comment above the block says the compiler needs the-B"so it can find newlib's crt0.o". - In a combined tree,
-Lto the in-treelddirectory lets the linker find its scripts (:4554-4557).
The compiler under test is the one in the build tree. When nothing sets
GCC_UNDER_TEST, gcc_init asks DejaGnu's find_gcc
(gcc.exp:101-107). It returns xgcc -B<dir>/ for the xgcc it
finds, and <target_alias>-gcc only when there is none
(lib/libgloss.exp:631-648). libgcc helps by copying itself back
into gcc/, and its comment gives the reason:
all: all-multi
# Now that we have built all the objects, we need to copy
# them back to the GCC directory. Too many things (other
# in-tree libraries, and DejaGNU) know about the layout
# of the build tree, for now.
$(MAKE) install-leaf DESTDIR=$(gcc_objdir) \
slibdir= libsubdir= MULTIOSDIR=$(MULTIDIR)
Listing 3.7-2: libgcc returns to the compiler's directory (libgcc/Makefile.in:116-122).
install-leaf puts libgcc.a in $(libsubdir)$(MULTISUBDIR), and libsubdir
is empty here, so each variant lands in gcc/<multilib directory>/
(libgcc/Makefile.in:315, :1188-1193).
The multilib section below depends on that layout.
No --target_board means unix
DejaGnu runs every test once for each board in target_list. When nothing has set
the list, it supplies one:
if {![info exists target_list]} {
# Make sure there is at least one target machine. It's probably a Unix box,
# but that's just a guess.
set target_list { "unix" }
} else {
verbose "target list is $target_list"
}
Listing 3.7-3: the default board (runtest.exp:1772-1778, DejaGnu 1.6.3).
unix is not an ordinary board name. is_remote treats it as the build machine,
in a check whose comment calls unix "a magic string that should really go away
someday" (lib/framework.exp:195-201). On a local board,
unix_load runs the program as $prog $parg
(config/unix.exp:64-69). On a cross toolchain that program is an
ARM executable, and the execution tests fail by the thousand.
DejaGnu does notice. After it loads a board, it checks for a cross target on a local board:
if { ![isnative] && ![isremote target] } {
global env build_triplet target_triplet
if { (![info exists env(DEJAGNU)]) && ($build_triplet ne $target_triplet) } {
warning "Assuming target board is the local machine (which is probably wrong).\nYou may need to set your DEJAGNU environment variable."
}
}
Listing 3.7-4: the only warning (runtest.exp:953-958, DejaGnu 1.6.3).
The warning disappears when DEJAGNU is set, whatever the file it names contains.
The install manual calls another message harmless, "Couldn't find
the global config file" (install.texi:3439-3443). On a cross run, read it as a hint: unless
~/.dejagnurc sets target_list, no file chose a board for you
(runtest.exp:1021-1044).
You name a board in one of two ways. The install manual documents
RUNTESTFLAGS=--target_board=arm-sim on the make line. GCC's
simulator testing page, outside the source tree, uses that board for an
arm-eabi combined tree (read on 2026-10-19, last modified 2026-07-21). The other
way is the global configuration file that DEJAGNU names
(runtest.exp:1029-1041), which can set target_list for each
triplet. The command line wins. DejaGnu parses --target_board again after that
file, with the comment "Set it again, father knows best"
(runtest.exp:1206-1209).
load_board_description: from a board name to arm-sim.exp
--target_board=arm-sim/-mthumb names a board and a variant. DejaGnu splits the
name at each / (runtest.exp:1796-1807). The first part selects the
file. The rest is the variant list, which a later section follows.
load_board_description looks for arm-sim.exp in this order
(runtest.exp:1509-1521):
<dir>/<host>/for each directory inboards_dir,$libdir/baseboards/<host>/,- each directory in
boards_dir, $libdir/baseboards/, the boards that DejaGnu installs.
<host> is the host board's name, by default the build machine's host name
(runtest.exp:915-931),
and boards_dir defaults to a boards directory next to the file that DEJAGNU
names (runtest.exp:1038-1040). So your own board files go
there, and they shadow DejaGnu's. A name that matches no file stops the run with
"couldn't load description file". Only unix falls back to the generic
configuration (runtest.exp:931-938).
This is the board that the simulator page uses:
# Load the generic configuration for this board. This will define a basic
# set of routines used to communicate with the board.
load_generic_config "sim"
# No multilib flags needed by default.
process_multilib_options ""
...
# basic-sim.exp is a basic description for the standard Cygnus simulator.
load_base_board_description "basic-sim"
# The name of the directory in the build tree where the simulator lives.
setup_sim arm
# The compiler used to build for this board. This has *nothing* to do
# with what compiler is tested if we're testing gcc.
set_board_info compiler "[find_gcc]"
# The basic set of flags needed to build "hello world" for this
# board. This board uses libgloss and newlib.
set_board_info cflags "[libgloss_include_flags] [newlib_include_flags]"
set_board_info ldflags "[libgloss_link_flags] [newlib_link_flags] $additional_options"
# This board doesn't use a linker script.
set_board_info ldscript ""
# The simulator doesn't return exit statuses and we need to indicate this.
set_board_info needs_status_wrapper 1
# Used by a few gcc.c-torture testcases to delimit how large the stack can
# be.
set_board_info gcc,stack_size 16384
Listing 3.7-5: the ARM simulator board, abridged (baseboards/arm-sim.exp:19-61, DejaGnu 1.6.3).
Each line hands a decision to a later stage:
load_generic_config "sim"loadsconfig/sim.exp, which sets the board'sprotocoltosim(config/sim.exp:142). The next section follows that word.process_multilib_options ""turns the variant list into compiler flags.setup_sim armnames the simulator.find_simtakes theSIMvariable if it is set, thensim/arm/runin the build tree, then<target_alias>-runfromPATH(baseboards/basic-sim.exp:24-47). Thetarget_aliasof Listing 3.7-1 makes thatarm-eabi-run. A combined tree that containssim/, as the simulator page builds, has the in-tree one.cflagsandldflagsadd libgloss and newlib from the build tree. The multilib section shows how they choose the variant's directory.needs_status_wrappersays that the simulator loses the exit status.
The compiler line carries a comment that is easy to skip. That compiler "has
nothing to do with what compiler is tested if we're testing gcc".
gcc_target_compile passes compiler=$GCC_UNDER_TEST
(gcc.exp:160-161), and DejaGnu's default_target_compile
uses an explicit compiler= option before it looks at the board's key
(lib/target.exp:444-447 and :559-568).
A board file can derive from another, but set_board_info keeps the first value
it sees for a key (lib/targetdb.exp:59-64). So a derived
board sets its own keys before it loads the base board.
remote_load: how a dg-do run test reaches the simulator
A dg-do run test compiles to an executable. DejaGnu's dg-test then calls
${tool}_load on it (lib/dg.exp:797-802). GCC wraps that procedure to
handle dg-shouldfail and target environment variables
(gcc-dg.exp:465-486), and DejaGnu's own version calls
remote_load target (lib/standard.exp:22-36).
remote_load passes the request to call_remote, which looks for a procedure
named after the board's protocol:
foreach try "$high_prot [board_info $dest file_transfer] [board_info $dest connect] telnet standard" {
verbose "looking for ${try}_${proc}" 4
if { $try ne "" } {
if { [info procs "${try}_${proc}"] ne "" } {
verbose "call_remote calling ${try}_${proc}" 3
return [eval ${try}_${proc} \"$dest\" $args]
}
}
}
Listing 3.7-6: the protocol picks the load procedure (lib/remote.exp:659-667, DejaGnu 1.6.3).
high_prot holds the board name and its protocol value
(lib/remote.exp:624-631). For arm-sim that is sim, so
sim_load runs the board's sim program, with sim,options, on the test
executable (config/sim.exp:25-56), and turns the status into
pass or fail (config/sim.exp:62-122). For unix it is unix
(config/unix.exp:161). A board with no load procedure of its
own ends at standard_load, which copies the program to the remote board and runs
it there (lib/remote.exp:1077-1120).
So one protocol value decides where your test runs, and the file that holds it
does not come from GCC.
needs_status_wrapper: exit codes through testglue.c
A simulator that loses the exit status would turn every abort () into a pass.
The board declares this with needs_status_wrapper, and GCC's testsuite responds
in two places. gcc_init builds a wrapper object once, as gcc-testglue.o
(gcc.exp:116, wrapper.exp:24-53). Then each
compile links it:
if {[target_info needs_status_wrapper] != "" && \
[target_info needs_status_wrapper] != "0" && \
[info exists gluefile] } {
lappend options "libs=${gluefile}"
lappend options "ldflags=$wrap_flags"
if { $type == "executable" } {
set options [concat "{additional_flags=-dumpbase \"\"}" $options]
}
}
Listing 3.7-7: linking the status wrapper (gcc/testsuite/lib/gcc.exp:164-172).
The object comes from DejaGnu's testglue.c, and wrap_flags is
-Wl,-wrap,exit -Wl,-wrap,_exit -Wl,-wrap,main -Wl,-wrap,abort
(lib/libgloss.exp:939-968). The linker sends each of those
calls to the wrapper, which writes *** EXIT code N to file descriptor 1 before it
exits (testglue.c:7-9, :94-97).
sim_load reads the code from that line (config/sim.exp:110-113).
When the board needs a wrapper and the line is missing, check_for_board_status
treats the program as crashed, whatever status the simulator returned
(lib/remote.exp:1226-1251).
The wrapper changes the test program, so tests can opt out. The unwrapped
effective target is false on such a board
(target-supports.exp:1666-1674).
Board keys GCC reads: gcc,timeout, gcc,stack_size and others
A board file is a list of set_board_info keys. DejaGnu reads most of them. GCC's
own testsuite reads these:
| Key | What GCC's testsuite does with it | Source |
|---|---|---|
multilib_flags | adds the variant's flags to each compile | gcc.exp:150-158 |
needs_status_wrapper | links the wrapper, and makes unwrapped false | Listing 3.7-7 |
gcc,timeout | sets the time limit when neither the test nor its .exp file set one | timeout.exp:43-55 |
gcc,stack_size | makes stack_size true, with the key's value as the limit | target-supports.exp:654-682 |
gcc,no_trampolines | makes trampolines false | target-supports.exp:637-650 |
gcc,signal_suppress | makes signal false | target-supports.exp:686-691 |
is_simulator, slow_simulator | make simulator true and hw false | target-supports.exp:10474-10515 |
The names in the middle column are effective targets, which tests require with
dg-require-effective-target (Chapter 6.1). So one board key can turn a family of
tests into UNSUPPORTED results without a change to GCC.
Not every effective target comes from the board. newlib_nano_io searches the
Configured with: line of gcc -v for --enable-newlib-nano-formatted-io
(target-supports.exp:10217-10220, :278-291).
That flag is newlib's, so it reaches GCC's line only when you passed it to a
combined tree's top-level configure (Chapter 3.6).
A nano newlib built on its own, as in Chapter 3.4, counts only if GCC's own
configure line carries the flag too.
DejaGnu also marks a board as remote unless its name is the build machine's host
name (runtest.exp:1527-1537). On a remote target, GCC's load
wrapper reports tests that set target environment variables as unsupported
(gcc-dg.exp:479-483).
Read a board file before you trust its results. DejaGnu 1.6.3 also ships a
qemu.exp board, and its load procedure tests the result of local_exec with
array size:
proc qemu_load { dest prog args } {
global qemu
global timeout
set ret [local_exec "$qemu $prog" "" "" $timeout]
if { [array size ret] == 0 } {
return "pass"
} else {
return "fail"
}
}
Listing 3.7-8: qemu_load (baseboards/qemu.exp:199-209, DejaGnu 1.6.3).
local_exec returns a list (lib/remote.exp:281-285), not an
array. Tcl's array size returns 0 for a variable that is not an array
(Tcl array manual). So this procedure returns pass for every
program it runs.
For a hosted toolchain such as Chapter 3.3's aarch64-linux-gnu, a board of your
own can load the sim configuration and name a user-mode emulator as its sim
program, such as the qemu-aarch64 that qemu.exp picks for aarch64*-gnu*
(baseboards/qemu.exp:86-89). sim_load then reads the
emulator's real exit status. How the emulator finds the target's dynamic loader is
run-time setup, outside this book.
--target_board=arm-sim/-mthumb: variants become multilib_flags
The install manual documents the variant syntax on the Testing
page: slashes separate options, and braces expand into several runs, as in
arm-sim\{-mhard-float,-msoft-float\}\{-O1,-O2,-O3,\}. DejaGnu expands the braces
itself, before the main loop (runtest.exp:1685-1714). Each
expanded name is a board with options after slashes. It prints as a
Running target line,
and the results after that line belong to that variant
(runtest.exp:1796-1807).
The options do not reach the compiler by themselves. The board must call
process_multilib_options, as arm-sim.exp and unix.exp do, and that procedure
decides what each word means:
foreach x $board_variant_list {
regsub -all "^\[ \t\]*" $x "" x
regsub -all "\[ \t\]*$" $x "" x
if { $x eq "" } {
continue
}
switch -glob -- $x {
...
"little*endian" -
"el" -
"EL" {
append multilib_flags " -EL"
}
"big*endian" -
"eb" -
"EB" {
append multilib_flags " -EB"
}
"soft*float" {
append multilib_flags " -msoft-float"
}
"-*" {
append multilib_flags " $x"
}
default {
append multilib_flags " -m$x"
}
}
}
set_board_info multilib_flags $multilib_flags
Listing 3.7-9: variant words become multilib_flags, abridged (lib/libgloss.exp:824-894, DejaGnu 1.6.3). The omitted cases turn words such as elf and dwarf2 into other board keys.
A word that starts with - passes through. Any other word gets -m in front. So
arm-sim/thumb means -mthumb, soft-float means -msoft-float, and el means
-EL. The procedure also does nothing when the board already has
multilib_flags (:831-833).
default_target_compile then puts multilib_flags in front of the other flags
(lib/target.exp:696-704), so a test's own dg-options come
after the variant's. GCC relies on that order. Its comment in
gcc_target_compile says that a flag is "appended here to multilib_flags as it can
be overridden by the latter if it was added earlier"
(gcc.exp:150-158).
get_multilibs: the variant asks the driver for its directory
The libraries must come from the variant's multilib, and the board finds them by
asking the compiler under test. newlib_link_flags, which arm-sim.exp calls for
its ldflags, takes a directory from get_multilibs and adds -B and -L for
its newlib subdirectory (lib/libgloss.exp:108-139).
get_multilibs finds the target's directory in the build tree, which is named
after target_alias, and appends what the driver prints:
set gccpath [eval exec $compiler --print-multi-directory $mopts]
set gccpath [lindex $gccpath 0]
if { $gccpath ne "" } {
verbose "GCC path is $gccpath"
if { [llength $args] == 0 } {
set board_info($target_board,multitop) $multitop/$gccpath
}
return $multitop/$gccpath
}
Listing 3.7-10: the driver chooses the variant's directory (lib/libgloss.exp:513-521, DejaGnu 1.6.3).
$mopts is the board's multilib_flags (:444-452). So for
arm-sim/-mthumb the board runs <objdir>/gcc/xgcc --print-multi-directory -mthumb, and newlib comes from <objdir>/arm-eabi/<that directory>/newlib.
libgcc needs no help. It put each variant under gcc/<multilib directory>/, and
the driver searches a -B prefix with that directory appended
(gcc/gcc.cc:4613-4614, and pass four in Chapter 1.6).
This is where a variant run can test less than you think. When the variant's flags
select the default multilib, -print-multi-directory prints .
(Chapter 1.6). The board then links the default newlib,
and the driver's search finds the default libgcc. The test objects get the
variant's code generation, and the libraries do not. Check before a long run:
$ cd <objdir>
$ ./gcc/xgcc -B./gcc/ -print-multi-lib
$ ./gcc/xgcc -B./gcc/ -mthumb -print-multi-directory
If the second command prints ., the -mthumb run links the default libraries.
check-gcc//: one directory per variant
The install manual documents a parallel form for the gcc subdirectory. The rule
passes the text after // as --target_board, and gives each variant its own
testsuite directory, with each / turned into a dot
(gcc/Makefile.in:4587-4600):
$ cd <objdir>/gcc
$ make -j2 check-gcc//arm-sim/{-marm,-mthumb}
The -mthumb results land in testsuite.arm-sim.-mthumb/gcc/gcc.sum.
Reading gcc.sum: Running target lines and the # of counts
Each tool writes a .sum and a .log file in its testsuite directory, so the C
results are in <objdir>/gcc/testsuite/gcc/gcc.sum. Under make -j that file is
merged from parallel parts (gcc/Makefile.in:4657-4686). The
install manual documents the two files and the status codes. The layout is
DejaGnu's, and four kinds of line carry it:
- The header names the configuration:
Target is <triplet>for a cross run,Native configuration is <triplet>for a native one (runtest.exp:1392-1405). With no triplet fromsite.expor--target, DejaGnu uses the build machine's (runtest.exp:880-888). Schedule of variations:lists every board and variant before any test runs (runtest.exp:1789-1793).Running target <board/variant>starts each variant's results (runtest.exp:1805).- Each result is one line,
<STATUS>: <test name>(lib/framework.exp:863-869). Each variant ends with a block of# ofcounts (lib/framework.exp:486-527).
To see the skeleton of a run without its thousands of results:
$ grep -E '^(Target is|Native configuration is|Running target|# of )' \
<objdir>/gcc/testsuite/gcc/gcc.sum
The test name does not contain the variant. The same name appears once under each
Running target line, and only its position tells the variants apart.
The manual lists seven status codes. DejaGnu counts four more: KFAIL, KPASS,
UNRESOLVED and UNTESTED (lib/framework.exp:1060-1071).
A cross builder meets UNRESOLVED first. A missing crt0.o, or a link error from
the board's ldflags, gives each run test a FAIL for "test for excess errors"
(lib/dg.exp:781-792) and an UNRESOLVED because "compilation failed
to produce executable" (lib/dg.exp:797-800).
contrib/compare_tests: comparing two runs
You compare a run with a baseline: the same toolchain before your change, or the
results posted for a similar target. compare_tests PREVIOUS CURRENT takes two
.sum files, or two directories whose common .sum files it compares
(contrib/compare_tests:8-33). It rewrites both inputs first:
sed 's/^XFAIL/FAIL/; s/^ERROR/FAIL/; s/^XPASS/PASS/' < "$1" | awk '/^[ ]*=== [^ ]* tests ===$/ {tool = $2} /^Running target / {target = $3} { if (tool != "") { sub(/:[ ]/, "&"tool": " ); }; if (target != "unix") { sub(/:[ ]/, "&"target": " ); }; print $0; }' | cut -c1-2000 >$tmp1
Listing 3.7-11: normalising a .sum file (contrib/compare_tests:111).
Read it from left to right:
sedfoldsXFAILintoFAIL,ERRORintoFAILandXPASSintoPASS. From here on, a test either passed or failed.awkremembers the tool from the=== gcc tests ===line and the board from eachRunning targetline, and inserts both after the status. Eachsubinserts after the first colon, so a line readsFAIL: arm-sim/-mthumb: gcc: <test name>. The board is left out when it isunix.- Later steps keep only the lines that start with
PASSorFAIL(:127-203).
Step 2 keeps variants apart, so runs on different boards share no test names. A
baseline from arm-sim against a run from arm-sim/-mthumb gives only
disappeared tests and new ones. Step 3 leaves out UNSUPPORTED and UNRESOLVED.
A test that passed before and is UNRESOLVED now appears only under "Old tests that
passed, that have disappeared".
Two sections make the script exit with 1: "Tests that now fail, but worked before"
(:127-138) and "New tests that FAIL"
(:153-164). Improvements and disappearances count only with
-strict. Because step 1 folded the expectations away, an XFAIL that turns into a
FAIL is not reported.
contrib/test_summary and contrib/test_installed
The install manual documents contrib/test_summary for mailing results to the
gcc-testresults list. The script itself sends nothing. It prints a shell script:
pipe it to more to look, or to sh to act (contrib/test_summary:25-29).
The report keeps only the XPASS, FAIL, UNRESOLVED, WARNING, ERROR and
# of lines of every .sum file below the current directory (:72,
:132), with the configure flags (:94). Piped to
sh, it also renames each .sum and .log file to .sent
(:151-155), unless you pass -t.
contrib/test_installed tests an installed compiler. In an empty directory it
writes its own site.exp and runs runtest for each language
(contrib/test_installed:36-43, :107-130). Its defaults
suit a native compiler. --prefix=DIR tests DIR/bin/gcc (:113),
so name a cross driver with --with-gcc=. The triplet and target_alias reach
site.exp only with --target= (:122-125). Without them DejaGnu
assumes a native run, and find_sim cannot name arm-eabi-run. The first
argument that the script does not recognise, and the rest after it, go to
runtest (:31-34):
$ mkdir /tmp/installed-test && cd /tmp/installed-test
$ <srcdir>/contrib/test_installed --target=arm-eabi \
--with-gcc=/opt/cross/bin/arm-eabi-gcc --without-g++ \
--without-gfortran --without-objc --target_board=arm-sim
Three things to carry away
A board file decides where a test runs. A cross run with no --target_board
runs every program on the build machine.
Variant options reach the libraries through -print-multi-directory. A
variant that selects the default multilib links the default libraries.
compare_tests compares only PASS and FAIL lines, and keys them by board.
Compare runs on the same board name, and read the UNRESOLVED results yourself.
Things that surprise people
--target_board=unix/O2 passes -mO2. process_multilib_options puts -m
in front of every variant word without a leading -. Write unix/-O2.
"Native configuration is" at the top of a cross .sum means DejaGnu never got
the target triplet. Check the site.exp that the run used.
test_summary | sh renames your results. The .sum and .log files become
.sent files. Run it without | sh to read the summary.
Documentation coverage
The install manual's Testing page (gcc/doc/install.texi:3393-3619)
documents make -k check, RUNTESTFLAGS, the --target_board variant syntax
(:3490-3535), the check-gcc// form (:3537-3557), the status codes
(:3560-3588) and test_summary (:3591-3606). For a cross compiler it points
to the simulator page (:3445-3446), outside the source tree. The
internals manual documents gcc,timeout as a board key under
Directives (gcc/doc/sourcebuild.texi:1105-1119), and the
effective targets simulator, signal, trampolines, unwrapped and
stack_size under Effective-Target Keywords
(sourcebuild.texi:2935-2973, :3156-3160). DejaGnu's manual documents
board files and lists board keys.
What is not documented:
- That a cross run with no
--target_boardruns every program on the build machine, and that a setDEJAGNUhides the warning. - What GCC's testsuite does with each board key. DejaGnu's manual lists
gcc,stack_size,gcc,no_trampolines,is_simulatorandneeds_status_wrappermostly without a description, and the internals manual describes the effective targets without the keys behind them. - That
newlib_nano_ioreads GCC'sConfigured with:line, not newlib's own configuration. - That
process_multilib_optionsadds-mto variant words, that a variant reaches newlib through-print-multi-directory, and that a variant on the default multilib links the default libraries. - How the status wrapper works, and that a missing
*** EXIT codeline counts as a crash. UNRESOLVEDand the other status codes beyond the manual's seven.compare_tests, its folding of XFAIL and XPASS, and its restriction to PASS and FAIL lines.contrib/test_installedis not mentioned either.
Next: what libgcc is for, and why the compiler emits calls into it when you link no C library at all.
All source references in this chapter are to GCC 15.2.0
(releases/gcc-15.2.0). Line numbers in other releases will differ; the
surrounding code rarely does. Where behaviour itself changed across a major
version, it is flagged inline.