From owner-freebsd-ports@FreeBSD.ORG Sat Oct 6 15:00:57 2007 Return-Path: Delivered-To: ports@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id 6775316A417 for ; Sat, 6 Oct 2007 15:00:57 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: from hannah.tgi.net (hannah.tgi.net [64.34.34.36]) by mx1.freebsd.org (Postfix) with ESMTP id 2A08C13C48A for ; Sat, 6 Oct 2007 15:00:57 +0000 (UTC) (envelope-from youshi10@u.washington.edu) Received: (qmail 11372 invoked from network); 6 Oct 2007 08:06:30 -0700 Received: from cs213-72.fsmodem.washington.edu (HELO ?127.0.0.1?) (140.142.173.73) by dogday.net with SMTP; 6 Oct 2007 08:06:30 -0700 Message-ID: <4707A30A.1090101@u.washington.edu> Date: Sat, 06 Oct 2007 08:00:26 -0700 From: Garrett Cooper User-Agent: Thunderbird 2.0.0.6 (Windows/20070728) MIME-Version: 1.0 To: Dmitry Marakasov References: <20071004190304.GA9491@hades.panopticon> In-Reply-To: <20071004190304.GA9491@hades.panopticon> Content-Type: text/plain; charset=KOI8-R; format=flowed Content-Transfer-Encoding: 7bit Cc: ports@freebsd.org Subject: Re: Idea: static builds X-BeenThere: freebsd-ports@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: Porting software to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 06 Oct 2007 15:00:57 -0000 Dmitry Marakasov wrote: > Hi! > > I just have an idea that may be useful: static port builds. This can > help produce packages without any depends, which may be useful > sometimes. > > Implementation seem pretty straightfoward to me: > - Introduce STATIC_BUILD variable that changes usual build behavior > - Process LIB_DEPENDS in a different way: check .a instead of .so.*, and > fail if .a is missing, and .so is present (i.e. needed static lib is not > available at all), don't add library ports to package depends > - Add -static to CFLAGS/CXXFLAGS > > Any comments? I will try to experiment with this for now. > > This will bloat binaries by a large degree. However, it's nice for some cases (such as bash), where static would allow bash to function in single user mode, unless /usr/local/bin wasn't mountable. -Garrett