freebsd-dev/lib/libc/arm/aeabi/Makefile.inc
Ian Lepore 677a88cec2 Add dl_unwind_find_exidx() for ARM EABI, required for C++ exception
handling.  For statically linked apps this uses the __exidx_start/end
symbols set up by the linker.  For dynamically linked apps it finds the
shared object that contains the given address and returns the location and
size of the exidx section in that shared object.

The dl_unwind_find_exidx() name is used by other BSD projects and Android,
and is mentioned in clang 3.5 comments as "the BSD interface" for finding
exidx data.  GCC (in libgcc_s) expects the exact same API and functionality
to be provided by a function named __gnu_Unwind_Find_exidx(), so we provide
that with an alias ("strong reference").

Reviewed by:	kib@
MFC after:	1 week
2014-07-19 22:13:27 +00:00

38 lines
1.0 KiB
Makefile

# $FreeBSD$
.PATH: ${LIBC_SRCTOP}/arm/aeabi
SRCS+= aeabi_atexit.c \
aeabi_unwind_cpp.c \
aeabi_unwind_exidx.c
.if ${MACHINE_ARCH} != "armv6hf"
SRCS+= aeabi_double.c \
aeabi_float.c
.endif
.if ${MACHINE_ARCH:Marmv6*}
SRCS+= aeabi_vfp_double.S \
aeabi_vfp_float.S
.endif
# Add the aeabi_mem* functions. While they live in compiler-rt they call into
# libc. This causes issues when other parts of libc call these functions.
# We work around this by including these functions in libc but mark them as
# hidden so users of libc will not pick up these versions.
.PATH: ${LIBC_SRCTOP}/../../contrib/compiler-rt/lib/arm
SRCS+= aeabi_memcmp.S \
aeabi_memcpy.S \
aeabi_memmove.S \
aeabi_memset.S
# Mark the functions as hidden so they are not available outside of libc.
CFLAGS.aeabi_memcmp.S= -DVISIBILITY_HIDDEN
CFLAGS.aeabi_memcpy.S= -DVISIBILITY_HIDDEN
CFLAGS.aeabi_memmove.S= -DVISIBILITY_HIDDEN
CFLAGS.aeabi_memset.S= -DVISIBILITY_HIDDEN
CFLAGS+= ${CFLAGS.${.IMPSRC:T}}
SYM_MAPS+=${LIBC_SRCTOP}/arm/aeabi/Symbol.map