Module Name: src
Committed By: kamil
Date: Sun Aug 25 06:06:48 UTC 2019
Modified Files:
src: Makefile
src/external/bsd/compiler_rt: Makefile
src/external/bsd/compiler_rt/lib/clang: Makefile
src/external/bsd/compiler_rt/lib/clang/lib: Makefile
Log Message:
Rework the LLVM compiler_rt build rules
Register external/bsd/compiler_rt as a _SUBDIR. This will allow to handle
properly includes specific for compiler_rt.
Centralize build_install target for external/bsd/compiler_rt.
With the above changes MKOBJDIR is now respected properly for me.
Do not install LLVM sanitizers into TOOLDIR for !HAVE_LLVM.
To generate a diff of this commit:
cvs rdiff -u -r1.328 -r1.329 src/Makefile
cvs rdiff -u -r1.1 -r1.2 src/external/bsd/compiler_rt/Makefile
cvs rdiff -u -r1.1 -r1.2 src/external/bsd/compiler_rt/lib/clang/Makefile
cvs rdiff -u -r1.2 -r1.3 src/external/bsd/compiler_rt/lib/clang/lib/Makefile
Please note that diffs are not public domain; they are subject to the
copyright notices on the relevant files.
Modified files:
Index: src/Makefile
diff -u src/Makefile:1.328 src/Makefile:1.329
--- src/Makefile:1.328 Fri Aug 23 06:38:27 2019
+++ src/Makefile Sun Aug 25 06:06:48 2019
@@ -1,4 +1,4 @@
-# $NetBSD: Makefile,v 1.328 2019/08/23 06:38:27 kamil Exp $
+# $NetBSD: Makefile,v 1.329 2019/08/25 06:06:48 kamil Exp $
#
# This is the top-level makefile for building NetBSD. For an outline of
@@ -136,7 +136,11 @@ _SRC_TOP_OBJ_=
# _SUBDIR is used to set SUBDIR, after removing directories that have
# BUILD_${dir}=no, or that have no ${dir}/Makefile.
#
-_SUBDIR= tools .WAIT lib include external crypto/external bin
+_SUBDIR= tools .WAIT lib
+.if ${MKLLVM} != "no"
+_SUBDIR+= external/bsd/compiler_rt
+.endif
+_SUBDIR+= include external crypto/external bin
_SUBDIR+= games libexec sbin usr.bin
_SUBDIR+= usr.sbin share sys etc tests compat
_SUBDIR+= .WAIT rescue .WAIT distrib regress
@@ -236,8 +240,7 @@ BUILDTARGETS+= includes
BUILDTARGETS+= do-lib
BUILDTARGETS+= do-compat-lib
.if ${MKLLVM} != "no"
-BUILDTARGETS+= do-sanitizer-includes
-BUILDTARGETS+= do-sanitizer-lib
+BUILDTARGETS+= do-sanitizer
.if ${MKSANITIZER:Uno} == "yes"
BUILDTARGETS+= do-sanitizer-tools
.endif
@@ -477,15 +480,11 @@ do-lib: .PHONY .MAKE
do-compat-lib: .PHONY .MAKE
${MAKEDIRTARGET} compat build_install BOOTSTRAP_SUBDIRS="../../../lib"
-do-sanitizer-includes: .PHONY .MAKE
- ${MAKEDIRTARGET} external/bsd/compiler_rt/lib/clang/include includes
- ${MAKEDIRTARGET} external/bsd/compiler_rt/lib/clang/share includes
-
-do-sanitizer-lib: .PHONY .MAKE
- ${MAKEDIRTARGET} external/bsd/compiler_rt/lib/clang/lib build_install
+do-sanitizer: .PHONY .MAKE
+ ${MAKEDIRTARGET} external/bsd/compiler_rt build_install
do-sanitizer-tools: .PHONY .MAKE
-.if !exists(${TOOLDIR}/lib/clang)
+.if !exists(${TOOLDIR}/lib/clang) && ${HAVE_LLVM:Uno} == "yes"
mkdir -p ${TOOLDIR}/lib/clang
cd ${DESTDIR}/usr/lib/clang && \
${TOOL_PAX} -rw . ${TOOLDIR}/lib/clang
Index: src/external/bsd/compiler_rt/Makefile
diff -u src/external/bsd/compiler_rt/Makefile:1.1 src/external/bsd/compiler_rt/Makefile:1.2
--- src/external/bsd/compiler_rt/Makefile:1.1 Thu Aug 8 14:00:27 2019
+++ src/external/bsd/compiler_rt/Makefile Sun Aug 25 06:06:48 2019
@@ -1,5 +1,8 @@
-# $NetBSD: Makefile,v 1.1 2019/08/08 14:00:27 kamil Exp $
+# $NetBSD: Makefile,v 1.2 2019/08/25 06:06:48 kamil Exp $
+
+.include <bsd.own.mk>
SUBDIR+= lib
+.include <bsd.buildinstall.mk>
.include <bsd.subdir.mk>
Index: src/external/bsd/compiler_rt/lib/clang/Makefile
diff -u src/external/bsd/compiler_rt/lib/clang/Makefile:1.1 src/external/bsd/compiler_rt/lib/clang/Makefile:1.2
--- src/external/bsd/compiler_rt/lib/clang/Makefile:1.1 Thu Aug 8 14:00:28 2019
+++ src/external/bsd/compiler_rt/lib/clang/Makefile Sun Aug 25 06:06:48 2019
@@ -1,11 +1,6 @@
-# $NetBSD: Makefile,v 1.1 2019/08/08 14:00:28 kamil Exp $
-
-.include <bsd.own.mk>
+# $NetBSD: Makefile,v 1.2 2019/08/25 06:06:48 kamil Exp $
SUBDIR+= include share
-
-.if ${MACHINE_ARCH} == "x86_64"
SUBDIR+= lib
-.endif
.include <bsd.subdir.mk>
Index: src/external/bsd/compiler_rt/lib/clang/lib/Makefile
diff -u src/external/bsd/compiler_rt/lib/clang/lib/Makefile:1.2 src/external/bsd/compiler_rt/lib/clang/lib/Makefile:1.3
--- src/external/bsd/compiler_rt/lib/clang/lib/Makefile:1.2 Fri Aug 23 06:38:27 2019
+++ src/external/bsd/compiler_rt/lib/clang/lib/Makefile Sun Aug 25 06:06:48 2019
@@ -1,6 +1,5 @@
-# $NetBSD: Makefile,v 1.2 2019/08/23 06:38:27 kamil Exp $
+# $NetBSD: Makefile,v 1.3 2019/08/25 06:06:48 kamil Exp $
SUBDIR+= netbsd
-.include <bsd.buildinstall.mk>
.include <bsd.subdir.mk>