FreeBSD Bugzilla – Attachment 95018 Details for
Bug 133302
[PATCH] textproc/libtre: Add option to build with Profile-Guided Optimization
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Help
|
New Account
|
Log In
Remember
[x]
|
Forgot Password
Login:
[x]
[patch]
libtre-0.7.5_3.patch
libtre-0.7.5_3.patch (text/plain), 3.17 KB, created by
Mario Sergio Fujikawa Ferreira
on 2009-04-02 14:00:00 UTC
(
hide
)
Description:
libtre-0.7.5_3.patch
Filename:
MIME Type:
Creator:
Mario Sergio Fujikawa Ferreira
Created:
2009-04-02 14:00:00 UTC
Size:
3.17 KB
patch
obsolete
>Index: Makefile >=================================================================== >RCS file: /home/pcvs/ports/textproc/libtre/Makefile,v >retrieving revision 1.46 >diff -d -u -u -r1.46 Makefile >--- Makefile 8 Aug 2008 03:27:32 -0000 1.46 >+++ Makefile 2 Apr 2009 12:43:16 -0000 >@@ -21,14 +21,15 @@ > USE_GNOME= gnomehack gnometarget pkgconfig > USE_AUTOTOOLS= libtool:15 > CONFIGURE_ARGS+= --enable-static >-CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}" LDFLAGS="${LDFLAGS}" >+CONFIGURE_ENV+= CPPFLAGS="${CPPFLAGS}" > USE_LDCONFIG= yes > > CPPFLAGS+= -I${LOCALBASE}/include > LDFLAGS+= -L${LOCALBASE}/lib > > OPTIONS= NLS "native language support" off \ >- OPTIMIZED_CFLAGS "append optimization flags to CFLAGS" off >+ OPTIMIZED_CFLAGS "append optimization flags to CFLAGS" off \ >+ PGO "Enable Profile-Guided Optimization" off > > MAN1= tre_agrep.1 > >@@ -48,12 +49,27 @@ > -fforce-mem -fforce-addr -O3 > .endif > >+.if defined(WITH_PGO) >+CONFIGURE_ENV+= CFLAGS="${CFLAGS} -fprofile-generate" \ >+ LDFLAGS="${LDFLAGS} -fprofile-generate" >+.else >+CONFIGURE_ENV+= CFLAGS="${CFLAGS}" \ >+ LDFLAGS="${LDFLAGS}" >+.endif >+ > post-patch: > ${MV} ${WRKSRC}/doc/agrep.1.in ${WRKSRC}/doc/tre_agrep.1.in > ${REINPLACE_CMD} -e 's;agrep\.1;tre_agrep\.1;g' ${WRKSRC}/configure \ > ${WRKSRC}/tre.spec.in ${WRKSRC}/doc/Makefile.in > ${REINPLACE_CMD} -e 's;agrep;tre_agrep;g' ${WRKSRC}/tests/agrep/*.ok > >+.if defined(WITH_PGO) >+.if target(pre-build) >+.error Makefile error since pre-build target has already been defined >+.endif >+pre-build: pgo >+.endif >+ > post-install: > .if !defined(NOPORTDOCS) > ${MKDIR} ${DOCSDIR} >@@ -65,4 +81,47 @@ > regression-test: build > @(cd ${BUILD_WRKSRC} ; ${SETENV} ${MAKE_ENV} ${MAKE} check ) > >+.if defined(WITH_PGO) >+pgo: pgo-pre-build pgo-build pgo-run pgo-post-run pgo-clean >+ >+pgo-pre-build: >+ @${FIND} ${BUILD_WRKSRC} -type f -name Makefile -exec \ >+ ${REINPLACE_CMD} -E \ >+ -e 's,^((C|LD)FLAGS[[:space:]]*=.*)-fprofile-generate,\1,' \ >+ -e 's,^(CFLAGS[[:space:]]*=.*)-fprofile-use,\1,' \ >+ -e 's,^((C|LD)FLAGS[[:space:]]*=.*)$$,\1 -fprofile-generate,' \ >+ {} \; >+ >+pgo-build: >+ @(cd ${BUILD_WRKSRC}; ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${_MAKE_JOBS} ${MAKE_ARGS} ${ALL_TARGET}) >+ >+pgo-run: >+# Check everything to generate profiling information. >+ @-(cd ${BUILD_WRKSRC} ; ${SETENV} ${MAKE_ENV} ${MAKE} check) >+ >+pgo-post-run: >+ @${FIND} ${BUILD_WRKSRC} -type f -name Makefile -exec \ >+ ${REINPLACE_CMD} -E \ >+ -e 's,^((C|LD)FLAGS[[:space:]]*=.*)-fprofile-generate,\1,' \ >+ -e 's,^(CFLAGS[[:space:]]*=.*)-fprofile-use,\1,' \ >+ -e 's,^(CFLAGS[[:space:]]*=.*)$$,\1 -fprofile-use,' \ >+ {} \; >+ @${REINPLACE_CMD} -E \ >+ -e 's,-fprofile-generate,-fprofile-use,g' \ >+ ${CONFIGURE_WRKSRC}/config.status \ >+ ${CONFIGURE_WRKSRC}/libtool >+ @${REINPLACE_CMD} -E \ >+ -e 's,-fprofile-generate,,g' \ >+ ${BUILD_WRKSRC}/tre.pc >+ >+pgo-clean: >+# Selectively clean some directories. >+. for dir in gnulib src tests >+ @(cd ${BUILD_WRKSRC}/${dir}; ${SETENV} ${MAKE_ENV} ${MAKE} clean) >+. endfor >+# Only remove some files from lib to preserve profiling information. >+ @${FIND} -E ${BUILD_WRKSRC}/lib -iregex ".*\.(a|la|lai|lo|o|so|so\..*)$$" \ >+ -exec ${RM} -f {} \; >+.endif # if defined(WITH_PGO) >+ > .include <bsd.port.post.mk>
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
View Attachment As Diff
View Attachment As Raw
Actions:
View
|
Diff
Attachments on
bug 133302
: 95018 |
95019