ports/169231: [patch] Fix build for www/firefox using CLANG

Kevin Zheng kevinz5000 at gmail.com
Tue Jun 19 04:00:33 UTC 2012


>Number:         169231
>Category:       ports
>Synopsis:       [patch] Fix build for www/firefox using CLANG
>Confidential:   no
>Severity:       serious
>Priority:       low
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Tue Jun 19 04:00:32 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Kevin Zheng
>Release:        9.0-RELEASE
>Organization:
>Environment:
FreeBSD sigma.local 9.0-RELEASE-p3 FreeBSD 9.0-RELEASE-p3 #0: Tue Jun 12 01:47:53 UTC 2012     root at i386-builder.daemonology.net:/usr/obj/usr/src/sys/GENERIC  i386
>Description:
FreeBSD is moving to the CLANG/LLVM compiler. Firefox currently fails to build using CLANG, complaining that "MMX instruction set not enabled". CLANG seems to treat MMX and SSE separately, and MMX must be explicitly added in CFLAGS. See the following link for more details:

http://www.mail-archive.com/freebsd-ports@freebsd.org/msg41830.html
>How-To-Repeat:
Add the following to /etc/make.conf:
CC=clang
CXX=clang++
CPP=clang-cpp

Attempt to build www/firefox (it doesn't work).
>Fix:
Apply the following patch, if it makes sense. I'm not good with conditional makefiles.

Patch attached with submission follows:

diff -ruN /usr/ports/www/firefox/Makefile firefox/Makefile
--- /usr/ports/www/firefox/Makefile	2012-06-18 22:45:40.000000000 -0500
+++ firefox/Makefile	2012-06-18 22:49:20.000000000 -0500
@@ -60,6 +60,8 @@
 
 .if empty(CXX:M*clang++*) && ${OSVERSION} > 900000
 USE_GCC=	4.6+
+.else
+CFLAGS+=	-mmmx
 .endif
 
 WRKSRC:=	${WRKDIR}/mozilla-release


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



More information about the freebsd-ports-bugs mailing list