summaryrefslogtreecommitdiff
path: root/libc
diff options
context:
space:
mode:
authorKonrad Eisele <konrad@gaisler.com>2010-12-14 13:49:17 +0100
committerKhem Raj <raj.khem@gmail.com>2010-12-27 18:36:53 -0800
commite6164d4b527865f4c81544ad18bfd634117d595b (patch)
treec22b2b4645ccc172d60380d8f044eeb450bd0e14 /libc
parent2a416f277e43be8301f1fdcdca7515b1e2a4508c (diff)
sparc: check for log double support in gcc
To compile the quad float emulation library gcc needs __LONG_DOUBLE_128__ macro defined. Check first, if not supported then revert to the qp_ops.c stubs Signed-off-by: Konrad Eisele <konrad@gaisler.com> Signed-off-by: Khem Raj <raj.khem@gmail.com>
Diffstat (limited to 'libc')
-rw-r--r--libc/sysdeps/linux/sparc/Makefile.arch6
1 files changed, 6 insertions, 0 deletions
diff --git a/libc/sysdeps/linux/sparc/Makefile.arch b/libc/sysdeps/linux/sparc/Makefile.arch
index 91c6e85e4..d0cae9ff8 100644
--- a/libc/sysdeps/linux/sparc/Makefile.arch
+++ b/libc/sysdeps/linux/sparc/Makefile.arch
@@ -16,9 +16,15 @@ CSRC += sigaction.c
SSRC += fork.S vfork.S
endif
+# check weather __LONG_DOUBLE_128__ is defined (long double support)
+UCLIBC_SPARC_HAS_LONG_DOUBLE=$(shell if [ "x`$(CC) -E -dM -xc /dev/null 2>&1 | grep __LONG_DOUBLE_128__`" != "x" ]; then echo "y"; fi)
+ifeq ($(UCLIBC_SPARC_HAS_LONG_DOUBLE),y)
CSRC += $(foreach f, \
q_div.c q_fle.c q_mul.c q_qtoll.c q_stoq.c \
mp_clz_tab.c q_dtoq.c q_flt.c q_neg.c q_qtos.c q_sub.c \
q_add.c q_feq.c q_fne.c q_qtod.c q_qtou.c q_ulltoq.c \
q_cmp.c q_fge.c q_itoq.c q_qtoull.c q_util.c \
q_cmpe.c q_fgt.c q_lltoq.c q_qtoi.c q_sqrt.c q_utoq.c, soft-fp/$(f))
+else
+CSRC += qp_ops.c
+endif