Subject: Re: should executables be installed as stripped binaries?
To: Jeremy C. Reed <reed@reedmedia.net>
From: Todd Vierling <tv@duh.org>
List: tech-pkg
Date: 10/09/2005 10:31:44
On Sat, 8 Oct 2005, Jeremy C. Reed wrote:
> My custom bsd.pkg.mk has:
>
> MAKE_ENV+= INSTALL_STRIP_FLAG=${_STRIPFLAG_CC}
What uses this?
> INSTALL_LIB?= \
> - ${INSTALL} ${COPY} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE}
> + ${INSTALL} ${COPY} ${_STRIPFLAG_INSTALL} -o ${BINOWN} -g ${BINGRP} -m
> ${BINMODE}
If this is needed, it should be implemented with a _STRIPFLAG_INSTALL_LIB,
as stripping libraries will break runtime operation on some platforms.
> .if !empty(CC_VERSION:Mgcc*)
> # and maybe have an option to say to use _STRIPFLAG_CC ??
> CFLAGS+= ${_STRIPFLAG_CC}
> .endif
That belongs squarely in LDFLAGS, not CFLAGS. Packages not respecting
LDFLAGS should be fixed, as there are other reasons to add things to LDFLAGS
in the user's mk.conf.
--
-- Todd Vierling <tv@duh.org> <tv@pobox.com> <todd@vierling.name>