Re: Static Link problems w/ bash-2.05 on Solaris-2.5.1
From:
Sven Mascheck
Subject:
Re: Static Link problems w/ bash-2.05 on Solaris-2.5.1
Date:
28 Jun 2001 18:29:17 +0200
User-agent:
tin/1.4.5-20010409 ("One More Nightmare") (UNIX) (SunOS/5.8 (sun4u))
Auteria Wally Winzer Jr. <wally.winzer@champusa.com> wrote:
> gcc [...] -L./lib/sh -static [...]
^^^^^^^
> On previous versions I was able to do this w/ no problems.
This is true, in 2.04 "-static" appeared only with LD_STATIC in the
Makefile, but now it's also (hardcoded) with LDFLAGS. So the
appropriate make call, unsetting it, doesn't suffice anymore.
This also happens on later Solaris versions.
Yes, "-static" is always the wrong option on Solaris.
So it apparently might be necessary to adjust three things in the Makefile:
- always remove the "-static"
- add "-L/etc/lib"
- take care, that "-Wl,-Bstatic" comes before any "-l<library>" option.
Wether the last two are actually necessary, seems to depend on
Solaris/compiler/linker combination. But they never harm, when
compiling a static executable.
Sven