Skip site navigation (1)Skip section navigation (2)
Date:      Tue, 21 Sep 2004 15:47:07 +0200
From:      Jeremie Le Hen <jeremie.le-hen@epita.fr>
To:        freebsd-hackers@freebsd.org
Subject:   STRIP in /usr/share/mk/
Message-ID:  <20040921134707.GA1276@rocco.epita.fr>
Resent-Message-ID: <200409232239.i8NMdGg08586@epita.fr>

next in thread | raw e-mail | index | archive | help
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!



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