From 78847e1e592789dc85bddf4d2f1d9a8ce4614ff1 Mon Sep 17 00:00:00 2001 From: Doug Rabson Date: Mon, 11 Sep 2023 09:38:46 +0100 Subject: [PATCH] pkgbase: Move headers and libs out of runtime and utilities Headers from src/include were in the runtime-dev package but subdirectories of src/include ended up in utilities-dev by default. Neither package is a good choice - the headers in src/include are not useful without the libraries contained in clibs-dev. This moves the standard C headers to clibs-dev (C++ headers are already in this package). While working on this, I found that various clang libraries and headers were also bundled into utilities-dev by default so these are also moved to clang-dev. I also added a FreeBSD-build-essential meta package to make it simple to install all the toolchain parts. PR: 254173 Reviewed byb: manu MFC after: 1 week Differential Revision: https://reviews.freebsd.org/D41815 --- include/Makefile | 2 +- include/Makefile.inc | 2 ++ lib/clang/Makefile.inc | 1 + lib/csu/Makefile.inc | 1 + lib/libclang_rt/Makefile.inc | 1 + release/packages/generate-ucl.sh | 3 +++ 6 files changed, 9 insertions(+), 1 deletion(-) create mode 100644 include/Makefile.inc diff --git a/include/Makefile b/include/Makefile index bc1cfd96dfc9..736a47854534 100644 --- a/include/Makefile +++ b/include/Makefile @@ -4,7 +4,7 @@ .include -PACKAGE=runtime +PACKAGE=clibs CLEANFILES= osreldate.h version SUBDIR= arpa protocols rpcsvc rpc xlocale .if ${MACHINE_CPUARCH} == "amd64" diff --git a/include/Makefile.inc b/include/Makefile.inc new file mode 100644 index 000000000000..14d7bf96e6bc --- /dev/null +++ b/include/Makefile.inc @@ -0,0 +1,2 @@ +# Make sure all our subdirectory headers end up in clibs-dev +PACKAGE=clibs diff --git a/lib/clang/Makefile.inc b/lib/clang/Makefile.inc index 0a2ae8f6b802..2dfc966726b0 100644 --- a/lib/clang/Makefile.inc +++ b/lib/clang/Makefile.inc @@ -1,6 +1,7 @@ .include +PACKAGE= clang MK_PIE:= no # Explicit libXXX.a references .if ${COMPILER_TYPE} == "clang" diff --git a/lib/csu/Makefile.inc b/lib/csu/Makefile.inc index faf01b293b92..55aaf589f48f 100644 --- a/lib/csu/Makefile.inc +++ b/lib/csu/Makefile.inc @@ -1,3 +1,4 @@ +PACKAGE= clibs-dev NO_WMISSING_VARIABLE_DECLARATIONS= # Can't instrument these files since that breaks non-sanitized programs. diff --git a/lib/libclang_rt/Makefile.inc b/lib/libclang_rt/Makefile.inc index 4832815643ae..263d1e340f3d 100644 --- a/lib/libclang_rt/Makefile.inc +++ b/lib/libclang_rt/Makefile.inc @@ -1,6 +1,7 @@ .include +PACKAGE= clang CRTSRC= ${SRCTOP}/contrib/llvm-project/compiler-rt .include "compiler-rt-vars.mk" diff --git a/release/packages/generate-ucl.sh b/release/packages/generate-ucl.sh index de3fec3f0ca7..fa13e8e334d2 100755 --- a/release/packages/generate-ucl.sh +++ b/release/packages/generate-ucl.sh @@ -44,6 +44,9 @@ main() { certctl) pkgdeps="caroot openssl" ;; + clang) + pkgdeps="lld clang-dev libcompiler_rt-dev" + ;; # -dev packages that have no corresponding non-dev package # as a dependency.