git: 5e6a2d6eb220 - main - Reapply: move libc++ from /usr/lib to /lib

From: Dimitry Andric <dim_at_FreeBSD.org>
Date: Thu, 30 Dec 2021 16:10:12 UTC
The branch main has been updated by dim:

URL: https://cgit.FreeBSD.org/src/commit/?id=5e6a2d6eb220d780c9128c81b58f133114061415

commit 5e6a2d6eb220d780c9128c81b58f133114061415
Author:     Dimitry Andric <dim@FreeBSD.org>
AuthorDate: 2021-12-30 16:03:10 +0000
Commit:     Dimitry Andric <dim@FreeBSD.org>
CommitDate: 2021-12-30 16:08:54 +0000

    Reapply: move libc++ from /usr/lib to /lib
    
    As with other runtime components like libc or libcxxrt.
    
    If desired we can stop linking devd statically after this change (to
    achive approximately no net change in required root filesystem size).
    
    We must set SHLIBDIR with ?= before including <src.opts.mk>, otherwise
    that will have set SHBLIDIR to its default value of /usr/lib.
    
    Otherwise, "make delete-old-libs" would suggest to delete libc++.so.1
    from /usr/lib, while there was not yet a copy in /lib.
    
    Reviewed by:    imp
    Sponsored by:   The FreeBSD Foundation
    Differential Revision:  https://reviews.freebsd.org/D33123
---
 ObsoleteFiles.inc   | 3 +++
 lib/libc++/Makefile | 2 ++
 2 files changed, 5 insertions(+)

diff --git a/ObsoleteFiles.inc b/ObsoleteFiles.inc
index 4e99c917e89a..6207ad302bba 100644
--- a/ObsoleteFiles.inc
+++ b/ObsoleteFiles.inc
@@ -40,6 +40,9 @@
 #   xargs -n1 | sort | uniq -d;
 # done
 
+# 20211229 libc++ moved to /lib
+OLD_LIBS+=usr/lib/libc++.so.1
+
 # 20211221 efi_set_variables_supported.3 should be efi_variables_supported.3
 OLD_FILES+=usr/share/man/man3/efi_set_variables_supported.3.gz
 
diff --git a/lib/libc++/Makefile b/lib/libc++/Makefile
index 2bc1bf40eccd..dda8bc1772c9 100644
--- a/lib/libc++/Makefile
+++ b/lib/libc++/Makefile
@@ -1,5 +1,7 @@
 # $FreeBSD$
 
+SHLIBDIR?=	/lib
+
 .include <src.opts.mk>
 
 PACKAGE=	clibs