From owner-freebsd-hackers@FreeBSD.ORG Thu Sep 23 22:41:03 2004 Return-Path: Delivered-To: freebsd-hackers@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 9402A16A4CE for ; Thu, 23 Sep 2004 22:41:03 +0000 (GMT) Received: from caine.easynet.fr (smarthost144.mail.easynet.fr [212.180.1.144]) by mx1.FreeBSD.org (Postfix) with ESMTP id A5F3643D3F for ; Thu, 23 Sep 2004 22:41:02 +0000 (GMT) (envelope-from tataz@tatooine.tataz.chchile.org) Received: from [212.180.127.72] (helo=tatooine.tataz.chchile.org) by caine.easynet.fr with esmtp (Exim 4.34) id 1CAcGo-0001QD-Bh for freebsd-hackers@freebsd.org; Fri, 24 Sep 2004 00:40:59 +0200 Received: by tatooine.tataz.chchile.org (Postfix, from userid 1000) id C31D440AC; Fri, 24 Sep 2004 00:40:09 +0200 (CEST) Resent-From: jeremie@le-hen.org Resent-Date: Fri, 24 Sep 2004 00:40:09 +0200 Resent-Message-ID: <20040923224009.GB12440@obiwan.tataz.chchile.org> Resent-To: freebsd-hackers@freebsd.org X-Original-To: jeremie@le-hen.org Delivered-To: tataz@tataz.chchile.org Received: from ideliver (deliver.epitech.net [163.5.0.25]) by tatooine.tataz.chchile.org (Postfix) with SMTP id 58CB840A0 for ; Fri, 24 Sep 2004 00:38:36 +0200 (CEST) Received: from epita.fr ([10.42.1.60]) by ideliver (SAVSMTP 3.1.2.35) with SMTP id M2004092400380617822 for ; Fri, 24 Sep 2004 00:38:06 +0200 Received: from rocco (rocco [10.42.14.9]) by epita.fr id i8NMdGg08586 for jeremie@le-hen.org EPITA Paris France Fri, 24 Sep 2004 00:39:16 +0200 (CEST) Resent-From: jeremie le-hen Resent-Message-Id: <200409232239.i8NMdGg08586@epita.fr> Date: Tue, 21 Sep 2004 15:47:07 +0200 From: Jeremie Le Hen To: freebsd-hackers@freebsd.org Message-ID: <20040921134707.GA1276@rocco.epita.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4i Resent-Date: Fri, 24 Sep 2004 00:39:17 +0200 Resent-To: jeremie@le-hen.org X-Broken-Reverse-DNS: no host name found for IP address 212.180.127.72 Subject: STRIP in /usr/share/mk/ X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.1 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 23 Sep 2004 22:41:03 -0000 Hi, while playing around ifconfig.c, I needed to use gdb(1) on the generated binary : z6po:ifconfig# make clean ; make DEBUG_FLAGS=-ggdb && make install [...] install -s -o root -g wheel -m 555 ifconfig /sbin install -o root -g wheel -m 444 ifconfig.8.gz /usr/share/man/man8 As you can see, although I compiled with DEBUG_FLAGS, the binary is stripped on install(1) so I cannot easily use gdb(1) on it. I looked at the Makefile which includes bsd.prog.mk : .if !defined(DEBUG_FLAGS) STRIP?= -s .endif Obviously the only way to have STRIP set to "-s" is that it is set elsewhere ; bsd.prog.mk also includes bsd.lib.mk and indirectly bsd.own.mk but they contain _exactly_ the same statement. Nothing else seems to modify the STRIP variable : z6po:mk# grep -C 1 'STRIP.*=' * bsd.lib.mk-.if !defined(DEBUG_FLAGS) bsd.lib.mk:STRIP?= -s bsd.lib.mk-.endif -- bsd.own.mk-.if !defined(DEBUG_FLAGS) bsd.own.mk:STRIP?= -s bsd.own.mk-.endif -- bsd.prog.mk-.if !defined(DEBUG_FLAGS) bsd.prog.mk:STRIP?= -s bsd.prog.mk-.endif I absolutly don't understand how this variable is set. Note that make make.conf(5) doesn't contain anything about STRIP, and I also tried to do : make DEBUG_FLAGS=-ggdb STRIP='' but the result is exactly the sale unfortunately. I surely have missed something, but I can't find what. I'm pretty sure that ru@ has some explanations on this black magic stuff. :-) Thanks in advance. Regards, -- Jeremie LE HEN aka TtZ jeremie.le-hen@epita.fr ttz@epita.fr Hi! I'm a .signature virus! Copy me into your ~/.signature to help me spread!