diff options
author | Michael Meissner <gnu@the-meissners.org> | 1995-10-31 18:29:37 +0000 |
---|---|---|
committer | Michael Meissner <gnu@the-meissners.org> | 1995-10-31 18:29:37 +0000 |
commit | 5b4d72dd7362598e6f9c5483b990d0dee05fce1d (patch) | |
tree | ec3cb552f7ad6b1445d1f9619492c64a0a18e457 /sim/ppc/build-psim | |
parent | 5666490bee263c9357118553e40637449d186988 (diff) | |
download | gdb-5b4d72dd7362598e6f9c5483b990d0dee05fce1d.zip gdb-5b4d72dd7362598e6f9c5483b990d0dee05fce1d.tar.gz gdb-5b4d72dd7362598e6f9c5483b990d0dee05fce1d.tar.bz2 |
New changes from Andrew
Diffstat (limited to 'sim/ppc/build-psim')
-rwxr-xr-x | sim/ppc/build-psim | 155 |
1 files changed, 155 insertions, 0 deletions
diff --git a/sim/ppc/build-psim b/sim/ppc/build-psim new file mode 100755 index 0000000..ea7318a --- /dev/null +++ b/sim/ppc/build-psim @@ -0,0 +1,155 @@ +#!/bin/sh + +case "`uname -s`-`uname -r`" in + NetBSD* ) + cflags="-Wall -Wno-unused -Wmissing-prototypes -Werror" + ;; + SunOS-5* ) + cflags="-gstabs+" + ;; + SunOS-4* ) + cflags="-Werror" + ;; +esac + +for target in "$@" +do + + echo "" + echo "$target" + echo "" + + if [ $# -gt 1 ] + then + make clean + fi + + case $target in + *unsafe* ) + with_trace="-DWITH_TRACE=0" + with_assert="-DWITH_ASSERT=0" + unsafe_flags="-g0 -fomit-frame-pointer -fno-strength-reduce" + ;; + *safe* ) + with_trace= + with_assert= + unsafe_flags="-g0" + ;; + * ) + with_trace= + with_assert= + unsafe_flags= + ;; + esac + + case $target in + *little* ) + with_target_byte_order="-DWITH_TARGET_BYTE_ORDER=LITTLE_ENDIAN" + ;; + *big* ) + with_target_byte_order="-DWITH_TARGET_BYTE_ORDER=BIG_ENDIAN" + ;; + * ) + with_target_byte_order= + ;; + esac + + case $target in + *vea* ) + with_environment="-DWITH_ENVIRONMENT=VIRTUAL_ENVIRONMENT" + with_smp="-DWITH_SMP=0" + ;; + *oea* ) + with_environment="-DWITH_ENVIRONMENT=OPERATING_ENVIRONMENT" + with_smp="-DWITH_SMP=2" + ;; + * ) + with_environment= + with_smp= + ;; + esac + + case $target in + *complex* ) + igen_opcode_rules="IGEN_OPCODE_RULES=ppc-opcode-complex" + igen_flags="-e -r 1024" + opt_flags="-O2" + ;; + *simple* ) + igen_opcode_rules="IGEN_OPCODE_RULES=ppc-opcode-simple" + igen_flags="-e" + opt_flags="-O2" + ;; + * ) + igen_opcode_rules= + igen_flags= + opt_flags= + ;; + esac + + case $target in + *64* ) + with_target_word_bitsize="-DWITH_TARGET_WORD_BITSIZE=64" + igen_flags="$igen_flags -f 32" + ;; + *32* ) + with_target_word_bitsize="-DWITH_TARGET_WORD_BITSIZE=32" + igen_flags="$igen_flags -f 64" + ;; + * ) + with_target_word_bitsize= + igen_flags="$igen_flags -f 64" + ;; + esac + + case $target in + *inline* ) + default_inline="-DDEFAULT_INLINE=2" + ;; + * ) + default_inline= + ;; + esac + + case $target in + *nomon* ) + with_mon="-DWITH_MON=0" + ;; + * ) + with_mon= + ;; + esac + + case $target in + *bswap* ) + with_bswap="-DWITH_BSWAP=1" + ;; + * ) + with_bswap= + ;; + esac + + if ( set -x ; make \ + $igen_opcode_rules \ + IGEN_FLAGS="$igen_flags" \ + INLINE_CFLAGS=" \ + $cflags \ + $unsafe_flags \ + $opt_flags \ + $with_bswap \ + $with_target_byte_order \ + $with_environment \ + $with_smp \ + $default_inline \ + $with_target_word_bitsize \ + $with_trace \ + $with_assert \ + $with_mon \ + " ) + then + rm -f psim-${target}-failed + ( set -x ; cp psim psim-$target ) + else + ( set -x ; touch psim-${target}-failed ) + fi +done |