ports/132231: [PATCH] www/firefox3: Add option to build with Profile-Guided Optimization
| From: | Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org> |
| Date: | 1 Mar 2009 16:59:18 -0300 |
| Subject: | [PATCH] www/firefox3: Add option to build with Profile-Guided Optimization |
| Send-pr version: | 3.113 |
| Number: | 132231 |
| Category: | ports |
| Synopsis: | [PATCH] www/firefox3: Add option to build with Profile-Guided Optimization |
| Severity: | non-critical |
| Priority: | low |
| Responsible: | freebsd-gecko@FreeBSD.org |
| State: | feedback |
| Class: | change-request |
| Arrival-Date: | Sun Mar 01 20:00:05 UTC 2009 |
| Closed-Date: | |
| Last-Modified: | Sun Apr 26 23:59:53 UTC 2009 |
| Originator: | Mario Sergio Fujikawa Ferreira |
| Release: | FreeBSD 7.1-STABLE i386 |
| Organization: |
| Environment: |
System: FreeBSD exxodus.fedaykin.here 7.1-STABLE FreeBSD 7.1-STABLE #57: Tue Feb 24 03:51:58 BRT 2009
| Description: |
- Add WITH_PGO to build with Profile-Guided Optimization
Added file(s):
- files/mozconfig-profile_guided_optimization.in
Port maintainer (gnome@FreeBSD.org) is cc'd.
Generated with FreeBSD Port Tools 0.77
Added file(s):
- files/mozconfig-profile_guided_optimization.in
Port maintainer (gnome@FreeBSD.org) is cc'd.
Generated with FreeBSD Port Tools 0.77
| How-To-Repeat: |
| Fix: |
| Download firefox-3.0.6,1.patch |
Index: Makefile =================================================================== RCS file: /home/pcvs/ports/www/firefox3/Makefile,v retrieving revision 1.12 diff -d -u -u -r1.12 Makefile --- Makefile 11 Feb 2009 14:48:35 -0000 1.12 +++ Makefile 1 Mar 2009 19:57:43 -0000 @@ -53,6 +53,7 @@ OPTIONS= DBUS "Enable D-BUS support" on \ NEWTAB "Open external links in a new tab" on \ + PGO "Enable Profile-Guided Optimization" off \ SMB "Enable smb:// URI support using gnomevfs" off .include <bsd.port.pre.mk> @@ -72,6 +73,14 @@ LIB_DEPENDS+= dbus-glib-1.2:${PORTSDIR}/devel/dbus-glib .endif +.if defined(WITH_PGO) +USE_PYTHON_BUILD= yes +.include "${PORTSDIR}/Mk/bsd.python.mk" + +MAKEFILE=client.mk +ALL_TARGET=profiledbuild +.endif + .if ${ARCH} == "sparc64" BROKEN= Does not compile on sparc64 .endif @@ -100,6 +109,13 @@ ${LN} -s xptcinvoke_asm_sparc64_openbsd.s xptcinvoke_asm_sparc64_freebsd.s) .endif +pre-build: +.if defined(WITH_PGO) + @${SED} -e 's|@PYTHON@|${PYTHON_CMD}|' \ + <${FILESDIR}/mozconfig-profile_guided_optimization.in \ + >> ${BUILD_WRKSRC}/.mozconfig +.endif + port-pre-install: # ${SED} -e 's|1.9a7|0|' ${WRKSRC}/dist/bin/application.ini ${FAKEDIR}/lib ${ECHO_CMD} 'share/applications/${MOZILLA}.desktop' >> ${PLISTF} Index: files/mozconfig-profile_guided_optimization.in =================================================================== RCS file: files/mozconfig-profile_guided_optimization.in diff -N files/mozconfig-profile_guided_optimization.in --- /dev/null 1 Jan 1970 00:00:00 -0000 +++ files/mozconfig-profile_guided_optimization.in 1 Mar 2009 19:57:43 -0000 @@ -0,0 +1 @@ +mk_add_options PROFILE_GEN_SCRIPT='@PYTHON@ $(OBJDIR)/_profile/pgo/profileserver.py' |
| Release-Note: |
| Audit-Trail: |
| Responsible Changed | |
| From-To: | freebsd-ports-bugs->gnome |
| By: | edwin |
| When: | Sun Mar 1 20:00:31 UTC 2009 |
| Why: | Over to maintainer (via the GNATS Auto Assign Tool) |
| Reply via E-mail | |
| From: | Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org> |
| Date: | Fri, 06 Mar 2009 22:33:59 -0300 |
|
Patch still applies after port update to 3.0.7. I've been running the updated port with PGO without a problem. | |
| Reply via E-mail | |
| From: | Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org> |
| Date: | Mon, 30 Mar 2009 05:03:55 -0300 |
|
Hi, The patch had to be slightly modified after the MAKE_JOBS_SAFE option was added. The updated patch work with Firefox 3.0.8. Regards, -- Mario S F Ferreira - DF - Brazil - "I guess this is a signature." feature, n: a documented bug | bug, n: an undocumented feature --- Makefile.orig 2009-03-30 03:06:06.000000000 -0300 +++ Makefile 2009-03-30 03:26:55.000000000 -0300 @@ -38,7 +38,6 @@ HAS_CONFIGURE= yes USE_BZIP2= yes USE_GMAKE= yes -MAKE_JOBS_SAFE= yes NO_MOZPKGINSTALL=yes FIREFOX_ICON= ${MOZILLA}.png @@ -54,6 +53,7 @@ OPTIONS= DBUS "Enable D-BUS support" on \ NEWTAB "Open external links in a new tab" on \ + PGO "Enable Profile-Guided Optimization" off \ SMB "Enable smb:// URI support using gnomevfs" off .include <bsd.port.pre.mk> @@ -73,6 +73,18 @@ LIB_DEPENDS+= dbus-glib-1.2:${PORTSDIR}/devel/dbus-glib .endif +.if defined(WITH_PGO) +USE_PYTHON_BUILD= yes +.include "${PORTSDIR}/Mk/bsd.python.mk" + +MAKEFILE= client.mk +ALL_TARGET= profiledbuild + +MAKE_JOBS_UNSAFE= yes +.else +MAKE_JOBS_SAFE= yes +.endif + .if ${ARCH} == "sparc64" BROKEN= Does not compile on sparc64 .endif @@ -101,6 +113,13 @@ ${LN} -s xptcinvoke_asm_sparc64_openbsd.s xptcinvoke_asm_sparc64_freebsd.s) .endif +pre-build: +.if defined(WITH_PGO) + @${SED} -e 's|@PYTHON@|${PYTHON_CMD}|' \ + < ${FILESDIR}/mozconfig-profile_guided_optimization.in \ + >> ${BUILD_WRKSRC}/.mozconfig +.endif + port-pre-install: # ${SED} -e 's|1.9a7|0|' ${WRKSRC}/dist/bin/application.ini ${FAKEDIR}/lib ${ECHO_CMD} 'share/applications/${MOZILLA}.desktop' >> ${PLISTF} mk_add_options PROFILE_GEN_SCRIPT='@PYTHON@ $(OBJDIR)/_profile/pgo/profileserver.py' | |
| Responsible Changed | |
| From-To: | gnome->miwi |
| By: | marcus |
| When: | Sun Apr 12 19:48:42 UTC 2009 |
| Why: | Assign to new Gecko maintainer. |
| Reply via E-mail | |
| From: | Mario Sergio Fujikawa Ferreira <lioux@FreeBSD.org> |
| Date: | Tue, 21 Apr 2009 22:54:14 -0259 |
|
Update patch according to port Makefile revision 1.17. Regards, -- Mario S F Ferreira - DF - Brazil - "I guess this is a signature." feature, n: a documented bug | bug, n: an undocumented feature --- Makefile.orig 2009-04-21 22:47:38.000000000 -0300 +++ Makefile 2009-04-21 22:49:21.000000000 -0300 @@ -38,7 +38,6 @@ HAS_CONFIGURE= yes USE_BZIP2= yes USE_GMAKE= yes -MAKE_JOBS_SAFE= yes NO_MOZPKGINSTALL=yes FIREFOX_ICON= ${MOZILLA}.png @@ -54,6 +53,7 @@ OPTIONS= DBUS "Enable D-BUS support" on \ NEWTAB "Open external links in a new tab" on \ + PGO "Enable Profile-Guided Optimization" off \ SMB "Enable smb:// URI support using gnomevfs" off .include <bsd.port.pre.mk> @@ -73,6 +73,18 @@ LIB_DEPENDS+= dbus-glib-1.2:${PORTSDIR}/devel/dbus-glib .endif +.if defined(WITH_PGO) +USE_PYTHON_BUILD= yes +.include "${PORTSDIR}/Mk/bsd.python.mk" + +MAKEFILE= client.mk +ALL_TARGET= profiledbuild + +MAKE_JOBS_UNSAFE= yes +.else +MAKE_JOBS_SAFE= yes +.endif + post-extract:: @${SED} -e 's|@FIREFOX_ICON@|${FIREFOX_ICON}|' -e 's|@MOZILLA@|${MOZILLA}|' \ -e 's|@MOZILLA_NAME@|${MOZILLA_NAME}|' \ @@ -97,6 +109,13 @@ ${LN} -s xptcinvoke_asm_sparc64_openbsd.s xptcinvoke_asm_sparc64_freebsd.s) .endif +pre-build: +.if defined(WITH_PGO) + @${SED} -e 's|@PYTHON@|${PYTHON_CMD}|' \ + < ${FILESDIR}/mozconfig-profile_guided_optimization.in \ + >> ${BUILD_WRKSRC}/.mozconfig +.endif + port-pre-install: # ${SED} -e 's|1.9a7|0|' ${WRKSRC}/dist/bin/application.ini ${FAKEDIR}/lib ${ECHO_CMD} 'share/applications/${MOZILLA}.desktop' >> ${PLISTF} | |
| State Changed | |
| From-To: | open->feedback |
| By: | miwi |
| When: | Wed Apr 22 08:42:43 UTC 2009 |
| Why: | Hi Mario We tested the patch but this failed on amd64 systems, http://nopaste.unixfreunde.de/93 |
| Responsible Changed | |
| From-To: | miwi->freebsd-gecko |
| By: | miwi |
| When: | Sun Apr 26 23:59:52 UTC 2009 |
| Why: | Over to maintainer. |
| Unformatted: |
