ports/163606: [patch] lang/v8: make sure that CFLAGS always contains -fno-strict-aliasing
Panagiotis Christias
p.christias at noc.ntua.gr
Sun Dec 25 13:10:12 UTC 2011
>Number: 163606
>Category: ports
>Synopsis: [patch] lang/v8: make sure that CFLAGS always contains -fno-strict-aliasing
>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: Sun Dec 25 13:10:11 UTC 2011
>Closed-Date:
>Last-Modified:
>Originator: Panagiotis Christias
>Release: 7.4-amd64
>Organization:
NTUA NOC
>Environment:
FreeBSD builder7-amd64.noc.ntua.gr 7.4-RELEASE FreeBSD 7.4-RELEASE #0: Tue Apr 5 14:05:40 EEST 2011 root at thetis.noc.ntua.gr:/usr/obj/usr/src/sys/NTUA amd64
>Description:
lang/v8 needs -fno-strict-aliasing to compile properly, so if CFLAGS is defined outside the port's Makefile (e.g. in /etc/make.conf) and does not contain -fno-strict-aliasing then default value of CFLAGS gets overwritten and building fails.
Merry Christmas,
Panagiotis
>How-To-Repeat:
Have something like "CFLAGS=-O -pipe" and try to build lang/v8:
# echo "CFLAGS=-O -pipe" >> /etc/make.conf
# cd /usr/ports/lang/v8
# make
>Fix:
See attached patch (could be done in a better way i suppose).
Patch attached with submission follows:
--- /usr/ports/lang/v8//Makefile.orig 2011-11-03 17:13:14.000000000 +0200
+++ /usr/ports/lang/v8//Makefile 2011-12-25 13:35:46.000000000 +0200
@@ -48,6 +48,14 @@
.elif ${ARCH} == amd64
V8ARCH=x64
.endif
+
+.if defined(CFLAGS)
+CFLAGS:= ${CFLAGS:C/-fstrict-aliasing//}
+.if empty(CFLAGS:M-fno-strict-aliasing)
+CFLAGS+= -fno-strict-aliasing
+.endif
+.endif
+
PLIST_SUB+= ARCH=${V8ARCH}
SCONS_ARGS+= arch=${V8ARCH}
SCONS_BUILDENV+= CC="${CC} ${CFLAGS}" CXX="${CXX} ${CXXFLAGS}"
>Release-Note:
>Audit-Trail:
>Unformatted:
More information about the freebsd-ports-bugs
mailing list