preconfigure 969 B

12345678910111213141516171819202122232425262728293031
  1. case "$machine" in
  2. mips*)
  3. abiflag=`$CC $CFLAGS $CPPFLAGS -E -dM -xc /dev/null | sed -n 's/^#define _MIPS_SIM \(.*\)/\1/p'`
  4. mips16flag=`$CC $CFLAGS $CPPFLAGS -E -dM -xc /dev/null | sed -n 's/^#define __mips16 \(.*\)/\1/p'`
  5. base_machine=mips
  6. if test "$abiflag" = "_ABIO32" ; then
  7. if test "$mips16flag" = "1" ; then
  8. machine=mips/mips32/mips16
  9. else
  10. machine=mips/mips32
  11. fi
  12. elif test "$abiflag" = "_ABIN32" ; then
  13. machine=mips/mips64/n32
  14. elif test "$abiflag" = "_ABI64" ; then
  15. machine=mips/mips64/n64
  16. else
  17. as_fn_error $? "Unable to determine ABI." "$LINENO" 5
  18. fi
  19. # $config_machine is not really needed here but the slash after
  20. # $machine is needed by the case statement in
  21. # sysdeps/unix/sysv/linux/mips/configure.ac.
  22. machine=$machine/$config_machine
  23. if test "$abiflag" != "_ABIO32" -a "$mips16flag" = "1"; then
  24. as_fn_error $? "MIPS16 is only supported with the o32 ABI." "$LINENO" 5
  25. fi
  26. with_fp_cond="defined __mips_hard_float"
  27. ;;
  28. esac