From owner-freebsd-questions@FreeBSD.ORG Wed May 25 10:18:20 2005 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 1528216A41C for ; Wed, 25 May 2005 10:18:20 +0000 (GMT) (envelope-from bkoenig@cs.tu-berlin.de) Received: from mail.efacilitas.de (efacilitas.de [213.133.110.227]) by mx1.FreeBSD.org (Postfix) with ESMTP id 572C843D1F for ; Wed, 25 May 2005 10:18:19 +0000 (GMT) (envelope-from bkoenig@cs.tu-berlin.de) Received: from eurystheus.local (port-212-202-169-54.dynamic.qsc.de [212.202.169.54]) by mail.efacilitas.de (Postfix) with ESMTP id C0DAC123962; Wed, 25 May 2005 12:16:54 +0200 (CEST) Received: from localhost (eurystheus.local [192.168.1.67]) by eurystheus.local (Postfix) with ESMTP id 35B2512B1B6; Wed, 25 May 2005 12:17:27 +0200 (CEST) Received: from eurystheus.local ([192.168.1.67]) by localhost (eurystheus.locaL [192.168.1.67]) (amavisd-new, port 10024) with ESMTP id 28957-01; Wed, 25 May 2005 12:17:21 +0200 (CEST) Received: from [192.168.1.67] (eurystheus.local [192.168.1.67]) by eurystheus.local (Postfix) with ESMTP id C53D612B09B; Wed, 25 May 2005 12:17:21 +0200 (CEST) Message-ID: <429450B1.4010308@cs.tu-berlin.de> Date: Wed, 25 May 2005 12:17:21 +0200 From: Bjoern Koenig User-Agent: Mozilla/5.0 (X11; U; FreeBSD i386; en-US; rv:1.7.8) Gecko/20050517 X-Accept-Language: en-us, en MIME-Version: 1.0 To: Valerio Daelli References: In-Reply-To: Content-Type: multipart/mixed; boundary="------------050709040302040500050501" X-Virus-Scanned: amavisd-new at example.com Cc: freebsd-questions@freebsd.org Subject: Re: Statically linked bash X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 25 May 2005 10:18:20 -0000 This is a multi-part message in MIME format. --------------050709040302040500050501 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 8bit Hello, copy the attached patch to /usr/ports/shells/bash and apply it with patch -i Makefile-static.patch It adds some knobs in the style of the port 'shells/bash2'. Build the shell with make -DWANT_STATIC_BASH -DWITHOUT_NLS install clean The dependence to libintl and libiconv is the reason why your binary is still dynamically linked. WITHOUT_NLS solves it. Regards Björn --------------050709040302040500050501 Content-Type: text/x-patch; name="Makefile-static.patch" Content-Transfer-Encoding: 7bit Content-Disposition: inline; filename="Makefile-static.patch" --- Makefile.orig Wed May 25 11:51:33 2005 +++ Makefile Wed May 25 11:54:25 2005 @@ -56,6 +56,12 @@ --disable-rpath \ --enable-disabled-builtins +.if defined(WANT_STATIC_BASH) || defined(NO_DYNAMICROOT) || (defined(NOSHARED) && ( ${NOSHARED} != "no" && ${NOSHARED} != "NO" )) +CONFIGURE_ARGS+= --enable-static-link +.else +CONFIGURE_ARGS+= --enable-static-link=no +.endif + .if defined(WITHOUT_HELP) CONFIGURE_ARGS+= --disable-help-builtin PLIST_SUB+= HELP="@comment " --------------050709040302040500050501--