This is the mail archive of the gcc@gcc.gnu.org mailing list for the GCC project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Re: Removal of V2 code


> From: Mark Mitchell <mark@codesourcery.com>
> Date: Sun, 19 Nov 2000 21:51:57 -0800

> Or, alternatively, a way to build a cross-compiler plus simulator so
> that I can test a newlib configuration on my PC?

Sure.

I have a script for this, which the automated tester uses.  Just
change TOPDIR to somewhere on your machine.

[The complexity of this script is why people keep agitating
 for a combined tree.]

-- 
- Geoffrey Keating <geoffk@geoffk.org>

===File ~/buildobjs.sh======================================
#!/usr/unsupported/bin/bash

set -x

TARGET=powerpc-eabisim

CVSROOT_BIN=':pserver:anoncvs@anoncvs.cygnus.com:/cvs/src'
CVSROOT_GCC=':pserver:anoncvs@anoncvs.cygnus.com:/cvs/gcc'

TOPDIR=/sloth/delay/tbox
CVS_DIR=$TOPDIR/cvs-objs

SRC_XC=$CVS_DIR/gcc
SRC_BIN=$CVS_DIR/binutils
SRC_DIR=$TOPDIR/src-objs

INSTALL_DIR=$TOPDIR/objs
OBJ_DIR=$TOPDIR/build-objs

SCRIPT_DIR=$HOME/tbox

rm -rf $OBJ_DIR $INSTALL_DIR $SRC_DIR
mkdir $OBJ_DIR $INSTALL_DIR $SRC_DIR || exit 1
mkdir $OBJ_DIR/src $OBJ_DIR/test || exit 1
mkdir -p $SRC_XC $SRC_BIN || exit 1

PATH=/bin:/usr/bin
PATH=$INSTALL_DIR/bin:$TOPDIR/boot/bin:$PATH
export PATH

cd $SRC_XC || exit 1
cvs -Q -d $CVSROOT_GCC co egcs-full || exit 1

cd $SRC_BIN || exit 1
cvs -Q -d $CVSROOT_BIN co binutils gdb newlib dejagnu || exit 1

# the order here is important, the GCC files are the master copy.
cd $SRC_BIN/src || exit 1
find . -print | cpio -pdlm $SRC_DIR || exit 1
cd $SRC_XC/egcs || exit 1
find . -print | cpio -pdlmu $SRC_DIR || exit 1
cd $SRC_DIR || exit 1
[ -x contrib/gcc_update ] && contrib/gcc_update --touch > /dev/null

cd $OBJ_DIR/src || exit 1
$SRC_DIR/configure --prefix=$INSTALL_DIR --target=$TARGET || exit 1
make all || exit 1
make install || exit 1

DEJAGNU=/home/s1/cygnus/dejagnu/site.exp
export DEJAGNU
cd $OBJ_DIR/test || exit 1
$SRC_XC/egcs/configure --target=$TARGET \
   --prefix=$INSTALL_DIR --enable-checking=misc,gc,tree || exit 1
make || exit 1
make -k check-gcc check-target-libio check-target-libstdc++

exit 0

============================================================

===File ~/lib/site.exp======================================
# Needed for isnative.
load_lib "framework.exp"

# Make sure we look in the right place for the board description files.
if ![info exists boards_dir] {
    set boards_dir {}
}
lappend boards_dir "/home/geoffk/lib/dejagnu"

#
# If we're testing GCC, G++ or GDB, then we want to run on all the
# available targets. Otherwise, just test the first one.
#
if ![info exists tool] {
    set run_multiple_targets 0;
} elseif { $tool == "g++" || $tool == "gcc" || $tool == "gdb" || $tool == "libg++" || $tool == "libstdc++" || $tool == "libio" || $tool == "binutils" } {
    set run_multiple_targets 1;
} else {
    set run_multiple_targets 0;
}

verbose "Global Config File: target_triplet is $target_triplet" 2
global target_list
case "$target_triplet" in {
    { "native" } { set target_list "unix" }
    { "powerpc-*-eabi" } { set target_list { powerpc-sim } }
    { "powerpc-*-eabisim" } { set target_list { powerpc-sim } }
}

#
# If the tool under test won't really benefit from running on multiple
# targets, then don't do so.
#
if { ! $run_multiple_targets } {
    set target_list [list [lindex $target_list 0]];
}
============================================================

Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]