Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 25 Dec 2011 13:02:09 GMT
From:      Panagiotis Christias <p.christias@noc.ntua.gr>
To:        freebsd-gnats-submit@FreeBSD.org
Subject:   ports/163606: [patch] lang/v8: make sure that CFLAGS always contains -fno-strict-aliasing
Message-ID:  <201112251302.pBPD295w021171@red.freebsd.org>
Resent-Message-ID: <201112251310.pBPDACq5065297@freefall.freebsd.org>

next in thread | raw e-mail | index | archive | help

>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@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:



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