Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 2 Sep 2012 15:58:53 +0200 (CEST)
From:      Christian Weisgerber <naddy@FreeBSD.org>
To:        FreeBSD-gnats-submit@FreeBSD.org
Cc:        flo@FreeBSD.org
Subject:   ports/171255: Fix www/firefox on FreeBSD 7.4/amd64
Message-ID:  <201209021358.q82DwrGU082359@lorvorc.mips.inka.de>
Resent-Message-ID: <201209021430.q82EUAi6032414@freefall.freebsd.org>

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

>Number:         171255
>Category:       ports
>Synopsis:       Fix www/firefox on FreeBSD 7.4/amd64
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    freebsd-ports-bugs
>State:          open
>Quarter:        
>Keywords:       
>Date-Required:
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Sep 02 14:30:10 UTC 2012
>Closed-Date:
>Last-Modified:
>Originator:     Christian Weisgerber
>Release:        FreeBSD 7.4-STABLE amd64
>Organization:
>Environment:
System: FreeBSD lorvorc.mips.inka.de 7.4-STABLE FreeBSD 7.4-STABLE #0 r239672: Sat Aug 25 13:11:54 CEST 2012 naddy@lorvorc.mips.inka.de:/usr/obj/usr/src/sys/GENERIC amd64

>Description:

www/firefox fails to build on 7.4-STABLE/amd64, because the old
as(1) from binutils 2.15 does not support SSE3 instructions.

The patch below, adapted from
https://bugzilla.mozilla.org/show_bug.cgi?id=786995
fixes this.

Presumably this is also required for other ports of the Mozilla
family.

>How-To-Repeat:

>Fix:

Index: files/patch-bug786995
===================================================================
--- files/patch-bug786995	(revision 0)
+++ files/patch-bug786995	(working copy)
@@ -0,0 +1,36 @@
+# Bug 786995 - configure should check for SSSE3 support in the whole toolchain
+
+--- configure.in.orig	2012-09-02 00:37:29.000000000 +0200
++++ configure.in	2012-09-02 00:38:50.000000000 +0200
+@@ -1710,15 +1710,15 @@
+     _MOZ_RTTI_FLAGS_OFF=-fno-rtti
+ 
+     # Check for -mssse3 on $CC
+-    AC_MSG_CHECKING([for -mssse3 option to $CC])
+-    HAVE_COMPILER_FLAG_MSSSE3=
++    AC_MSG_CHECKING([if toolchain supports -mssse3 option])
++    HAVE_TOOLCHAIN_SUPPORT_MSSSE3=
+     _SAVE_CFLAGS=$CFLAGS
+     CFLAGS="$CFLAGS -mssse3"
+-    AC_TRY_COMPILE(,,AC_MSG_RESULT([yes])
+-                     [HAVE_COMPILER_FLAG_MSSSE3=1],
++    AC_TRY_COMPILE([asm ("pmaddubsw %xmm2,%xmm3");],,AC_MSG_RESULT([yes])
++                     [HAVE_TOOLCHAIN_SUPPORT_MSSSE3=1],
+                      AC_MSG_RESULT([no]))
+     CFLAGS=$_SAVE_CFLAGS
+-    AC_SUBST(HAVE_COMPILER_FLAG_MSSSE3)
++    AC_SUBST(HAVE_TOOLCHAIN_SUPPORT_MSSSE3)
+ 
+     # Turn on GNU-specific warnings:
+     # -Wall - turn on a lot of warnings
+--- gfx/skia/Makefile.in.orig	2012-09-02 00:39:00.000000000 +0200
++++ gfx/skia/Makefile.in	2012-09-02 00:39:21.000000000 +0200
+@@ -365,7 +365,7 @@
+ 	SkUtils_opts_SSE2.cpp \
+ 	opts_check_SSE2.cpp \
+ 	$(NULL)
+-ifdef HAVE_COMPILER_FLAG_MSSSE3
++ifdef HAVE_TOOLCHAIN_SUPPORT_MSSSE3
+ DEFINES += -DSK_BUILD_SSSE3
+ CPPSRCS += SkBitmapProcState_opts_SSSE3.cpp
+ endif

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



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