NetBSD Problem Report #15467

Received: (qmail 7587 invoked from network); 3 Feb 2002 08:31:03 -0000
Message-Id: <20020203083100.4833.qmail@juice.scl.cwru.edu>
Date: 3 Feb 2002 08:31:00 -0000
From: Amitai Schlair <schmonz+netbsd@schmonz.com>
To: gnats-bugs@gnats.netbsd.org
Subject: STRIPFLAG changes for Darwin
X-Send-Pr-Version: 3.95

>Number:         15467
>Category:       pkg
>Synopsis:       STRIPFLAG changes for Darwin
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    yyamano
>State:          closed
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Sun Feb 03 08:32:00 +0000 2002
>Closed-Date:    Wed May 29 15:47:54 +0000 2002
>Last-Modified:  Wed May 29 15:47:54 +0000 2002
>Originator:     Amitai Schlair
>Release:        NetBSD 1.5.2
>Organization:
Schmonz Enterprises
>Environment:
System: NetBSD juice 1.5.2 NetBSD 1.5.2 (JUICE) #2: Thu Dec 27 20:52:43 EST 2001 schmonz@juice:/usr/src/sys/arch/i386/compile/JUICE i386
>Description:
Darwin's native toolchain strips too much with the default STRIPFLAG="-s",
causing linking to fail. A better value is "-Wl,-x". However, STRIPFLAG is
also used by pkgsrc for /usr/bin/install, and this is still "-s".

Now that STRIPFLAG isn't always the same for both purposes, we want two
variables: STRIPFLAG_CC and STRIPFLAG_INSTALL.
>How-To-Repeat:
Try to build e.g. net/djbdns on Darwin. Get this error:

/usr/bin/ld: can't use -s with input files containg indirect symbols (output
file must contain at least global symbols, for maximum stripping use -x)
>Fix:
http://netbsd.schmonz.com/patches/stripflag-darwin.diff

I'm not at all sure that devel/automake, editors/pico, misc/siag, or
sysutils/storage-manager are correct. (Can't test them, as they don't
build on Darwin for various other reasons.) The rest were pretty obvious
changes.
>Release-Note:
>Audit-Trail:

From: Amitai Schlair <schmonz@schmonz.com>
To: <gnats-bugs@netbsd.org>
Cc:  
Subject: Re: pkg/15467
Date: Sun, 10 Feb 2002 10:37:42 -0500

 Some comments:

 I don't understand why pkgsrc's STRIPFLAG definition is in
 bsd.pkg.subdir.mk. In the interest of making my changes as minimal as
 possible, I simply went along with it. If there's a better place, cool.

 STRIPFLAG doesn't go away entirely because it's provided by the system .mk.
 But pkgsrc doesn't (and shouldn't) use it anymore. Perhaps this should be 
 documented?

 The patches for the various Courier-related mail packages won't apply 
 cleanly because their usage of STRIPFLAG had been incorrect (since fixed 
 by jlam@), but the necessary changes should be obvious.

State-Changed-From-To: open->analyzed 
State-Changed-By: yyamano 
State-Changed-When: Tue Feb 26 20:11:47 PST 2002 
State-Changed-Why:  


Responsible-Changed-From-To: pkg-manager->yyamano 
Responsible-Changed-By: yyamano 
Responsible-Changed-When: Tue Feb 26 20:11:47 PST 2002 
Responsible-Changed-Why:  

From: Yuji Yamano <yyamano@kt.rim.or.jp>
To: Amitai Schlair <schmonz+netbsd@schmonz.com>
Cc: netbsd-bugs@netbsd.org, gnats-bugs@gnats.netbsd.org
Subject: Re: pkg/15467: STRIPFLAG changes for Darwin
Date: Tue, 26 Feb 2002 23:01:51 -0600 (CST)

 Amitai Schlair <schmonz+netbsd@schmonz.com>  writes:

 > Now that STRIPFLAG isn't always the same for both purposes, we want two
 > variables: STRIPFLAG_CC and STRIPFLAG_INSTALL.

 I've just added _STRIPFLAG_CC and _STRIPFLAG_INSTALL to defs.*.mk. 
 I'll replace STRIPFLAG in pkgsrc later.

 -- Yuji Yamano

From: "Amitai Schlair" <schmonz@schmonz.com>
To: "Yuji Yamano" <yyamano@kt.rim.or.jp>
Cc: <gnats-bugs@gnats.netbsd.org>
Subject: Re: pkg/15467: STRIPFLAG changes for Darwin
Date: Thu, 18 Apr 2002 14:16:32 -0400

 Thanks for your continuing work on this. I've got commit access now, so
 if you'd like to delegate some of the remaining packages to me, I'd be
 glad to help.

 - Amitai


