From nobody@FreeBSD.org  Wed May 30 16:35:09 2012
Return-Path: <nobody@FreeBSD.org>
Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34])
	by hub.freebsd.org (Postfix) with ESMTP id 7DD9A106566B
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 30 May 2012 16:35:09 +0000 (UTC)
	(envelope-from nobody@FreeBSD.org)
Received: from red.freebsd.org (red.freebsd.org [IPv6:2001:4f8:fff6::22])
	by mx1.freebsd.org (Postfix) with ESMTP id 68B6B8FC15
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 30 May 2012 16:35:09 +0000 (UTC)
Received: from red.freebsd.org (localhost [127.0.0.1])
	by red.freebsd.org (8.14.4/8.14.4) with ESMTP id q4UGZ99F015979
	for <freebsd-gnats-submit@FreeBSD.org>; Wed, 30 May 2012 16:35:09 GMT
	(envelope-from nobody@red.freebsd.org)
Received: (from nobody@localhost)
	by red.freebsd.org (8.14.4/8.14.4/Submit) id q4UGZ9xW015973;
	Wed, 30 May 2012 16:35:09 GMT
	(envelope-from nobody)
Message-Id: <201205301635.q4UGZ9xW015973@red.freebsd.org>
Date: Wed, 30 May 2012 16:35:09 GMT
From: Jacques <jacquescale@clovermail.net>
To: freebsd-gnats-submit@FreeBSD.org
Subject: chromium-19.0.1084.52 fails to compile without SSSE3 support
X-Send-Pr-Version: www-3.1
X-GNATS-Notify:

>Number:         168470
>Category:       ports
>Synopsis:       [PATCH] www/chromium version 19.0.1084.52 fails to compile without SSSE3 support
>Confidential:   no
>Severity:       serious
>Priority:       medium
>Responsible:    freebsd-chromium
>State:          closed
>Quarter:        
>Keywords:       
>Date-Required:  
>Class:          sw-bug
>Submitter-Id:   current-users
>Arrival-Date:   Wed May 30 16:40:01 UTC 2012
>Closed-Date:    Fri Aug 10 12:59:08 UTC 2012
>Last-Modified:  Fri Aug 10 12:59:08 UTC 2012
>Originator:     Jacques
>Release:        9-STABLE
>Organization:
>Environment:
FreeBSD thor.my.domain 9.0-STABLE FreeBSD 9.0-STABLE #97: Mon May 28 15:41:45 UTC 2012     root@thor.my.domain:/usr/obj/usr/src/sys/CUSTOM  i386
>Description:
Latest chromium need SSSE3 support to compile skia library.

See the following links:

http://git.chromium.org/gitweb/?p=chromium.git;a=commitdiff;h=4b118079fbed5eb9cb682f230c23ebe887d61087

http://git.chromium.org/gitweb/?p=external/skia.git;a=blobdiff;f=src/opts/opts_check_SSE2.cpp;h=1d3ed845293de33e9cdcf8e7cc6c209211913af7;hp=5b59837518abeaa27c21024876100250f87fe54f;hb=c197dbf99eb3cad88264f5000325cdfd3095584b;hpb=9333255e5e322d5e78ddc6f961398fb46b9cdbc3
>How-To-Repeat:

>Fix:
Those patches fix the problem for me:

--- Makefile.orig	2012-05-30 13:56:21.000000000 +0000
+++ Makefile	2012-05-30 13:57:37.000000000 +0000
@@ -115,6 +115,10 @@
 GYP_DEFINES+=	disable_sse2=1
 .endif
 
+.if ! ${MACHINE_CPU:Mssse3}
+GYP_DEFINES+=	disable_ssse3=1
+.endif
+
 .if !defined(WITH_GCC46) && !defined(WITH_CLANG)
 IGNORE=	does not compile with base gcc
 .endif


--- build/common.gypi.orig	2012-05-23 01:50:12.000000000 +0000
+++ build/common.gypi	2012-05-30 14:19:28.000000000 +0000
@@ -509,6 +509,12 @@
     # able to turn it off for various reasons.
     'linux_disable_pie%': 0,
 
+    'os_ver%': 0,
+    'prefix_dir%': '/usr',
+    'use_system_tcmalloc%': 0,
+    'use_system_libjpeg%': 0,
+    'disable_ssse3%': 0,
+
     # The release channel that this build targets. This is used to restrict
     # channel-specific build options, like which installer packages to create.
     # The default is 'all', which does no channel-specific filtering.
@@ -739,7 +745,7 @@
         # This is used to tweak build flags for gcc 4.4.
         'gcc_version%': '<!(python <(DEPTH)/build/compiler_version.py)',
         # Figure out the python architecture to decide if we build pyauto.
