try this
--
HOSTTYPE=$(bin/package)
mkdir arch/$HOSTTYPE-space
bin/package make HOSTTYPE=$HOSTTYPE-space PACKAGE_OPTIONS=optimize-space
--
and then compare the size of
        arch/$HOSTTYPE-space/bin
vs
        arch/$HOSTTYPE/bin
(there's nothing magic about the name $HOSTTYPE-space other than its
 different from $HOSTTYPE, you could have done the original build
 with the default HOSTTYPE and PACKAGE_OPTIONS set)
if you are building the ast-open package all of the shell commands in
libcmd link to one a.out in $INSTALLROOT/bin

On Fri, 11 Feb 2011 20:01:36 -0600 Jon wrote:
> Attempting to build ksh93 for various ARM devices I own, most of which
> run Linux.
> One of which is my android phone, another is a network of IP-Video
> cameras to monitor the baby, and then a Drobo-FS file server (NAS)
> device.

> In some devices it would be preferable to have a monolithic,
> statically compiled binary.

> Solves some pesky issues inherent to the embedded computing scene.
> Namely applications are sometimes isolated (from the OS libraries),
> and it would be good to avoid using some wrapper program to setup the
> library path when invoking the shell, especially a shell.
> It's no problem though.... just set LD_LIBRARY_PATH and exec the real ksh93. 
> :-(

> Perhaps I'm a bit naive, or my memory is going wacky.
> I thought ksh used to be able to build as a monolithic binary?
> I could have sworn the old binary distribution was static, or perhaps
> that it was that way on Solaris 8, or something I used years ago.

> <shrug>

> Anyhow, that is the agenda here.
> There is absolutely no thought given to the speed of invocation, size,
> or how the built-ins behave. ;-)

> Thanks for looking into this!

> -Jon

> On Fri, Feb 11, 2011 at 11:44 AM, Glenn Fowler <[email protected]> wrote:
> >
> > sorry -- I fat fingered an empty post
> >
> > on some modern unix it may not be possible to eliminate all .so's for an 
> > a.out
> >
> > but what you are trying to accomplish on the arm?
> > is it an a.out space or time issue?
> >
> > we did some work on the arm a few years back and
> > with a combination of libshell.so (ksh shell library) and libcmd.so
> > we were able to gain on space and time
> >
> > On Fri, 11 Feb 2011 12:39:18 -0500 Glenn Fowler wrote:
> >> On Fri, 11 Feb 2011 10:42:14 -0600 Jon wrote:
> >> > Thanks,
> >> > That made it build without error.
> >
> >> > Here is the result:
> >
> >> > SHOPT_DYNAMIC == 1
> >
> >> > # ldd bin/ksh-dynamic
> >> >         libdl.so.2 => /lib/libdl.so.2 (0x40029000)
> >> >         libm.so.6 => /lib/libm.so.6 (0x40034000)
> >> >         libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x400e4000)
> >> >         libc.so.6 => /lib/libc.so.6 (0x400f8000)
> >> >         /lib/ld-linux.so.3 (0x40000000)
> >
> >> > AND
> >
> >> > SHOPT_DYNAMIC == 0
> >
> >> > # ldd bin/ksh
> >> >         libm.so.6 => /lib/libm.so.6 (0x40029000)
> >> >         libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x400d9000)
> >> >         libc.so.6 => /lib/libc.so.6 (0x400ed000)
> >> >         /lib/ld-linux.so.3 (0x40000000)
> >
> >> > That is an improvement! ;-)
> >
> >> > Will investigate further.
> >
> >> > Appreciate the help, Thanks.
> >
> >> > -Jon
> >
> >> > On Thu, Feb 10, 2011 at 11:09 PM, David Korn <[email protected]> 
> >> > wrote:
> >> > > cc: [email protected]
> >> > > Subject: Re: [ast-users] Problems with static ksh93 build
> >> > > --------
> >> > >
> >> > > It looks like we only built with SHOPT_FS_3D defined:
> >> > > Change
> >> > > ========================
> >> > > #if SHOPT_FS_3D
> >> > >        register Shell_t *shp = ((Shbltin_t*)extra)->shp;
> >> > > #else
> >> > >        NOT_USED(extra);
> >> > > #endif
> >> > > ========================
> >> > > to
> >> > > ========================
> >> > >        register Shell_t *shp = ((Shbltin_t*)extra)->shp;
> >> > > ========================
> >> > > and it should build.
> >> > >
> >> > >
> >> > >
> >> > > David Korn
> >> > > [email protected]
> >> > >
> >
> >> > --
> >
> >> > -Jon
> >
> >

> -- 

> -Jon

_______________________________________________
ast-users mailing list
[email protected]
https://mailman.research.att.com/mailman/listinfo/ast-users

Reply via email to