firefox (gecko) and DEBUG option

Andriy Gapon avg at FreeBSD.org
Mon Nov 25 12:20:22 UTC 2013


on 25/11/2013 12:30 Andriy Gapon said the following:
> In www/firefox port DEBUG option has the following description:
>  DEBUG             Install debug symbols
> This seems to be factually incorrect.  I see in bsd.gecko.mk that the option
> affects the following things:
> 
> .if ${PORT_OPTIONS:MDEBUG}
> MOZ_OPTIONS+=   --enable-debug --disable-release
> .else
> ...
> 
> .if ${PORT_OPTIONS:MLOGGING} || ${PORT_OPTIONS:MDEBUG}
> MOZ_OPTIONS+=   --enable-logging
> .else
> ...
> 
> Despite that I see that the installed binaries are actually stripped.
> 
> Not sure what causes this but:
> 
> $ make -V MOZ_OPTIONS
> ... *--enable-debug* --disable-release --enable-logging --disable-profiling
> --disable-tests *--enable-strip* *--enable-install-strip*
> 
> This is somewhat weird because:
> $ echo "<$(make -V STRIP)>"
> <>

It seems that at the time when bsd.gecko.mk is included (from bsd.port.mk via
bsd.port.pre.mk), WITH_DEBUG is not set yet.  So, STRIP is at its default value
and thus the stripping options are not set correctly.  Later, when bsd.port.mk
is included via bsd.port.post.mk STRIP gets reset.
Perhaps the easiest solution would be to explicitly reset STRIP in bsd.gecko.mk
when DEBUG option is set.  Similarly to how it is done for the profiling option.

-- 
Andriy Gapon


More information about the freebsd-gecko mailing list