Date: Thu, 20 Nov 2014 22:21:24 -0700 From: Warner Losh <imp@bsdimp.com> To: Ben Morrow <ben@morrow.me.uk> Cc: freebsd-mips@freebsd.org Subject: Re: is pkgng=no valid? Message-ID: <A420009D-D644-4336-819C-EA1F25C61FAA@bsdimp.com> In-Reply-To: <20141121034128.GA18538@anubis.morrow.me.uk> References: <546BA46C.4050908@gmail.com> <20141118200226.GP44537@home.opsec.eu> <CAKE2PDsjL_Cr=5s7wpE107sB=oEPcekpjDq7GJNK3hqv3KNdeQ@mail.gmail.com> <20141118212630.GQ44537@home.opsec.eu> <546BBB26.5050603@gmail.com> <CADgEyUtk7E3e%2BYowu2sECi5RhHB9S_YBm23w0NZEep9-WnvPiA@mail.gmail.com> <546BC7AE.3080705@gmail.com> <20141119004236.GA95694@anubis.morrow.me.uk> <CADgEyUt%2BSiveYBQ=i2bVdVkpLFb1cr7dkxuk2MA%2B8eZ_ynr7wA@mail.gmail.com> <CADgEyUv0-=1H4XBcNiLq9gJa8cu-fM0A%2BNrK7w86QYSUsBDNTw@mail.gmail.com> <20141121034128.GA18538@anubis.morrow.me.uk>
next in thread | previous in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
On Nov 20, 2014, at 8:41 PM, Ben Morrow <ben@morrow.me.uk> wrote:
> Quoth sbruno@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@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
[-- Attachment #2 --]
-----BEGIN PGP SIGNATURE-----
Comment: GPGTools - https://gpgtools.org
iQIcBAEBCgAGBQJUbsvUAAoJEGwc0Sh9sBEAC6sQAIvsiV7vuuRaEofISJve2dxe
RlEAQ/YedXG5oy3dnO4Ii3PU3Tu/0L7P+ieN41ggTM+vhUwrbG1Rx+/RPV+8OfFc
nHLEwwqit6guaDSfb04oYvS+Qo50E1I+Xq4Sl4P5/1rAkjZBaBGLM3AfvuqCj1c1
inKbEIEvcrhF2yJwSak+7eWVmYwbNHNosfzfaHiwoVr1/ALAzZlTCMkPIcTKOyAm
j8ZF26AHKLvmVt+Xvvoa7DrTnmuKHzcxT9FfJqA4A9Yr1yzU7KiXvGIEM72b5Sf3
tyDCrSCzzALurKHiQ1LJTnKjCOqVnBcNLC1l+YXX1FuF8SQhypQbpCGqgBXuTH7I
Pnp0Po3+53jM3WsIpJ72guf7PT83lwO3gju/cpNfLbcGm0g0EpzN8P95wCfqHyMj
Xla1kBERCkGNvgPlyzTJ3k8Y8c/i5PSZYUg8ZS5j8wfKbAW5NPi5M1IBskQI8vuE
Y65yvN0l/B8WsEanH5Jr4pPslLPQNoaF3UrJNlvbHqHKQSjXzunTr+Ny1ZLL0u8t
hRKv2e1yet2gkkT9ZkBfugB63hppCb1klWrjXmcLtRoXu7s9lBRttyZvUUZ9DC15
WH35l56zv22bRNgJJQud8MroOOxuggwS1YlvlITZKWCNV6kt9pxkcjEm4fkQO1Ud
93ObMjdYWj09iOq/rkYc
=WXpE
-----END PGP SIGNATURE-----
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?A420009D-D644-4336-819C-EA1F25C61FAA>
