From 5f2e84015da7a664bba0af7727349c9c3f6902ba Mon Sep 17 00:00:00 2001 From: Ed Maste Date: Mon, 1 May 2023 16:33:47 -0400 Subject: [PATCH] bsd.lib.mk: decouple lib*_pic.a from TOOLCHAIN build knob A user may use a tool chain from a package or just use an existing tool chain from a previous installation. There is no reason for this to disable the installation of lib${LIB}_pic.a. This also means we don't need to force MK_TOOLCHAIN=yes in lib/libc. This reverts part of commit c0f5aeb0329d71e6b02379133c0c9c0145c9afea. Reviewed by: jrtc27 Sponsored by: The FreeBSD Foundation Differential Revision: https://reviews.freebsd.org/D39917 --- lib/libc/Makefile | 3 --- share/mk/bsd.lib.mk | 4 ++-- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/lib/libc/Makefile b/lib/libc/Makefile index e2a8f1473bf3..2b06bc1b3c5a 100644 --- a/lib/libc/Makefile +++ b/lib/libc/Makefile @@ -6,9 +6,6 @@ SHLIBDIR?= /lib .include -# Force building of libc_pic.a -MK_TOOLCHAIN= yes - LIBC_SRCTOP?= ${.CURDIR} # Pick the current architecture directory for libc. In general, this is diff --git a/share/mk/bsd.lib.mk b/share/mk/bsd.lib.mk index 1d4a97134d41..8e5035f6db41 100644 --- a/share/mk/bsd.lib.mk +++ b/share/mk/bsd.lib.mk @@ -378,7 +378,7 @@ ${SHLIB_NAME}.debug: ${SHLIB_NAME_FULL} .endif .endif #defined(SHLIB_NAME) -.if defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) && ${MK_TOOLCHAIN} != "no" +.if defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) _LIBS+= lib${LIB_PRIVATE}${LIB}_pic.a lib${LIB_PRIVATE}${LIB}_pic.a: ${SOBJS} @@ -540,7 +540,7 @@ _libinstall: .endif # SHLIB_LDSCRIPT .endif # SHLIB_LINK .endif # SHIB_NAME -.if defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) && ${MK_TOOLCHAIN} != "no" +.if defined(INSTALL_PIC_ARCHIVE) && defined(LIB) && !empty(LIB) ${INSTALL} ${TAG_ARGS:D${TAG_ARGS},dev} -o ${LIBOWN} -g ${LIBGRP} -m ${LIBMODE} \ ${_INSTALLFLAGS} lib${LIB}_pic.a ${DESTDIR}${_LIBDIR}/ .endif