Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 25 Oct 2002 03:36:19 -0700
From:      Adam Weinberger <adamw@FreeBSD.ORG>
To:        Tom Hukins <tom@FreeBSD.ORG>
Cc:        freebsd-doc@FreeBSD.ORG
Subject:   Re: docs/44396: Section 15.1 of the Porter's Handbook is no longer applicable
Message-ID:  <20021025103619.GM70503@vectors.cx>
In-Reply-To: <200210242100.g9OL0AGV025120@freefall.freebsd.org>
References:  <200210242100.g9OL0AGV025120@freefall.freebsd.org>

next in thread | previous in thread | raw e-mail | index | archive | help

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

>> (10.24.2002 @ 1400 PST): Tom Hukins said, in 1.1K: <<
>  > The section could stay around, and just become a Don't... "Don't strip
>  > unless you have to."
>  
>  That makes sense.

What are your thoughts on this:

===================================================================
RCS file:
/home/ncvs/doc/en_US.ISO8859-1/books/porters-handbook/book.sgml,v
retrieving revision 1.248
diff -u -r1.248 book.sgml
- --- doc/en_US.ISO8859-1/books/porters-handbook/book.sgml        8 Oct
2002 04:52:43 -00001.248
+++ doc/en_US.ISO8859-1/books/porters-handbook/book.sgml        25 Oct
2002 10:32:23 -0000
@@ -3938,19 +3938,27 @@
         doing.</para>
 
       <sect1>
- -        <title>Strip Binaries</title>
+        <title>Stripping Binaries</title>
 
- -        <para>Do strip binaries.  If the original source already strips
         the
- -          binaries, fine; otherwise you should add a
- -          <literal>post-install</literal> rule to it yourself.  Here is
           an
- -          example:</para>
+               <para>Don't strip binaries manually unless you have to. All binaries
+               should be stripped, but the <maketarget>INSTALL_PROGRAM</maketarget>
+               macro will install and strip a bnary at the same time (see the next
+               section).</para>
+
+               <para>If you need to strip a file, but don't wish to use the
+                 <makevar>INSTALL_PROGRAM</makevar> macro,
+                 <makevar>${STRIP}</makevar> will strip your program. This is
+                 typically done within the <literal>post-install</literal>
+                 target.  For example:</para>
 
         <programlisting>post-install:
- -        strip ${PREFIX}/bin/xdl</programlisting>
+        ${STRIP} ${PREFIX}/bin/xdl</programlisting>
 
         <para>Use the &man.file.1; command on the installed executable to
           check whether the binary is stripped or not.  If it does not say
- -          <literal>not stripped</literal>, it is stripped.</para>
+          <literal>not stripped</literal>, it is stripped.
Additionally,
+                 &man.strip.1; will not strip a previously stripped
program; it
+                 will instead exit cleanly.</para>
       </sect1>
 
       <sect1>


- --
Adam Weinberger
adam@vectors.cx
adamw@FreeBSD.ORG

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.2.0 (FreeBSD)

iD8DBQE9uR6jo8KM2ULHQ/0RAu6FAKCqLVefJVvLD3fzo8K7CVmbEvawhQCcCQtM
aOpcWLJJtGG11gcBmjG8hVE=
=ijel
-----END PGP SIGNATURE-----

To Unsubscribe: send mail to majordomo@FreeBSD.org
with "unsubscribe freebsd-doc" in the body of the message




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20021025103619.GM70503>