Date: Mon, 10 Oct 2011 15:36:48 +0000 From: Nali Toja <nalitoja@gmail.com> To: FreeBSD-gnats-submit@FreeBSD.org Subject: ports/161463: [patch] Mk/bsd.gecko.mk: remove some vendor optimization for WITHOUT_OPTIMIZED_CFLAGS Message-ID: <86ehykx3vs.fsf@gmail.com> Resent-Message-ID: <201110101540.p9AFe3lD087009@freefall.freebsd.org>
next in thread | raw e-mail | index | archive | help
>Number: 161463 >Category: ports >Synopsis: [patch] Mk/bsd.gecko.mk: remove some vendor optimization for WITHOUT_OPTIMIZED_CFLAGS >Confidential: no >Severity: non-critical >Priority: low >Responsible: freebsd-ports-bugs >State: open >Quarter: >Keywords: >Date-Required: >Class: change-request >Submitter-Id: current-users >Arrival-Date: Mon Oct 10 15:40:03 UTC 2011 >Closed-Date: >Last-Modified: >Originator: Nali Toja >Release: FreeBSD 10.0-CURRENT amd64 >Organization: >Environment: >Description: Since bug#680277 optimized builds always add -fomit-frame-pointer after user CFLAGS which makes it harder to capture callchain information using pmcstat(8), dtrace(1) or gdb(1). And since --enable-optimize is enabled by default there is no way around short of defining WITH_DEBUG that may have undesirable effects, e.g. CFLAGS := ${CFLAGS:N-O*:N-fno-strict*} ${DEBUG_FLAGS} # from bsd.port.mk MOZ_DEBUG_ENABLE_DEFS="-DDEBUG -D_DEBUG -DTRACING" # from configure.in >How-To-Repeat: $ cd www/firefox; make install STRIP= $ firefox & $ pmcstat -t firefox -P instructions -T and look at the CALLERS column for libxul.so >Fix: --- optimize.diff begins here --- Index: Mk/bsd.gecko.mk =================================================================== RCS file: /a/.csup/ports/Mk/bsd.gecko.mk,v retrieving revision 1.42 diff -u -p -r1.42 bsd.gecko.mk --- Mk/bsd.gecko.mk 28 Sep 2011 03:14:22 -0000 1.42 +++ Mk/bsd.gecko.mk 10 Oct 2011 14:20:22 -0000 @@ -663,11 +663,12 @@ MOZ_MK_OPTIONS+= XP_UNIX=1 \ PERL=${PERL} .if defined(WITH_OPTIMIZED_CFLAGS) +MOZ_OPTIONS+= --enable-optimize=${WITH_OPTIMIZE} CFLAGS:= ${CFLAGS} -O2 -fno-strict-aliasing ${EXTRA_CFLAGS} WITH_OPTIMIZE?= -O2 .else +MOZ_OPTIONS+= --disable-optimize CFLAGS:= ${CFLAGS} ${EXTRA_CFLAGS} -WITH_OPTIMIZE?= .endif .if defined(WITH_SMB) @@ -687,8 +688,7 @@ MOZ_OPTIONS+= --enable-strip --enable-in MOZ_OPTIONS+= --enable-debug WITH_LOGGING= yes .else -MOZ_OPTIONS+= --disable-debug \ - --enable-optimize=${WITH_OPTIMIZE} +MOZ_OPTIONS+= --disable-debug .endif .if defined(WITH_JAVA) && defined(_WITH_JAVA) --- optimize.diff ends here --- >Release-Note: >Audit-Trail: >Unformatted:
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?86ehykx3vs.fsf>