summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--www/firefox/options.mk23
1 files changed, 18 insertions, 5 deletions
diff --git a/www/firefox/options.mk b/www/firefox/options.mk
index 2711736306b..5780dd856a5 100644
--- a/www/firefox/options.mk
+++ b/www/firefox/options.mk
@@ -1,8 +1,8 @@
-# $NetBSD: options.mk,v 1.22 2014/05/05 00:53:34 ryoon Exp $
+# $NetBSD: options.mk,v 1.23 2014/06/20 07:27:50 martin Exp $
PKG_OPTIONS_VAR= PKG_OPTIONS.firefox
PKG_SUPPORTED_OPTIONS= official-mozilla-branding
-PKG_SUPPORTED_OPTIONS+= alsa debug mozilla-jemalloc gnome pulseaudio webrtc
+PKG_SUPPORTED_OPTIONS+= alsa debug debug-info mozilla-jemalloc gnome pulseaudio webrtc
PLIST_VARS+= gnome jemalloc debug
.if ${OPSYS} == "Linux"
@@ -45,14 +45,27 @@ CONFIGURE_ARGS+= --enable-jemalloc
CONFIGURE_ARGS+= --disable-jemalloc
.endif
+.include "../../mk/compiler.mk"
+.if !empty(PKGSRC_COMPILER:Mgcc) && ${CC_VERSION:S/gcc-//:S/.//g} >= 480
+# Modern gcc does not run any "tracking" passes when compiling with -O0,
+# which makes the generated debug info mostly useless. So explicitly
+# request them.
+O0TRACKING=-fvar-tracking-assignments -fvar-tracking
+.endif
+
.if !empty(PKG_OPTIONS:Mdebug)
-CONFIGURE_ARGS+= --enable-debug="-g -O0" --enable-debug-symbols --disable-optimize
+CONFIGURE_ARGS+= --enable-debug="-g -O0 ${O0TRACKING}" --enable-debug-symbols --disable-optimize
CONFIGURE_ARGS+= --disable-install-strip
PLIST.debug= yes
.else
-CONFIGURE_ARGS+= --disable-debug --disable-debug-symbols
+.if !empty(PKG_OPTIONS:Mdebug-info)
+CONFIGURE_ARGS+= --enable-debug-symbols
+.else
+CONFIGURE_ARGS+= --disable-debug-symbols
+.endif
+CONFIGURE_ARGS+= --disable-debug
+CONFIGURE_ARGS+= --enable-optimize=-O2
CONFIGURE_ARGS+= --enable-install-strip
-CONFIGURE_ARGS+= --enable-optimize=-O2
.endif
.if !empty(PKG_OPTIONS:Mpulseaudio)