Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 15 Jan 2014 22:07:44 +0000 (UTC)
From:      Matthias Andree <mandree@FreeBSD.org>
To:        ports-committers@freebsd.org, svn-ports-all@freebsd.org, svn-ports-head@freebsd.org
Subject:   svn commit: r339826 - head/devel/google-perftools
Message-ID:  <201401152207.s0FM7iXh048853@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: mandree
Date: Wed Jan 15 22:07:44 2014
New Revision: 339826
URL: http://svnweb.freebsd.org/changeset/ports/339826
QAT: https://qat.redports.org/buildarchive/r339826/

Log:
  Revert USE_GCC addition, and for clang, set -fno-builtin, and strip the
  GCC-specific -fno-builtin-<FUNCTION> arguments.
  
  Now has two failures on 10.0-RC5 and three on 9.2-RELEASE-p3 (both
  amd64) with the respective default compiler.

Modified:
  head/devel/google-perftools/Makefile

Modified: head/devel/google-perftools/Makefile
==============================================================================
--- head/devel/google-perftools/Makefile	Wed Jan 15 21:41:15 2014	(r339825)
+++ head/devel/google-perftools/Makefile	Wed Jan 15 22:07:44 2014	(r339826)
@@ -3,6 +3,7 @@
 
 PORTNAME=	google-perftools
 PORTVERSION=	2.1
+PORTREVISION=	1
 CATEGORIES=	devel
 MASTER_SITES=	${MASTER_SITE_GOOGLE_CODE} \
 		${MASTER_SITE_LOCAL}
@@ -24,14 +25,34 @@ BUILD_DEPENDS+=	${LOCALBASE}/include/exe
 LIB_DEPENDS+=	libexecinfo.so:${PORTSDIR}/devel/libexecinfo
 
 GNU_CONFIGURE=	yes
-USE_GCC=	any # clang causes 7 more test case failures in "make check"
 USE_LDCONFIG=	yes
+USES=		compiler
 
-CONFIGURE_ARGS+=CPPFLAGS=-I${LOCALBASE}/include LIBS=-lexecinfo LDFLAGS=-L${LOCALBASE}/lib
+CPPFLAGS+=	-I${LOCALBASE}/include
+LIBS+=		-lexecinfo
+LDFLAGS+=	-L${LOCALBASE}/lib
+CONFIGURE_ARGS+=LIBS="${LIBS}"
 
-.include <bsd.port.options.mk>
+.include <bsd.port.pre.mk>
+
+.if ${COMPILER_TYPE} == "clang" && !defined(USE_GCC)
+# clang cannot disable builtins individually
+CXXFLAGS+=	-fno-builtin
+.endif
+
+.if ${ARCH} == "amd64"
+CONFIGURE_ARGS+=--enable-frame-pointers
+.endif
+.if ${ARCH} == "ia64" || ${ARCH} == "powerpc" || ${ARCH} == "sparc64"
+BROKEN=	Does not build, assembly not supported, see PR-94: http://code.google.com/p/google-perftools/issues/detail?id=94&can=1
+.endif
 
 post-patch:
+.if ${COMPILER_TYPE} == "clang" && !defined(USE_GCC)
+	${REINPLACE_CMD} -Ee \
+		's|-fno-builtin-[a-z_]+||g' \
+		${WRKSRC}/Makefile.in
+.endif
 .if empty(PORT_OPTIONS:MDOCS)
 	${REINPLACE_CMD} -e \
 		'/^install-data-am:/ s|install-dist_docDATA||' \
@@ -54,13 +75,4 @@ post-install:
 check: build
 	cd ${WRKSRC} && ${SETENV} ${MAKE_ENV} ${MAKE} ${MAKE_FLAGS} ${MAKEFILE} ${MAKE_ARGS} check
 
-.include <bsd.port.pre.mk>
-
-.if ${ARCH} == "amd64"
-CONFIGURE_ARGS+=--enable-frame-pointers
-.endif
-.if ${ARCH} == "ia64" || ${ARCH} == "powerpc" || ${ARCH} == "sparc64"
-BROKEN=	Does not build, assembly not supported, see PR-94: http://code.google.com/p/google-perftools/issues/detail?id=94&can=1
-.endif
-
 .include <bsd.port.post.mk>



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201401152207.s0FM7iXh048853>