contrib/gcc-test-suite/README
author Bryan Hundven <bryanhundven@gmail.com>
Sun Jun 26 03:26:54 2011 -0700 (2011-06-26)
changeset 2515 364b06df9e3a
parent 1965 e3d532dd8b5d
child 2908 dcdb309b7967
permissions -rw-r--r--
glibc: Refactor startfiles/headers into do_libc_backend()

Refactor the contents of 'do_libc_start_files()' and 'do_libc()' into a
parameterized 'do_libc_backend()'. 'do_libc_start_files()' and 'do_libc()'
call 'do_libc_backend()' with either 'libc_mode=startfiles' or
'libc_mode=final' (respectively) so that the startfiles/headers and
the final libc builds are configured and built with the same options.

One example of where this is needed is when building a mips toolchain.
Previously, if you were building an n32 toolchain, you wouldn't have
noticed an issue, because if '-mabi' is not in CFLAGS, n32 is the
default:

http://sourceware.org/git/?p=glibc-ports.git;a=blob;f=sysdeps/mips/preconfigure;hb=HEAD

But when trying to build an o32 or n64 toolchain the build would
have failed. This is because (e)glibc expects "-mabi={o32,n32,n64}" to be
in CFLAGS, but was not previously provided in 'do_libc_start_files()'.
The build failure would happen in the shared-core gcc when it tries to
configure an n64 or o32 gcc with an n32 libc.

A simpler solution would have been to just add TARGET_CFLAGS to configure
in 'do_libc_start_files()', but this way makes configure and make
consistent for both steps.

Signed-off-by: Bryan Hundven <bryanhundven@gmail.com>
     1 
     2 Helper Makefile for testing gcc toolchains using the gcc-testsuite
     3 ==================================================================
     4 
     5 Requirements
     6 ------------
     7 
     8 * DejaGnu 'runtest' v1.4.4+
     9 * Make v3.81+
    10 
    11 
    12 Configuration
    13 -------------
    14 
    15 Edit default.cfg to reflect your toolchain and target configuration.
    16 
    17 Alternatively, override configuration variables on the command line.
    18 
    19 Available config variables:
    20 
    21 DG_TOOLNAME
    22   The name of the tool you want to test.
    23   Currently supported: gcc or g++
    24   Default: gcc
    25 
    26 DG_TARGET_HOSTNAME
    27   The hostname or IP of the machine to execute run-tests
    28   Default: 127.0.0.1
    29 
    30 DG_TARGET_USERNAME
    31   Execute the run-test as this user on DG_TARGET_HOSTNAME
    32   Default: root
    33 
    34 DG_C_TESTS
    35 DG_CPP_TESTS
    36   The C/C++ tests you want to check
    37   Default: (empty, means all tests)
    38 
    39 
    40 Run examples
    41 ------------
    42 
    43 The first two examples require a networked target with ssh access and automatic
    44 ssh login (see section below). Target SW should be compiled with the toolchain 
    45 to be tested.
    46 
    47 Run default gcc compile/execution tests:
    48 $ make DG_TOOLNAME=gcc DG_TARGET_HOSTNAME=192.168.17.93 DG_TARGET_USERNAME=root
    49 
    50 Run default g++ compile/execution tests:
    51 $ make DG_TOOLNAME=g++ DG_TARGET_HOSTNAME=192.168.17.93 DG_TARGET_USERNAME=root
    52 
    53 Run selected gcc compile only tests (no target required):
    54 $ make DG_TOOLNAME=gcc DG_C_TESTS="compile.exp noncompile.exp" 
    55 
    56 
    57 SSH automatic login configuration example
    58 -----------------------------------------
    59 
    60 On host do: 
    61 ssh-keygen -t rsa (then simply press enter thru all steps)
    62 ssh-copy-id -i ~/.ssh/id_rsa.pub <username>@<target IP>
    63 
    64 Now automatic ssh login should work - test by doing a simple ssh session to target.
    65 
    66 Note: The procedure might be slightly different for your particular target.
    67 
    68 
    69 Getting rid of the test-suite
    70 -----------------------------
    71 
    72 If you no longer have a need for the test-suite, then you can remove it altogether
    73 from your toolchain. Just delete the test-suite/ dub-dir.
    74 
    75 
    76 Author
    77 ------
    78 Martin Lund <mgl@doredevelopment.dk>
    79   Initial content
    80 
    81 "Yann E. MORIN" <yann.morin.1998@anciens.enib.fr>
    82   Getting rid of the test-suite
    83   Minor fixes