1
0
mirror of https://git.FreeBSD.org/ports.git synced 2025-01-19 08:13:21 +00:00

- Add WITH_OPTIMIZED_CFLAGS knob to build with optimizations

- Add WITH_JITC knob to select jitc_x86 CPU, only for i386

PR:		ports/67132
Submitted by:	Roman Bogorodskiy <bogorodskiy@inbox.ru> (maintainer)
This commit is contained in:
Pav Lucistnik 2004-05-24 23:41:57 +00:00
parent 639367c7c1
commit d4241c0ba3
Notes: svn2git 2021-03-31 03:12:20 +00:00
svn path=/head/; revision=109911

View File

@ -19,9 +19,34 @@ USE_REINPLACE= yes
GNU_CONFIGURE= yes
CONFIGURE_ENV= CPPFLAGS="-I${X11BASE}/include" \
LDFLAGS="-L${X11BASE}/lib"
CONFIGURE_ARGS= --disable-fpo
PKGMESSAGE= ${WRKDIR}/pkg-message
.include <bsd.port.pre.mk>
.if defined(WITH_OPTIMIZED_CFLAGS)
CFLAGS+= -O3 -ffast-math
.else
CONFIGURE_ARGS+= --disable-fpo
.endif
# jitc_x86 is avaible only on x86
.if ${ARCH} == "i386"
.if !defined(WITH_JITC)
CONFIGURE_ARGS+= --enable-cpu=generic
.else
CONFIGURE_ARGS+= --enable-cpu=jitc_x86
.endif # WITH_JITC
.else
CONFIGURE_ARGS+= --enable-cpu=generic
.endif
pre-everything::
.if !defined(WITH_OPTIMIZED_CFLAGS)
@${ECHO_MSG} ""
@${ECHO_MSG} "You can do optimized build defining WITH_OPTIMIZED_CFLAGS=yes."
@${ECHO_MSG} ""
.endif
post-configure:
@${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|g' ${WRKSRC}/Makefile
@${REINPLACE_CMD} -e 's|-lpthread|${PTHREAD_LIBS}|g' ${WRKSRC}/src/Makefile
@ -33,4 +58,4 @@ post-install:
@${CAT} ${PKGMESSAGE}
@${INSTALL_DATA} ${WRKSRC}/ppccfg.example ${PREFIX}/etc/ppccfg.example
.include <bsd.port.mk>
.include <bsd.port.post.mk>