2022-05-13 16:07:23 +00:00
|
|
|
# This file is generated from configure.ac by Autoconf. DO NOT EDIT!
|
|
|
|
# Local preconfigure fragment for sysdeps/csky
|
|
|
|
|
2018-12-21 01:48:04 +00:00
|
|
|
case "$machine" in
|
|
|
|
csky*)
|
|
|
|
abi=`$CC $CFLAGS $CPPFLAGS -E -dM -xc /dev/null |
|
|
|
|
sed -n 's/^#define __CSKYABI__ \(.*\)/\1/p'`
|
2023-01-25 09:47:33 +00:00
|
|
|
soft_float=`$CC $CFLAGS $CPPFLAGS -E -dM -xc /dev/null |
|
|
|
|
sed -n 's/^#define __CSKY_SOFT_FLOAT__ \(.*\)/\1/p'`
|
2020-10-20 15:00:59 +00:00
|
|
|
hard_float_abi=`$CC $CFLAGS $CPPFLAGS -E -dM -xc /dev/null |
|
|
|
|
sed -n 's/^#define __CSKY_HARD_FLOAT_ABI__ \(.*\)/\1/p'`
|
2018-12-21 01:48:04 +00:00
|
|
|
|
|
|
|
case "$abi" in
|
|
|
|
1)
|
2022-05-13 16:07:23 +00:00
|
|
|
as_fn_error 1 "glibc does not support abiv1 yet" "$LINENO" 5
|
|
|
|
;;
|
2018-12-21 01:48:04 +00:00
|
|
|
2)
|
2022-05-13 16:07:23 +00:00
|
|
|
machine=abiv2
|
|
|
|
;;
|
2018-12-21 01:48:04 +00:00
|
|
|
*)
|
2022-05-13 16:07:23 +00:00
|
|
|
as_fn_error 1 "Unknown abi" "$LINENO" 5
|
|
|
|
;;
|
2018-12-21 01:48:04 +00:00
|
|
|
esac
|
|
|
|
|
2023-01-25 09:47:33 +00:00
|
|
|
# This check is for compatibility with GCC versions earlier than 11.
|
|
|
|
# The older versions of C-SKY GCC do not support the '-mfloat-abi=softfp' option
|
|
|
|
# and never define the '__CSKY_HARD_FLOAT_ABI__'.
|
|
|
|
# Therefore, if a check for '-mfloat-abi=softfp' is added as the expression
|
|
|
|
# 'defined(__CSKY_HARD_FLOAT__) && !defined(__CSKY_HARD_FLOAT_ABI__)'
|
|
|
|
# which is correct for newer versions of GCC will not work for those older versions.
|
|
|
|
# Since no expression compatible with all versions of GCC exists,
|
|
|
|
# a check for the '-mfloat-abi=softfp' option is added.
|
|
|
|
if { ac_try='${CC-cc} -S -mfloat-abi=softfp /dev/null 1>&5'
|
|
|
|
{ { eval echo "\"\$as_me\":${as_lineno-$LINENO}: \"$ac_try\""; } >&5
|
|
|
|
(eval $ac_try) 2>&5
|
|
|
|
ac_status=$?
|
2023-06-29 18:34:16 +00:00
|
|
|
printf "%s\n" "$as_me:${as_lineno-$LINENO}: \$? = $ac_status" >&5
|
2023-01-25 09:47:33 +00:00
|
|
|
test $ac_status = 0; }; }; then
|
|
|
|
soft_float_abi_support=1
|
|
|
|
else
|
|
|
|
soft_float_abi_support=0
|
|
|
|
fi
|
|
|
|
|
|
|
|
if test -n "$soft_float"; then
|
|
|
|
with_fp_cond=0
|
|
|
|
with_hard_float_abi=0
|
|
|
|
else
|
|
|
|
with_fp_cond=1
|
|
|
|
if test -n "$soft_float_abi_support"; then
|
2020-10-20 15:00:59 +00:00
|
|
|
if test -n "$hard_float_abi"; then
|
2023-01-25 09:47:33 +00:00
|
|
|
with_hard_float_abi=1
|
2020-10-20 15:00:59 +00:00
|
|
|
else
|
2023-01-25 09:47:33 +00:00
|
|
|
with_hard_float_abi=0
|
2020-10-20 15:00:59 +00:00
|
|
|
fi
|
2023-01-25 09:47:33 +00:00
|
|
|
else
|
|
|
|
with_hard_float_abi=1
|
2020-10-20 15:00:59 +00:00
|
|
|
fi
|
|
|
|
fi
|
2018-12-21 01:48:04 +00:00
|
|
|
|
|
|
|
base_machine=csky
|
|
|
|
machine=csky/$machine
|
|
|
|
|
2023-06-29 18:34:16 +00:00
|
|
|
printf "%s\n" "#define CSKYABI $abi" >>confdefs.h
|
2022-05-13 16:07:23 +00:00
|
|
|
|
2023-06-29 18:34:16 +00:00
|
|
|
printf "%s\n" "#define CSKY_HARD_FLOAT $with_fp_cond" >>confdefs.h
|
2023-01-25 09:47:33 +00:00
|
|
|
|
2023-06-29 18:34:16 +00:00
|
|
|
printf "%s\n" "#define CSKY_HARD_FLOAT_ABI $with_hard_float_abi" >>confdefs.h
|
2022-05-13 16:07:23 +00:00
|
|
|
|
2018-12-21 01:48:04 +00:00
|
|
|
;;
|
|
|
|
esac
|
2023-06-29 18:34:16 +00:00
|
|
|
|