STRIP in /usr/share/mk/

Jeremie Le Hen jeremie.le-hen at epita.fr
Thu Sep 23 15:41:03 PDT 2004


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 at epita.fr
                                                                 ttz at epita.fr
Hi! I'm a .signature virus! Copy me into your ~/.signature to help me spread!


More information about the freebsd-hackers mailing list