is pkgng=no valid?

Ben Morrow ben at morrow.me.uk
Fri Nov 21 14:03:59 UTC 2014


Quoth Warner Losh <imp at bsdimp.com>:
> On Nov 20, 2014, at 8:41 PM, Ben Morrow <ben at morrow.me.uk> wrote:
> > Quoth sbruno at freebsd.org:
> >> 
> >> I'm currently setting WITH_DEBUG=y in make.conf for use with poudriere +
> >> qemu-user.  Maybe this is easier?
> > 
> > It's easier, but you end up with unstripped and unoptimised binaries,
> > which seems like a Bad Plan to me on a machine as small as the ERL. Not
> > stripping static libraries doesn't make any difference to any code that
> > will actually run, since any binaries they are linked from will be
> > stripped again before being installed.
> 
> STRIP= might be an option (STRIP=/bin/true isn't right since it is flags
> to use).
> 
> But I wonder why we're even doing strip on a .a anyway. That part doesn't
> make sense to me at all. Usually you just do that on shared libraries or
> binaries.

No, I agree. I suppose it saves a little disk space?

> You might also consider STRIPCMD=/tmp/strip-me which looks like:
> 
> #!/bin/sh
> 
> case $1
> *.a) /bin/true
> *) strip $*
> esac

I started there; strip's command-line parsing is more complicated than I
cared to reproduce in shell.

> Or replacing the real strip with the above and changing "strip" to
> strep.real which is
> the real strip binary.
> 
> I'm not 100% sure that install actually honors this or not, but it would
> be one way. Looking
> at bsd.lib.mk, though, shows we only call install with ${STRIP} for
> shared libraries.

libtool strips static libs if it thinks it's using GNU strip, and it
passes the necessary arguments to only strip debug symbols and not those
needed for further linking.

Ben



More information about the freebsd-mips mailing list