ports/115694: devel/gccxml won't compile on 7.0 due to new restrictions on casting lvalues
Coleman Kane
cokane at FreeBSD.org
Tue Aug 21 21:00:04 UTC 2007
>Number: 115694
>Category: ports
>Synopsis: devel/gccxml won't compile on 7.0 due to new restrictions on casting lvalues
>Confidential: no
>Severity: serious
>Priority: medium
>Responsible: freebsd-ports-bugs
>State: open
>Quarter:
>Keywords:
>Date-Required:
>Class: sw-bug
>Submitter-Id: current-users
>Arrival-Date: Tue Aug 21 21:00:03 GMT 2007
>Closed-Date:
>Last-Modified:
>Originator: Coleman Kane
>Release: 7.0-CURRENT
>Organization:
>Environment:
FreeBSD erwin 7.0-CURRENT FreeBSD 7.0-CURRENT #0: Tue Aug 21 15:50:58 EDT 2007 root at erwin:/usr/obj/usr/src/sys/ERWIN amd64
>Description:
When FreeBSD 7.0 was moved to GCC 4.2.0, the port devel/gccxml was broken. This was due to a compiler restriction that no longer allows the following constructs:
*((int*)not_int_array_ptr)++;
The new compiler rules do not allow for casted types to be lvalues. Rather, you must cast the rvalue to the type of the lvalue to get it to compile.
In addition, as added severity, the WITH_PYSTE option to devel/boost depends upon devel/gccxml.
>How-To-Repeat:
cd /usr/ports/devel/gccxml && make
>Fix:
Attached patch that forces the compiler to be GCC 3.4 where OSVERSION >= 700000, rather than BROKENing it on that arch.
Patch attached with submission follows:
--- Makefile.orig 2007-08-21 16:50:27.000000000 -0400
+++ Makefile 2007-08-21 16:42:09.000000000 -0400
@@ -31,6 +31,7 @@
${REINPLACE_CMD} -e "s,x86_64,amd64," \
${WRKSRC}/../gccxml-0.6.0/GCC/gcc/config.gcc
cd ${WRKSRC} && \
+ ${SETENV} ${CONFIGURE_ENV} \
${LOCALBASE}/bin/cmake ../${DISTNAME} -DCMAKE_INSTALL_PREFIX:PATH=${PREFIX} \
-DGCCXML_MAN_DIR:PATH="/man"
@@ -39,7 +40,16 @@
.if ${ARCH} == "alpha"
BROKEN= Build fails on alpha
.elif ${OSVERSION} >= 700000
-BROKEN= Does not compile
+# GCC-XML has some constructs that GCC 4.2 does not like. Namely,
+# the use of casted-pointer-dereferences as an lvalue to post-increment
+# operations.
+USE_GCC= 3.4
+CONFIGURE_ENV+= CC=${LOCALBASE}/bin/gcc34 \
+ CPP="${CC} -E" \
+ CXX=${LOCALBASE}/bin/g++34
+MAKE_ENV+= CC=${LOCALBASE}/bin/gcc34 \
+ CPP="${CC} -E" \
+ CXX=${LOCALBASE}/bin/g++34
.endif
.include <bsd.port.post.mk>
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list