-        'python_arch%': '<!(<(DEPTH)/build/linux/python_arch.sh <(sysroot)/usr/<(system_libdir)/libpython<(python_ver).so.1.0)',
+        'python_arch%': '<!(<(DEPTH)/build/linux/python_arch.sh <(sysroot)<(prefix_dir)/lib/libpython<(python_ver).so.1)',
         'conditions': [
           ['branding=="Chrome"', {
             'linux_breakpad%': 1,
@@ -2172,6 +2178,22 @@
         'ldflags': [
           '-Wl,--no-keep-memory',
         ],
+        'ldflags!': [
+          '-ldl',
+          '-pie',
+        ],
+        'libraries!': [
+          '-ldl',
+        ],
+        'conditions': [
+          ['gcc_version == 42', {
+            'cflags!': [
+              '-mssse3',
+              '-fno-signed-zeros',
+              '-Wno-unused-result',
+            ],
+          }],
+        ],
       },
     }],
     # Android-specific options; note that most are set above with Linux.


--- skia/skia.gyp.orig	2012-05-30 14:24:45.000000000 +0000
+++ skia/skia.gyp	2012-05-30 14:42:27.000000000 +0000
@@ -1089,8 +1089,13 @@
             '../third_party/skia/src/opts/SkBlitRow_opts_SSE2.cpp',
             '../third_party/skia/src/opts/SkUtils_opts_SSE2.cpp',
           ],
-          'dependencies': [
-            'skia_opts_ssse3',
+          'conditions': [
+            # Enable SSSE3 only if we have support
+            [ 'disable_ssse3 == "0"', {
+              'dependencies': [
+                'skia_opts_ssse3',
+              ],
+            }],
           ],
         },
         {  # arm


--- third_party/skia/src/opts/opts_check_SSE2.cpp.orig	2012-05-29 08:41:47.000000000 +0000
+++ third_party/skia/src/opts/opts_check_SSE2.cpp	2012-05-29 08:44:27.000000000 +0000
@@ -88,6 +88,7 @@
 
 void SkBitmapProcState::platformProcs() {
     if (cachedHasSSSE3()) {
+#if defined (__SSSE3__)
         if (fSampleProc32 == S32_opaque_D32_filter_DX) {
             fSampleProc32 = S32_opaque_D32_filter_DX_SSSE3;
         } else if (fSampleProc32 == S32_alpha_D32_filter_DX) {
@@ -99,6 +100,7 @@
         } else if (fSampleProc32 == S32_alpha_D32_filter_DXDY) {
             fSampleProc32 = S32_alpha_D32_filter_DXDY_SSSE3;
         }
+#endif
     } else if (cachedHasSSE2()) {
         if (fSampleProc32 == S32_opaque_D32_filter_DX) {
             fSampleProc32 = S32_opaque_D32_filter_DX_SSE2;



>Release-Note:
>Audit-Trail:
Responsible-Changed-From-To: freebsd-ports-bugs->freebsd-chromium 
Responsible-Changed-By: edwin 
Responsible-Changed-When: Thu May 31 06:20:51 UTC 2012 
Responsible-Changed-Why:  
Over to maintainer (via the GNATS Auto Assign Tool) 

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

From: =?ISO-8859-1?Q?Ren=E9_Ladan?= <rene@freebsd.org>
To: bug-followup@freebsd.org, jacquescale@clovermail.net
Cc:  
Subject: Re: ports/168470: [PATCH] www/chromium version 19.0.1084.52 fails to
 compile without SSSE3 support
Date: Thu, 31 May 2012 11:54:58 +0200

 Alternatively to these patches, does the patch at
 http://trillian.chruetertee.ch/chromium/changeset/342
 work for you? That patch fixes the build on my non-SSSE3-i386 tinderbox.

From: Jaques <jacquescale@clovermail.net>
To: =?ISO-8859-1?Q?Ren=E9?= Ladan <rene@freebsd.org>
Cc: bug-followup@freebsd.org
Subject: Re: ports/168470: [PATCH] www/chromium version 19.0.1084.52 fails
 to compile without SSSE3 support
Date: Thu, 31 May 2012 15:38:10 +0200

 Works successfully with clang.
 
 Thanks a lot
 
 On Thu, 2012-05-31 at 11:54 +0200, René Ladan wrote:
 > Alternatively to these patches, does the patch at
 > http://trillian.chruetertee.ch/chromium/changeset/342
 > work for you? That patch fixes the build on my non-SSSE3-i386 tinderbox.
 > 
 
 
 
 -------------------------------------------------
 This message sent via VFEmail.net
 http://www.vfemail.net
 $14.95 Lifetime accounts!  15GB disk!  
 Commercial Mail Options!   No bandwidth quotas!
  

From: Jacques Cale <jacquescale@gmail.com>
To: bug-followup@FreeBSD.org, jacquescale@clovermail.net
Cc:  
Subject: Re: ports/168470: [PATCH] www/chromium version 19.0.1084.52 fails
 to compile without SSSE3 support
Date: Mon, 23 Jul 2012 14:48:17 +0200

 I think you can close this PR
 
State-Changed-From-To: open->closed 
State-Changed-By: rene 
State-Changed-When: Fri Aug 10 12:58:17 UTC 2012 
State-Changed-Why:  
Closed at submitters request 

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