diff options
author | NetBSD project <NetBSD project> | 2015-07-30 09:50:51 +0000 |
---|---|---|
committer | lersek <lersek@Edk2> | 2015-07-30 09:50:51 +0000 |
commit | 3352b62bebfd1e5c2e9961f481df968ab317d78d (patch) | |
tree | 12bfd6162cefbb63fa6e26c9fc9b7c9526838d9d /StdLib/LibC/Softfloat/Makefile.inc | |
parent | b393333538ee3a6b16a3a1d25ab2372942c3aac7 (diff) | |
download | edk2-3352b62bebfd1e5c2e9961f481df968ab317d78d.tar.gz edk2-3352b62bebfd1e5c2e9961f481df968ab317d78d.tar.bz2 edk2-3352b62bebfd1e5c2e9961f481df968ab317d78d.zip |
StdLib/LibC: Add software floating point library from NetBSD
Floating point processing is not supported on ARM for UEFI. In order to
support UEFI applications in AppPkg we use this library to provide the
required functionality.
Changes as compared to the NetBSD version:
- Formatting changes (tabs to spaces, DOS line endings etc).
- Disable exceptions as described in the float_raise() function.
- Disable definition of 'Symbolic Boolean literals' in milieu.h.
Source originally from: NetBSD project
- Source: http://cvsweb.netbsd.org/bsdweb.cgi/?only_with_tag=MAIN
- Licensing and Copyright: http://www.netbsd.org/about/redistribution.html
Contributed-under: TianoCore Contribution Agreement 1.0
Signed-off-by: Harry Liebel <Harry.Liebel@arm.com>
Reviewed-by: Olivier Martin <Olivier.Martin@arm.com>
Reviewed-by: Daryl McDaniel <edk2-lists@mc2research.org>
git-svn-id: https://svn.code.sf.net/p/edk2/code/trunk/edk2@18116 6f19259b-4bc3-4df7-8a09-765794883524
Diffstat (limited to 'StdLib/LibC/Softfloat/Makefile.inc')
-rw-r--r-- | StdLib/LibC/Softfloat/Makefile.inc | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/StdLib/LibC/Softfloat/Makefile.inc b/StdLib/LibC/Softfloat/Makefile.inc new file mode 100644 index 0000000000..df7a95aaa9 --- /dev/null +++ b/StdLib/LibC/Softfloat/Makefile.inc @@ -0,0 +1,42 @@ +# $NetBSD: Makefile.inc,v 1.17 2014/01/30 19:11:54 matt Exp $
+
+SOFTFLOAT_BITS?=64
+.PATH: ${ARCHDIR}/softfloat \
+ ${.CURDIR}/softfloat/bits${SOFTFLOAT_BITS} ${.CURDIR}/softfloat
+
+CPPFLAGS+= -I${ARCHDIR}/softfloat -I${.CURDIR}/softfloat
+CPPFLAGS+= -DSOFTFLOAT_FOR_GCC
+
+SRCS.softfloat= softfloat.c
+
+SRCS.softfloat+=fpgetround.c fpsetround.c fpgetmask.c fpsetmask.c \
+ fpgetsticky.c fpsetsticky.c
+
+.if !empty(LIBC_MACHINE_ARCH:Mearm*)
+SRCS.softfloat+=__aeabi_dcmpeq.c __aeabi_fcmpeq.c
+SRCS.softfloat+=__aeabi_dcmpge.c __aeabi_fcmpge.c
+SRCS.softfloat+=__aeabi_dcmpgt.c __aeabi_fcmpgt.c
+SRCS.softfloat+=__aeabi_dcmple.c __aeabi_fcmple.c
+SRCS.softfloat+=__aeabi_dcmplt.c __aeabi_fcmplt.c
+SRCS.softfloat+=__aeabi_dcmpun.c __aeabi_fcmpun.c
+.else
+SRCS.softfloat+=eqsf2.c nesf2.c gtsf2.c gesf2.c ltsf2.c lesf2.c negsf2.c \
+ eqdf2.c nedf2.c gtdf2.c gedf2.c ltdf2.c ledf2.c negdf2.c \
+ eqtf2.c netf2.c gttf2.c getf2.c lttf2.c letf2.c negtf2.c \
+ nexf2.c gtxf2.c gexf2.c negxf2.c \
+ unordsf2.c unorddf2.c unordtf2.c
+.endif
+
+SRCS+= ${SRCS.softfloat}
+
+# XXX
+.if defined(HAVE_GCC) && ${HAVE_GCC} >= 45
+.if (${MACHINE_CPU} == "arm")
+# See doc/HACKS for more information.
+COPTS.softfloat.c+= -Wno-enum-compare
+COPTS.softfloat.c+= ${${ACTIVE_CXX} == "gcc":? -fno-tree-vrp :}
+.elif (${MACHINE_CPU} == "mips" || \
+ ${MACHINE_CPU} == "sh3")
+COPTS.softfloat.c+= -Wno-enum-compare
+.endif
+.endif
|