From naddy@mips.inka.de  Sun Sep  2 14:29:34 2012
Return-Path: <naddy@mips.inka.de>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 4A105106566B;
	Sun,  2 Sep 2012 14:29:34 +0000 (UTC)
	(envelope-from naddy@mips.inka.de)
Received: from mail-in-04.arcor-online.net (mail-in-04.arcor-online.net [151.189.21.44])
	by mx1.freebsd.org (Postfix) with ESMTP id F25CD8FC08;
	Sun,  2 Sep 2012 14:29:33 +0000 (UTC)
Received: from mail-in-19-z2.arcor-online.net (mail-in-19-z2.arcor-online.net [151.189.8.36])
	by mx.arcor.de (Postfix) with ESMTP id CFFD3AAEE6;
	Sun,  2 Sep 2012 15:58:53 +0200 (CEST)
Received: from mail-in-16.arcor-online.net (mail-in-16.arcor-online.net [151.189.21.56])
	by mail-in-19-z2.arcor-online.net (Postfix) with ESMTP id D04933F83C3;
	Sun,  2 Sep 2012 15:58:53 +0200 (CEST)
Received: from lorvorc.mips.inka.de (dslb-188-098-176-209.pools.arcor-ip.net [188.98.176.209])
	by mail-in-16.arcor-online.net (Postfix) with ESMTPS id ACAEC94AA;
	Sun,  2 Sep 2012 15:58:53 +0200 (CEST)
Received: from lorvorc.mips.inka.de (localhost [127.0.0.1])
	by lorvorc.mips.inka.de (8.14.5/8.14.3) with ESMTP id q82DwrOF082360;
	Sun, 2 Sep 2012 15:58:53 +0200 (CEST)
	(envelope-from naddy@lorvorc.mips.inka.de)
Received: (from naddy@localhost)
	by lorvorc.mips.inka.de (8.14.5/8.14.5/Submit) id q82DwrGU082359;
	Sun, 2 Sep 2012 15:58:53 +0200 (CEST)
	(envelope-from naddy)
Message-Id: <201209021358.q82DwrGU082359@lorvorc.mips.inka.de>
Date: Sun, 2 Sep 2012 15:58:53 +0200 (CEST)
From: Christian Weisgerber <naddy@freebsd.org>
Reply-To: Christian Weisgerber <naddy@freebsd.org>
To: FreeBSD-gnats-submit@freebsd.org
Cc: flo@freebsd.org
Subject: Fix www/firefox on FreeBSD 7.4/amd64
X-Send-Pr-Version: 3.113
X-GNATS-Notify:

>Number:         171255
>Category:       ports
>Synopsis:       Fix www/firefox on FreeBSD 7.4/amd64
>Confidential:   no
>Severity:       non-critical
>Priority:       medium
>Responsible:    gecko
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Sun Sep 02 14:30:10 UTC 2012
>Closed-Date:    Sat Feb 23 23:05:25 UTC 2013
>Last-Modified:  Sat Feb 23 23:05:25 UTC 2013
>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:
Responsible-Changed-From-To: freebsd-ports-bugs->gecko 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Sun Sep 2 14:30:58 UTC 2012 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

http://www.freebsd.org/cgi/query-pr.cgi?pr=171255 

From: dfilter@FreeBSD.ORG (dfilter service)
To: bug-followup@FreeBSD.org
Cc:  
Subject: Re: ports/171255: commit references a PR
Date: Mon,  3 Sep 2012 21:16:11 +0000 (UTC)

 Author: flo
 Date: Mon Sep  3 21:16:00 2012
 New Revision: 303621
 URL: http://svn.freebsd.org/changeset/ports/303621
 
 Log:
   - fix build of www/firefox, www/seamonkey and mail/thunderbird on stable/7 after
     r219639 which MFC'd SSSE3 instruction set to gcc but not to gas. Configure
     picks up SSSE3 support in gcc but linking fails with
   
   {standard input}:283: Error: no such instruction: `pmaddubsw %xmm2,%xmm3'
   {standard input}:400: Error: no such instruction: `pmaddubsw %xmm0,%xmm1'
   {standard input}:544: Error: no such instruction: `pmaddubsw %xmm0,%xmm1'
   
   PR:		ports/171255
   Submitted by:	naddy, Jan Beich <jbeich@tormail.org>
 
 Added:
   head/mail/thunderbird/files/patch-bug786995   (contents, props changed)
   head/www/firefox/files/patch-bug786995   (contents, props changed)
   head/www/seamonkey/files/patch-bug786995   (contents, props changed)
 
 Added: head/mail/thunderbird/files/patch-bug786995
 ==============================================================================
 --- /dev/null	00:00:00 1970	(empty, because file is newly added)
 +++ head/mail/thunderbird/files/patch-bug786995	Mon Sep  3 21:16:00 2012	(r303621)
 @@ -0,0 +1,36 @@
 +# Bug 786995 - configure should check for SSSE3 support in the whole toolchain
 +
 +--- mozilla/configure.in.orig	2012-09-02 00:37:29.000000000 +0200
 ++++ mozilla/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
 +--- mozilla/gfx/skia/Makefile.in.orig	2012-09-02 00:39:00.000000000 +0200
 ++++ mozilla/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
 
 Added: head/www/firefox/files/patch-bug786995
 ==============================================================================
 --- /dev/null	00:00:00 1970	(empty, because file is newly added)
 +++ head/www/firefox/files/patch-bug786995	Mon Sep  3 21:16:00 2012	(r303621)
 @@ -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
 
 Added: head/www/seamonkey/files/patch-bug786995
 ==============================================================================
 --- /dev/null	00:00:00 1970	(empty, because file is newly added)
 +++ head/www/seamonkey/files/patch-bug786995	Mon Sep  3 21:16:00 2012	(r303621)
 @@ -0,0 +1,36 @@
 +# Bug 786995 - configure should check for SSSE3 support in the whole toolchain
 +
 +--- mozilla/configure.in.orig	2012-09-02 00:37:29.000000000 +0200
 ++++ mozilla/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
 +--- mozilla/gfx/skia/Makefile.in.orig	2012-09-02 00:39:00.000000000 +0200
 ++++ mozilla/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
 _______________________________________________
 svn-ports-all@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/svn-ports-all
 To unsubscribe, send any mail to "svn-ports-all-unsubscribe@freebsd.org"
 
State-Changed-From-To: open->patched 
State-Changed-By: flo 
State-Changed-When: Mon Sep 3 22:34:02 UTC 2012 
State-Changed-Why:  
Patched. Awaiting further discussion of possible MFCs to stable/7. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=171255 
State-Changed-From-To: patched->closed 
State-Changed-By: flo 
State-Changed-When: Sat Feb 23 23:05:24 UTC 2013 
State-Changed-Why:  
Close this PR as a MFC to stable/7 is very unlikely at this point. 

http://www.freebsd.org/cgi/query-pr.cgi?pr=171255 
>Unformatted:
