is pkgng=no valid?

Warner Losh imp at bsdimp.com
Fri Nov 21 05:21:31 UTC 2014


On Nov 20, 2014, at 8:41 PM, Ben Morrow <ben at morrow.me.uk> wrote:

> Quoth sbruno at freebsd.org:
>> On Thu, 2014-11-20 at 18:33 -0500, Nathan Dorfman wrote:
>>> On Tue, Nov 18, 2014 at 9:03 PM, Nathan Dorfman <na at rtfm.net> wrote:
>>> 
>>>> D'oh, my memory seems to be failing me. What Ben is saying does sound
>>>> familiar now. I might have just worked around it by using something
>>>> like 'cd /usr/ports/*/pkgng && make STRIP=/bin/echo install'
>>>> 
>>> 
>>> OK, today, at least, that doesn't seem to work either. This does:
>>> 
>>>    sed -i.bak 's/^old_striplib=/#&/'
>>> $WRKDIRPREFIX/usr/ports/ports-mgmt/pkg/work/pkg-1.3.8/libtool
>>> 
>>> It's enough to build a bunch of ports, but of course any that make their
>>> own static libraries will still break. E.g. if you want to build tmux, you
>>> have to do the same thing to libevent2, which bundles its own libtool:
>>> 
>>>    sed -i.bak 's/^old_striplib=/#&/'
>>> $WRKDIRPREFIX/usr/ports/devel/libevent2/work/libevent-2.0.21-stable/libtool
>>> 
>>> Ben's strip patch is looking like the best solution for now.
>> 
>> 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.

You might also consider STRIPCMD=/tmp/strip-me which looks like:

#!/bin/sh

case $1
*.a) /bin/true
*) strip $*
esac

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.

Warner
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 842 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://lists.freebsd.org/pipermail/freebsd-mips/attachments/20141120/b19d245b/attachment.sig>


More information about the freebsd-mips mailing list