ports/172101: [PATCH] imake build error with clang-cpp

Oliver Pinter oliver.pntr at gmail.com
Wed Sep 26 22:00:18 UTC 2012


>Number:         172101
>Category:       ports
>Synopsis:       [PATCH] imake build error with clang-cpp
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed Sep 26 22:00:17 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Oliver Pinter
>Release:        FreeBSD 10-CURRENT
>Organization:
>Environment:
FreeBSD pandora-test 10.0-CURRENT FreeBSD 10.0-CURRENT #2 r+e17c996: Tue Sep 25 20:02:51 CEST 2012     root at pandora-test:/usr/obj/usr/src/sys/OP  amd64
>Description:
imake build error (broken autoconf preprocessor test) when using clang as base c compiler (WITH_CLANG_IS_CC= in src.conf)
>How-To-Repeat:

>Fix:


Patch attached with submission follows:

diff --git a/devel/imake/Makefile b/devel/imake/Makefile
index 22ef025..c2f5f19 100644
--- a/devel/imake/Makefile
+++ b/devel/imake/Makefile
@@ -43,13 +43,16 @@ post-patch:
 
 # clang's cpp destroys whitespace, particularly hard tabs in makefiles,
 # which is fatal for imake.
-.if defined(CC) && ${CC} == "clang"
-BUILD_DEPENDS+=	ucpp:${PORTSDIR}/devel/ucpp
-RUN_DEPENDS+=	ucpp:${PORTSDIR}/devel/ucpp
-CONFIGURE_ENV+=	ac_cv_path_RAWCPP="ucpp -s"
+CPP_check!=	${CPP} --version | tr -d '()'
+.if ${CPP_check:Mclang}
+.if exists(/usr/bin/gcpp)
+CONFIGURE_ENV+=	ac_cv_path_RAWCPP="gcpp"
 
 post-build:
 	${REINPLACE_CMD} -e 's|^configdirspec= *|configdirspec=|' ${WRKSRC}/xmkmf
+.else
+BROKEN=         does not build without gcc cpp
+.endif
 .endif
 
 .include <bsd.port.post.mk>


>Release-Note:
>Audit-Trail:
>Unformatted:



More information about the freebsd-ports-bugs mailing list