From owner-dev-commits-src-main@freebsd.org Mon Apr 12 11:39:53 2021 Return-Path: Delivered-To: dev-commits-src-main@mailman.nyi.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2610:1c1:1:606c::19:1]) by mailman.nyi.freebsd.org (Postfix) with ESMTP id 9F2625CC23B; Mon, 12 Apr 2021 11:39:53 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from smtp.freebsd.org (smtp.freebsd.org [96.47.72.83]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256 client-signature RSA-PSS (4096 bits) client-digest SHA256) (Client CN "smtp.freebsd.org", Issuer "R3" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id 4FJmxP3P8Jz3sTv; Mon, 12 Apr 2021 11:39:53 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: from venus.codepro.be (venus.codepro.be [5.9.86.228]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mx1.codepro.be", Issuer "R3" (verified OK)) (Authenticated sender: kp) by smtp.freebsd.org (Postfix) with ESMTPSA id 5206F20493; Mon, 12 Apr 2021 11:39:53 +0000 (UTC) (envelope-from kp@FreeBSD.org) Received: by venus.codepro.be (Postfix, authenticated sender kp) id 8A3992636C; Mon, 12 Apr 2021 13:39:51 +0200 (CEST) From: "Kristof Provost" To: "Shawn Webb" Cc: src-committers@FreeBSD.org, dev-commits-src-all@FreeBSD.org, dev-commits-src-main@FreeBSD.org Subject: Re: git: 0dd13c77432a - main - libnv: Build PIC Date: Mon, 12 Apr 2021 13:39:50 +0200 X-Mailer: MailMate (1.13.2r5673) Message-ID: <98C59789-AF1F-4B88-B814-F0BD359A06BD@FreeBSD.org> In-Reply-To: <20210410152754.4isx26qyvz6k3qbo@mutt-hbsd> References: <202104100916.13A9GMOp069019@gitrepo.freebsd.org> <20210410152754.4isx26qyvz6k3qbo@mutt-hbsd> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8"; format=flowed Content-Transfer-Encoding: quoted-printable X-BeenThere: dev-commits-src-main@freebsd.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: Commit messages for the main branch of the src repository List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Mon, 12 Apr 2021 11:39:53 -0000 On 10 Apr 2021, at 17:27, Shawn Webb wrote: > On Sat, Apr 10, 2021 at 09:16:22AM +0000, Kristof Provost wrote: >> The branch main has been updated by kp: >> >> URL: = >> https://cgit.FreeBSD.org/src/commit/?id=3D0dd13c77432ade1ae94c9661cbad= 5537e3e6ab1d >> >> commit 0dd13c77432ade1ae94c9661cbad5537e3e6ab1d >> Author: Kristof Provost >> AuthorDate: 2021-04-02 15:06:02 +0000 >> Commit: Kristof Provost >> CommitDate: 2021-04-10 09:16:01 +0000 >> >> libnv: Build PIC >> >> Build libnv as position independent code so we can use it from = >> shared >> libraries. >> >> MFC after: 4 weeks >> Sponsored by: Rubicon Communications, LLC ("Netgate") >> Differential Revision: https://reviews.freebsd.org/D29561 >> --- >> lib/libnv/Makefile | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/lib/libnv/Makefile b/lib/libnv/Makefile >> index b13758931c4e..854cd2c7f3f3 100644 >> --- a/lib/libnv/Makefile >> +++ b/lib/libnv/Makefile >> @@ -10,6 +10,7 @@ SHLIB_MAJOR=3D 0 >> >> .PATH: ${SRCTOP}/sys/contrib/libnv ${SRCTOP}/sys/sys >> CFLAGS+=3D-I${.CURDIR} >> +CFLAGS+=3D-fPIC > > Wouldn't the better fix be renaming LIB to SHLIB like every other PIC > lib? > Ed pointed me at INSTALL_PIC_ARCHIVE. I=E2=80=99m also pondering just mak= ing = libpfctl a .so, which should also fix the issue this addresses. The complication is that libpfctl is currently a .a, and can be used in = a shared library itself (for bsnmp), so it has to be - and use - PIC. Best regards, Kristof