1
0
mirror of https://github.com/openbsd/src.git synced 2026-06-18 07:13:36 +02:00

Plug ubsan_minimal into gnu/lib/libclang_rt build

ok jca@
This commit is contained in:
gnezdo
2022-02-16 03:49:40 +00:00
parent 5e1c9963cb
commit eedbc2b4fe
2 changed files with 37 additions and 1 deletions
+2 -1
View File
@@ -1,7 +1,8 @@
# $OpenBSD: Makefile,v 1.1 2021/09/28 08:35:06 fcambus Exp $
# $OpenBSD: Makefile,v 1.2 2022/02/16 03:49:40 gnezdo Exp $
.include <bsd.own.mk>
SUBDIR+=profile
SUBDIR+=ubsan_minimal
.include <bsd.subdir.mk>
@@ -0,0 +1,35 @@
# $OpenBSD: Makefile,v 1.1 2022/02/16 03:49:40 gnezdo Exp $
.include <bsd.own.mk>
LLVM_V= 13.0.0
LIBDIR= /usr/lib/clang/${LLVM_V}/lib
.if ${COMPILER_VERSION:L} != "clang"
CC= clang
CXX= clang++
.endif
.if ${BUILD_CLANG:L} == "yes"
LIB= clang_rt.ubsan_minimal
NOPIC=
NOPROFILE=
CFLAGS+= -fPIC
CPPFLAGS+= -I${BSDSRCDIR}/gnu/llvm/compiler-rt/lib
.PATH: ${.CURDIR}/../../../llvm/compiler-rt/lib/ubsan_minimal
SRCS+= ubsan_minimal_handlers.cpp
beforeinstall:
${INSTALL} -d -o ${BINOWN} -g ${BINGRP} -m ${DIRMODE} \
${DESTDIR}${LIBDIR}
.include <bsd.lib.mk>
.else
NOPROG=
.include <bsd.prog.mk>
.endif