From: Yuji Yamano <yyamano@kt.rim.or.jp>
To: schmonz@schmonz.com
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: pkg/15467: STRIPFLAG changes for Darwin
Date: Sun, 21 Apr 2002 16:49:11 +0900 (JST)

 "Amitai Schlair" <schmonz@schmonz.com> writes:

 > Thanks for your continuing work on this. I've got commit access now, so
 > if you'd like to delegate some of the remaining packages to me, I'd be
 > glad to help.

 Thanks for your offer. I've already changed my local sources, so I think
 I can handle all of them.

 I have two questions about your patches.

 - editors/emacs

   I think INSTALL_STRIP in editors/emacs/Makefile doesn't affect to 
   install process, because emacs-20.7/Makefile.in has the following
   definition:

     # By default, we uphold the dignity of our programs.
     INSTALL_STRIP =                                      

 - editors/pico/Makefile

   You replaced STRIPFLAG with STRIPFLAG_INSTALL, but I believe it
   doesn't work. Because pico doesn't have both STRIPFLAG and
   STRIPFLAG_INSTALL, and I think STRIPFLAG may be used by install(1).

 -- Yuji Yamano

From: Amitai Schlair <schmonz@schmonz.com>
To: Yuji Yamano <yyamano@kt.rim.or.jp>
Cc: <gnats-bugs@gnats.netbsd.org>
Subject: Re: pkg/15467: STRIPFLAG changes for Darwin
Date: Sun, 21 Apr 2002 10:37:03 -0400

 "Yuji Yamano" <yyamano@kt.rim.or.jp> wrote:

 > - editors/emacs
 > 
 > I think INSTALL_STRIP in editors/emacs/Makefile doesn't affect to
 > install process, because emacs-20.7/Makefile.in has the following
 > definition:
 > 
 >   # By default, we uphold the dignity of our programs.
 >   INSTALL_STRIP =

 There's an "install-strip" target in there too, which sets INSTALL_STRIP to
 "-s" explicitly. I think we should patch that "-s" to ${_STRIPFLAG_INSTALL},
 and then set ALL_TARGET=install-strip in the package Makefile.

 This change would mean that the emacs package will honor _STRIPFLAG_INSTALL
 (good), but also that emacs would get stripped by default (possibly bad).
 I'd suggest running the idea by packages@netbsd.org to see whether this is
 okay. emacs is big and crazy enough that it might expect to be able to walk
 its own symbol table. :-)

 > - editors/pico/Makefile
 > 
 > You replaced STRIPFLAG with STRIPFLAG_INSTALL, but I believe it
 > doesn't work. Because pico doesn't have both STRIPFLAG and
 > STRIPFLAG_INSTALL, and I think STRIPFLAG may be used by install(1).

 I think the existing STRIPFLAG setting in the package Makefile also doesn't
 work. In usr.bin/xinstall/xinstall.c, the only getenv() call is for STRIP.
 However, the do-install target calls ${INSTALL_PROGRAM}, which is set to

 ${INSTALL} ${COPY} ${STRIPFLAG} -o ${BINOWN} -g ${BINGRP} -m ${BINMODE}

 in bsd.pkg.mk. This should use ${_STRIPFLAG_INSTALL} instead (!).

 Also, for pico, we should set BUILDNAME=osx on Darwin.

 - Amitai


From: Yuji Yamano <yyamano@kt.rim.or.jp>
To: schmonz@schmonz.com
Cc: gnats-bugs@gnats.netbsd.org
Subject: Re: pkg/15467: STRIPFLAG changes for Darwin
Date: Thu, 30 May 2002 00:36:38 +0900 (JST)

 I've just replaced all STRIPFLAG. I think there are some packages that 
 disable to install striped binaries without clear reason, so I want to 
 clean up them after 1.6 branch. 

 -- Yuji Yamano
State-Changed-From-To: analyzed->closed 
State-Changed-By: yyamano 
State-Changed-When: Wed May 29 08:42:06 PDT 2002 
State-Changed-Why:  
I've replaced all STRIPFLAG with _STRIPFLAG_{CC,INSTALL}. 
>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.51 2026/08/10 02:28:17 riastradh Exp $
$NetBSD: gnats_config.sh,v 1.10 2026/05/13 22:00:09 riastradh Exp $
Copyright © 1994-2026 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.