Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 25 May 2005 08:39:06 +0000
From:      "Valerio Daelli" <vdaelli@hotmail.com>
To:        freebsd-questions@freebsd.org
Subject:   Statically linked bash
Message-ID:  <BAY103-F23CDDFADEF19C319461BC6B00E0@phx.gbl>
In-Reply-To: <20050524114047.P47072@mail.goinet.com>

next in thread | previous in thread | raw e-mail | index | archive | help
Hello
we are trying to compile a statically linked bash from ports.
I edited the Makefile in /usr/ports/shells/bash with '--enable-static-link' 
in CONFIGURE_ARGS.
But it didn't work (it compiled a dynamically linked one).
So I entered in work/bash-3.0 and configured by and with

./configure ...DEFAULT_ARGS...  --enable-static-link

But it didn't work.
So I edited every Makefile in these directories, to include in every gcc 
argument -static.
But It didn't work.
That's the last compile operation (notice the -static)

gcc -L./builtins -L./lib/readline -L./lib/readline -L./lib/glob  
-L./lib/tilde  -L./lib/sh -static -static -rdynamic  -g -O2 -o bash shell.o 
eval.o y.tab.o general.o make_cmd.o print_cmd.o   dispose_cmd.o 
execute_cmd.o variables.o copy_cmd.o error.o  expr.o flags.o jobs.o subst.o 
hashcmd.o hashlib.o mailcheck.o  trap.o input.o unwind_prot.o pathexp.o 
sig.o test.o version.o  alias.o array.o arrayfunc.o braces.o bracecomp.o 
bashhist.o  bashline.o  list.o stringlib.o locale.o findcmd.o redir.o  
pcomplete.o pcomplib.o syntax.o xmalloc.o -lbuiltins -lsh -lreadline 
-lhistory -ltermcap -lglob  -ltilde  /usr/local/lib/libintl.so 
/usr/local/lib/libiconv.so

But I keep getting a
#file bash
bash: ELF 32-bit LSB executable, Intel 80386, version 1 (FreeBSD), for 
FreeBSD 5.4, dynamically linked (uses shared libs), not stripped

Thanks a milion

Valerio Daelli





Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?BAY103-F23CDDFADEF19C319461BC6B00E0>