asld.sh 573 B

123456789101112131415
  1. #!/bin/sh
  2. DoExitAsm ()
  3. { echo "An error occurred while assembling $1"; exit 1; }
  4. DoExitLink ()
  5. { echo "An error occurred while linking $1"; exit 1; }
  6. echo Assembling $1
  7. /usr/local/bin/sparc-linux/as -o "$1.o" "$1.s"
  8. if [ $? != 0 ]; then DoExitAsm system; fi
  9. echo Assembling system
  10. /usr/local/bin/sparc-linux/as -o system.o system.s
  11. /usr/local/bin/sparc-linux/as -o prt0.o ../../rtl/linux/sparc/prt0.as
  12. if [ $? != 0 ]; then DoExitAsm sparctest; fi
  13. echo Linking sparctest
  14. /usr/local/bin/sparc-linux/ld -s -L. -o "$1" link.res
  15. if [ $? != 0 ]; then DoExitLink sparctest; fi