freebsd-dev/lib/libcompiler_rt/Makefile
Conrad Meyer c8b5e3de39 Fix llvm-libunwind userspace build on ARM
GCC's libgcc exports a few ARM-specific symbols for ARM EABI, AEABI, or
EHABI or whatever it's called.  Export the same ones from LLVM-libunwind's
libgcc_s, on ARM.  As part of this, convert libgcc_s from a direct
Version.map to one constructed from component Symbol.map files.  This allows
the ARM-specific Symbol.map to be included only on ARM.

Fix ARM-only oddities in struct name/aliases in LLVM-libunwind to match
non-ARM definitions and ARM-specific expectations in libcxxrt /
libcompiler_rt.

No functional change intended for non-ARM architectures.

This commit does not actually flip the switch for ARM defaults from libgcc
to llvm-libunwind, but makes it possible (to compile, anyway).
2019-11-05 03:20:40 +00:00

29 lines
586 B
Makefile

# $FreeBSD$
.include <src.opts.mk>
PACKAGE= lib${LIB}
LIB= compiler_rt
NO_PIC=
WARNS?= 2
CFLAGS+= ${PICFLAG}
CFLAGS+= -fvisibility=hidden
CFLAGS+= -DVISIBILITY_HIDDEN
CFLAGS+= -I${SRCTOP}/contrib/libcxxrt
# gcc has incompatible internal declarations for __divtc3 and __multc3, but has
# no option to silence its warning, so make warnings non-fatal.
NO_WERROR.gcc=
.include "Makefile.inc"
.if ${MK_INSTALLLIB} != "no"
SYMLINKS+= libcompiler_rt.a ${LIBDIR}/libgcc.a
.endif
.if ${MK_PROFILE} != "no"
SYMLINKS+= libcompiler_rt_p.a ${LIBDIR}/libgcc_p.a
.endif
.include <bsd.lib.mk>