GNU bug report logs - #51863
[PATCH] gnu: webkitgtk: Really disable SSE2 on i686-linux.

Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.

Package: guix-patches; Reported by: Diego Nicola Barbato <dnbarbato@HIDDEN>; Keywords: patch; Done: Maxim Cournoyer <maxim.cournoyer@HIDDEN>; Maintainer for guix-patches is guix-patches@HIDDEN.

Message received at 51863-done <at> debbugs.gnu.org:


Received: (at 51863-done) by debbugs.gnu.org; 26 Nov 2021 04:16:02 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Thu Nov 25 23:16:01 2021
Received: from localhost ([127.0.0.1]:58414 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mqSeX-0000IA-Mu
	for submit <at> debbugs.gnu.org; Thu, 25 Nov 2021 23:16:01 -0500
Received: from mail-qt1-f174.google.com ([209.85.160.174]:43578)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <maxim.cournoyer@HIDDEN>) id 1mqSeT-0000AG-Hi
 for 51863-done <at> debbugs.gnu.org; Thu, 25 Nov 2021 23:16:00 -0500
Received: by mail-qt1-f174.google.com with SMTP id q14so7867397qtx.10
 for <51863-done <at> debbugs.gnu.org>; Thu, 25 Nov 2021 20:15:57 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=from:to:cc:subject:references:date:in-reply-to:message-id
 :user-agent:mime-version;
 bh=5Kj99Xxmk07Fhn/fZ5+boYva4x9IKY1LYzktE6LFOm4=;
 b=pX8/iVNwlYka61EQlEGC8BXtUdFVRwQZqzXg4W2bCa65mwfxOhHMaal6Uy52bZMSwb
 XEkvLsWbgSLzVUIJQkdAmeFEqpHF1r9XZzWgegnhiy6GMYbl1gFg7BAqbW+UabfJD2Rk
 UwPJ93Cmu3p1P7IrymiuPZATEexkCHnSLRvbsmO58EZG0ZzykMArzIy5ojgh6U3UwF+u
 ysTOoJONbFwshOgV+t0JT4w8HPgZdPWr5tbVF29UM79dlWtz4DEzIwsXFoKAzvdrhpcT
 OKYTM1zpg0Nug+vWNZAW0SINuHyI12YHCHcBloN58df3wPxfuY0PWyjj6Fx91JMZqDUf
 3AWQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:from:to:cc:subject:references:date:in-reply-to
 :message-id:user-agent:mime-version;
 bh=5Kj99Xxmk07Fhn/fZ5+boYva4x9IKY1LYzktE6LFOm4=;
 b=tVMetLrjxlQJC3UMWDaBkSmNO8roKbySxJCxqqj/14sY7XcJcrkUMtWUzV8/bOyMfo
 GY68Aj8/31e2qGvpizGkEUG7gFQ+9QhtDua2ziAK1vY1flkUmPqPatLKJUJYlIME9We7
 i0jaVuQiABVzF7ST/pVrSLFBdUzeMxkYNAjy779q//lx58DgTOtLK6tP/ygIXR89mvBo
 BvUO+22lk0lONrsVgCcIwti1H7KjKjw92PRzj1m7JtpL/9rYJFRJJVOxN70wLL+yPdpw
 cutXrkTpUJmit5slyDtA5joYnBd6BLfvOCzmFM/WR7/rsKRQ4NxSeqTLILpgbXTsBdqi
 Ksfw==
X-Gm-Message-State: AOAM532O5Ky8j5RbsEApsz73CuN5VxB4Ci0icwTwMXYpEYIDDYbfC80a
 2os6Lrrq3O2l7iI3QFAPZAY=
X-Google-Smtp-Source: ABdhPJyzEVlSQPPz9E2vb7a2H8Ef/oQ2adVKFzIGzFl2kqAt5PYegmhrn7qHI2iOI9Nh+CmJpWSIKg==
X-Received: by 2002:a05:622a:453:: with SMTP id
 o19mr14112091qtx.648.1637900151999; 
 Thu, 25 Nov 2021 20:15:51 -0800 (PST)
Received: from hurd ([207.35.95.55])
 by smtp.gmail.com with ESMTPSA id v1sm2762224qtw.65.2021.11.25.20.15.48
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Thu, 25 Nov 2021 20:15:51 -0800 (PST)
From: Maxim Cournoyer <maxim.cournoyer@HIDDEN>
To: Liliana Marie Prikler <liliana.prikler@HIDDEN>
Subject: Re: bug#51863: [PATCH] gnu: webkitgtk: Really disable SSE2 on
 i686-linux.
References: <87a6i5fyi4.fsf@HIDDEN>
 <26974778c8ed5f0b9796e26d60caf4fa8f223335.camel@HIDDEN>
Date: Thu, 25 Nov 2021 23:15:41 -0500
In-Reply-To: <26974778c8ed5f0b9796e26d60caf4fa8f223335.camel@HIDDEN>
 (Liliana Marie Prikler's message of "Mon, 15 Nov 2021 20:29:33 +0100")
Message-ID: <87wnkv8scy.fsf_-_@HIDDEN>
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/27.2 (gnu/linux)
MIME-Version: 1.0
Content-Type: text/plain
X-Spam-Score: -0.0 (/)
X-Debbugs-Envelope-To: 51863-done
Cc: Mark H Weaver <mhw@HIDDEN>, Leo Famulari <leo@HIDDEN>,
 51863-done <at> debbugs.gnu.org, Diego Nicola Barbato <dnbarbato@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hello,

Fixed with a variant of Diego's patch in d13d5f3141 on master and
68d47844b1 on core-updates-frozen.

Thanks a lot!

Closing.

Maxim




Notification sent to Diego Nicola Barbato <dnbarbato@HIDDEN>:
bug acknowledged by developer. Full text available.
Reply sent to Maxim Cournoyer <maxim.cournoyer@HIDDEN>:
You have taken responsibility. Full text available.

Message received at 51863 <at> debbugs.gnu.org:


Received: (at 51863) by debbugs.gnu.org; 15 Nov 2021 19:29:44 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 15 14:29:44 2021
Received: from localhost ([127.0.0.1]:56208 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mmhfk-0006r8-7M
	for submit <at> debbugs.gnu.org; Mon, 15 Nov 2021 14:29:44 -0500
Received: from mail-wr1-f68.google.com ([209.85.221.68]:40487)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <liliana.prikler@HIDDEN>) id 1mmhfi-0006qq-0j
 for 51863 <at> debbugs.gnu.org; Mon, 15 Nov 2021 14:29:42 -0500
Received: by mail-wr1-f68.google.com with SMTP id r8so32738406wra.7
 for <51863 <at> debbugs.gnu.org>; Mon, 15 Nov 2021 11:29:41 -0800 (PST)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112;
 h=message-id:subject:from:to:cc:date:in-reply-to:references
 :user-agent:mime-version:content-transfer-encoding;
 bh=oU9kL9oxQQPrBZ3ALEDO1SIc8qKt+NgWBHBJ1NOUPAI=;
 b=JyCuYI9MuOkC1ddf+gDT33t02tjCoPooKB3MSniQDczC/I0gTuLbehTH+baiA0ZaWz
 q+cruRUTicAUTFT0Yp8LPTvaIygc/L/ob8Era7PlMTNY3N7vjpnkyl1XRihXKZrtyCSn
 sMCmtbjoCScxB/lXHIx+zwb7H4+YWrYUN8gd4MO8TfoOVfu1jjXnWrgRNYDN3aB7RxUF
 bke1D/4xIZVong6tRFDJoLplezTqsEVHAdn7iFYPpB6tFU1cy5DT7drQvCgYQn8tQzBJ
 dvxqZrmEcE0PDCoAutE4u60uSArlguQUwIi7RXLxNtctGG/IP0yf4gcHmd+1Lq1PjZTd
 qEZQ==
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
 d=1e100.net; s=20210112;
 h=x-gm-message-state:message-id:subject:from:to:cc:date:in-reply-to
 :references:user-agent:mime-version:content-transfer-encoding;
 bh=oU9kL9oxQQPrBZ3ALEDO1SIc8qKt+NgWBHBJ1NOUPAI=;
 b=a9ytWZ3XCsh74aRZ0tingj8E3nIH+5xVyRV0VlK9P/a34zyZp5HrquisasSf4B4PDK
 K7ET7ESFH0gPZxtzdHF9ipHY9n/12rHMivJWJF+ortI1nSozotP7IHw2S24n2xM1ASVP
 hwTMjHOf2sRdZBSkxNOW7Gt6cChC8495O7FHBwR9tDTzXirB2kLpufSly5/QG4cyR0js
 5Unqd7fhfmaB/BB5LdGRZflDhEOYuI3JzdvxgkTHHaZUYlddksoNQ04iZxMKu05RgtZI
 3iHTXAcZYrwxSVN4/8k0P2BDNYbrz2CjyvP+H9yajAH1IL3lQDb1qAdrjkseSCu/yBSS
 IzBg==
X-Gm-Message-State: AOAM530pVqx5RJWz8nrljoQFWJIquv1Yy+LMxMAjsRK2CVxTeZoMLmmn
 5b42Fpb+3Gz4iwSWAhlW/l4=
X-Google-Smtp-Source: ABdhPJwC1zFMCEs0FXUZ9z9ju/sKxxkO7jMlHrDxqtUwfM61BSW26G7vel3tWA6jlZLh0qQXkC8pmA==
X-Received: by 2002:a5d:4b82:: with SMTP id b2mr1730069wrt.419.1637004575838; 
 Mon, 15 Nov 2021 11:29:35 -0800 (PST)
Received: from nijino.fritz.box (85-127-52-93.dsl.dynamic.surfer.at.
 [85.127.52.93])
 by smtp.gmail.com with ESMTPSA id 126sm207301wmz.28.2021.11.15.11.29.34
 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
 Mon, 15 Nov 2021 11:29:35 -0800 (PST)
Message-ID: <26974778c8ed5f0b9796e26d60caf4fa8f223335.camel@HIDDEN>
Subject: Re: [PATCH] gnu: webkitgtk: Really disable SSE2 on i686-linux.
From: Liliana Marie Prikler <liliana.prikler@HIDDEN>
To: Diego Nicola Barbato <dnbarbato@HIDDEN>, 51863 <at> debbugs.gnu.org
Date: Mon, 15 Nov 2021 20:29:33 +0100
In-Reply-To: <87a6i5fyi4.fsf@HIDDEN>
References: <87a6i5fyi4.fsf@HIDDEN>
Content-Type: text/plain; charset="UTF-8"
User-Agent: Evolution 3.34.2 
MIME-Version: 1.0
Content-Transfer-Encoding: 7bit
X-Spam-Score: 0.0 (/)
X-Debbugs-Envelope-To: 51863
Cc: Mark H Weaver <mhw@HIDDEN>, Leo Famulari <leo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -1.0 (-)

Hi Diego,

Am Montag, den 15.11.2021, 11:29 +0000 schrieb Diego Nicola Barbato:
> Hey Guix,
> 
> Commit d82fd7c2dd542693988f61fb15c020e3209ac7ec (gnu: webkitgtk:
> Disable SSE2 when not on x86_64.) on master breaks webkitgtk on i686-
> linux.
No, it does not.  It merely fails to fix it ;)

> (I'm Cc-ing Leo, Liliana, and Mark since you were all involved in
> upgrading webkitgtk to 2.34.1.)
> 
> The offending patch attempts to disable SSE2 by conditionally adding
> a phase which removes the call to 'CHECK_FOR_SSE2' from the end of
> 'Source/cmake/DetectSSE2.cmake'.  This phase doesn't do anything
> about 'SSE2_SUPPORT_FOUND' being set to 'FALSE' at line 34 in the
> same file, which causes the following snippet starting at line 152 in
> 'Source/cmake/WebKitCompilerFlags.cmake'
> 
> --8<---------------cut here---------------start------------->8---
>     # Force SSE2 fp on x86 builds.
>     if (WTF_CPU_X86 AND NOT CMAKE_CROSSCOMPILING)
>         WEBKIT_PREPEND_GLOBAL_COMPILER_FLAGS(-msse2 -mfpmath=sse)
>         include(DetectSSE2)
>         if (NOT SSE2_SUPPORT_FOUND)
>             message(FATAL_ERROR "SSE2 support is required to compile
> WebKit")
>         endif ()
>     endif ()
> --8<---------------cut here---------------end--------------->8---
> 
> to fail with the following error when building for i686.
> 
> --8<---------------cut here---------------start------------->8---
> CMake Error at Source/cmake/WebKitCompilerFlags.cmake:157 (message):
>   SSE2 support is required to compile WebKit
> --8<---------------cut here---------------end--------------->8---
> 
> The attached patch removes the code for adding the broken 'disable-
> sse2' phase.  Instead it disables SSE2 using a patch from Debian and
> by setting 'CFLAGS' and 'CXXFLAGS' to '-march=i686' in the
> 'prepare-build-environment' phase when building for i686.  The latter
> is necessary because clang, unlike gcc, defaults to '-
> march=pentium4', which enables SSE2.
These two things don't require combination though, right?  Like one
thing disables the SSE check whereas the other fixes a mostly unrelated
issue, am I correct?

I'd like the comment about the "-march=whatever" thing to be closer to
the setenvs, also if GCC does not require it there ought to be a TODO
or XXX stating that it should be removed on core-updates-frozen.

Otherwise LGTM, cheers!





Information forwarded to guix-patches@HIDDEN:
bug#51863; Package guix-patches. Full text available.

Message received at submit <at> debbugs.gnu.org:


Received: (at submit) by debbugs.gnu.org; 15 Nov 2021 11:29:39 +0000
From debbugs-submit-bounces <at> debbugs.gnu.org Mon Nov 15 06:29:39 2021
Received: from localhost ([127.0.0.1]:52839 helo=debbugs.gnu.org)
	by debbugs.gnu.org with esmtp (Exim 4.84_2)
	(envelope-from <debbugs-submit-bounces <at> debbugs.gnu.org>)
	id 1mmaB9-0002aB-Bs
	for submit <at> debbugs.gnu.org; Mon, 15 Nov 2021 06:29:39 -0500
Received: from lists.gnu.org ([209.51.188.17]:33434)
 by debbugs.gnu.org with esmtp (Exim 4.84_2)
 (envelope-from <dnbarbato@HIDDEN>) id 1mmaB4-0002Zz-LR
 for submit <at> debbugs.gnu.org; Mon, 15 Nov 2021 06:29:37 -0500
Received: from eggs.gnu.org ([209.51.188.92]:33918)
 by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <dnbarbato@HIDDEN>)
 id 1mmaB4-0007q5-G6
 for guix-patches@HIDDEN; Mon, 15 Nov 2021 06:29:34 -0500
Received: from mout02.posteo.de ([185.67.36.66]:53519)
 by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256)
 (Exim 4.90_1) (envelope-from <dnbarbato@HIDDEN>)
 id 1mmaB1-00014g-Kp
 for guix-patches@HIDDEN; Mon, 15 Nov 2021 06:29:34 -0500
Received: from submission (posteo.de [89.146.220.130]) 
 by mout02.posteo.de (Postfix) with ESMTPS id B63C5240101
 for <guix-patches@HIDDEN>; Mon, 15 Nov 2021 12:29:25 +0100 (CET)
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=posteo.de; s=2017;
 t=1636975767; bh=khcZmpWpn+4cMemE8RUhIO0H5VPL/9zyXuNEJOB/rio=;
 h=From:To:Cc:Subject:Date:From;
 b=M0/whoUfAdloVS/dZe9YpKjT/mXNV+o1R3NiB9ehIbi49JFRekWYq8O5JmiN4m4Aq
 7+egGqQzSK+E5LKNa5up0xfUus0CB0oHYR4l7OmFUjwogCBmXdVxi43+uF0Of8f2mW
 8DPfexvZ/zKOrjDNIMrwTuXLDJ6ZkLmwAYfwawFiz09Y1tMAPV+00O7i0i9xLIXvit
 SaeHOORD0KowuEHQ+/cnBGDmSxxnLbxIlyS6AIql+AZ3tlClm0s9KhRLzEUFMrj9oz
 3QUULBZAsv/NgFnlu3g9KTmNk4OJFSdxEG2yGjOvQRNasnIXMM1qnirp0sFwKddhTT
 Pg1oJ2oyc2mRw==
Received: from customer (localhost [127.0.0.1])
 by submission (posteo.de) with ESMTPSA id 4Ht6R81NCBz6tmY;
 Mon, 15 Nov 2021 12:29:24 +0100 (CET)
From: Diego Nicola Barbato <dnbarbato@HIDDEN>
To: guix-patches@HIDDEN
Subject: [PATCH] gnu: webkitgtk: Really disable SSE2 on i686-linux.
Date: Mon, 15 Nov 2021 11:29:23 +0000
Message-ID: <87a6i5fyi4.fsf@HIDDEN>
MIME-Version: 1.0
Content-Type: multipart/mixed; boundary="=-=-="
Received-SPF: pass client-ip=185.67.36.66; envelope-from=dnbarbato@HIDDEN;
 helo=mout02.posteo.de
X-Spam_score_int: -43
X-Spam_score: -4.4
X-Spam_bar: ----
X-Spam_report: (-4.4 / 5.0 requ) BAYES_00=-1.9, DKIM_SIGNED=0.1,
 DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1,
 RCVD_IN_DNSWL_MED=-2.3, RCVD_IN_MSPIKE_H2=-0.001, SPF_HELO_NONE=0.001,
 SPF_PASS=-0.001 autolearn=ham autolearn_force=no
X-Spam_action: no action
X-Spam-Score: -1.3 (-)
X-Debbugs-Envelope-To: submit
Cc: Mark H Weaver <mhw@HIDDEN>,
 Liliana Marie Prikler <liliana.prikler@HIDDEN>,
 Leo Famulari <leo@HIDDEN>
X-BeenThere: debbugs-submit <at> debbugs.gnu.org
X-Mailman-Version: 2.1.18
Precedence: list
List-Id: <debbugs-submit.debbugs.gnu.org>
List-Unsubscribe: <https://debbugs.gnu.org/cgi-bin/mailman/options/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=unsubscribe>
List-Archive: <https://debbugs.gnu.org/cgi-bin/mailman/private/debbugs-submit/>
List-Post: <mailto:debbugs-submit <at> debbugs.gnu.org>
List-Help: <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=help>
List-Subscribe: <https://debbugs.gnu.org/cgi-bin/mailman/listinfo/debbugs-submit>, 
 <mailto:debbugs-submit-request <at> debbugs.gnu.org?subject=subscribe>
Errors-To: debbugs-submit-bounces <at> debbugs.gnu.org
Sender: "Debbugs-submit" <debbugs-submit-bounces <at> debbugs.gnu.org>
X-Spam-Score: -2.3 (--)

--=-=-=
Content-Type: text/plain

Hey Guix,

Commit d82fd7c2dd542693988f61fb15c020e3209ac7ec (gnu: webkitgtk: Disable
SSE2 when not on x86_64.) on master breaks webkitgtk on i686-linux.

(I'm Cc-ing Leo, Liliana, and Mark since you were all involved in
upgrading webkitgtk to 2.34.1.)

The offending patch attempts to disable SSE2 by conditionally adding a
phase which removes the call to 'CHECK_FOR_SSE2' from the end of
'Source/cmake/DetectSSE2.cmake'.  This phase doesn't do anything about
'SSE2_SUPPORT_FOUND' being set to 'FALSE' at line 34 in the same file,
which causes the following snippet starting at line 152 in
'Source/cmake/WebKitCompilerFlags.cmake'

--8<---------------cut here---------------start------------->8---
    # Force SSE2 fp on x86 builds.
    if (WTF_CPU_X86 AND NOT CMAKE_CROSSCOMPILING)
        WEBKIT_PREPEND_GLOBAL_COMPILER_FLAGS(-msse2 -mfpmath=sse)
        include(DetectSSE2)
        if (NOT SSE2_SUPPORT_FOUND)
            message(FATAL_ERROR "SSE2 support is required to compile WebKit")
        endif ()
    endif ()
--8<---------------cut here---------------end--------------->8---

to fail with the following error when building for i686.

--8<---------------cut here---------------start------------->8---
CMake Error at Source/cmake/WebKitCompilerFlags.cmake:157 (message):
  SSE2 support is required to compile WebKit
--8<---------------cut here---------------end--------------->8---

The attached patch removes the code for adding the broken 'disable-sse2'
phase.  Instead it disables SSE2 using a patch from Debian and by
setting 'CFLAGS' and 'CXXFLAGS' to '-march=i686' in the
'prepare-build-environment' phase when building for i686.  The latter is
necessary because clang, unlike gcc, defaults to '-march=pentium4',
which enables SSE2.

With this patch I've successfully built webkitgtk and epiphany on
i686-linux and x86_64-linux.

Regards,

Diego


--=-=-=
Content-Type: text/x-patch
Content-Disposition: attachment;
 filename=0001-gnu-webkitgtk-Really-disable-SSE2-on-i686-linux.patch

From 5c1f6fe53db3f3916776b9e06909e8fc598e7a53 Mon Sep 17 00:00:00 2001
From: Diego Nicola Barbato <dnbarbato@HIDDEN>
Date: Tue, 9 Nov 2021 18:24:57 +0100
Subject: [PATCH] gnu: webkitgtk: Really disable SSE2 on i686-linux.

This is a followup to d82fd7c2dd542693988f61fb15c020e3209ac7ec.

* gnu/packages/patches/webkitgtk-dont-detect-sse2.patch: New file.
* gnu/local.mk (dist_patch_DATA): Add it.
* gnu/packages/webkit.scm (webkitgtk)[source]: Use it.
[arguments]: Remove 'disable-sse2' phase.  When building on i686-linux, insert
'setenv' forms in the 'prepare-build-environment' phase that set both 'CFLAGS'
and 'CXXFLAGS' to '-march=i686'.
---
 gnu/local.mk                                  |  1 +
 .../patches/webkitgtk-dont-detect-sse2.patch  | 28 +++++++++++++++++++
 gnu/packages/webkit.scm                       | 17 +++++------
 3 files changed, 36 insertions(+), 10 deletions(-)
 create mode 100644 gnu/packages/patches/webkitgtk-dont-detect-sse2.patch

diff --git a/gnu/local.mk b/gnu/local.mk
index 208875754b..438b661442 100644
--- a/gnu/local.mk
+++ b/gnu/local.mk
@@ -1899,6 +1899,7 @@ dist_patch_DATA =						\
   %D%/packages/patches/vtk-fix-freetypetools-build-failure.patch	\
   %D%/packages/patches/vtk-8-fix-freetypetools-build-failure.patch	\
   %D%/packages/patches/warsow-qfusion-fix-bool-return-type.patch	\
+  %D%/packages/patches/webkitgtk-dont-detect-sse2.patch		\
   %D%/packages/patches/webkitgtk-share-store.patch		\
   %D%/packages/patches/webkitgtk-bind-all-fonts.patch		\
   %D%/packages/patches/websocketpp-fix-for-cmake-3.15.patch	\
diff --git a/gnu/packages/patches/webkitgtk-dont-detect-sse2.patch b/gnu/packages/patches/webkitgtk-dont-detect-sse2.patch
new file mode 100644
index 0000000000..6be2775480
--- /dev/null
+++ b/gnu/packages/patches/webkitgtk-dont-detect-sse2.patch
@@ -0,0 +1,28 @@
+Copied from Debian:
+
+https://sources.debian.org/data/main/w/webkit2gtk/2.34.1-1/debian/patches/dont-detect-sse2.patch
+
+From: Alberto Garcia <berto@HIDDEN>
+Subject: Don't check for SSE2 support on i386
+Bug-Debian: https://bugs.debian.org/930935
+Forwarded: no
+Index: webkitgtk/Source/cmake/WebKitCompilerFlags.cmake
+===================================================================
+--- webkitgtk.orig/Source/cmake/WebKitCompilerFlags.cmake
++++ webkitgtk/Source/cmake/WebKitCompilerFlags.cmake
+@@ -148,15 +148,6 @@ if (COMPILER_IS_GCC_OR_CLANG)
+     if (CMAKE_CXX_COMPILER_ID MATCHES "GNU")
+         WEBKIT_PREPEND_GLOBAL_COMPILER_FLAGS(-Wno-expansion-to-defined)
+     endif ()
+-
+-    # Force SSE2 fp on x86 builds.
+-    if (WTF_CPU_X86 AND NOT CMAKE_CROSSCOMPILING)
+-        WEBKIT_PREPEND_GLOBAL_COMPILER_FLAGS(-msse2 -mfpmath=sse)
+-        include(DetectSSE2)
+-        if (NOT SSE2_SUPPORT_FOUND)
+-            message(FATAL_ERROR "SSE2 support is required to compile WebKit")
+-        endif ()
+-    endif ()
+ endif ()
+ 
+ if (COMPILER_IS_GCC_OR_CLANG AND NOT MSVC)
diff --git a/gnu/packages/webkit.scm b/gnu/packages/webkit.scm
index 688e745d95..88a59d7acd 100644
--- a/gnu/packages/webkit.scm
+++ b/gnu/packages/webkit.scm
@@ -236,7 +236,8 @@ (define-public webkitgtk
               (sha256
                (base32
                 "1vix0w24m7mq82rzxrk8xvcrkli44gimzs282xs29q2xf0b16g24"))
-              (patches (search-patches "webkitgtk-share-store.patch"
+              (patches (search-patches "webkitgtk-dont-detect-sse2.patch"
+                                       "webkitgtk-share-store.patch"
                                        "webkitgtk-bind-all-fonts.patch"))))
     (build-system cmake-build-system)
     (outputs '("out" "doc"))
@@ -295,23 +296,19 @@ (define-public webkitgtk
                  (("libWPEBackend-fdo-([\\.0-9]+)\\.so" all version)
                   (string-append wpebackend-fdo "/lib/" all)))
                #t)))
-         ,@(if (string-prefix? "x86_64" (or (%current-target-system)
-                                            (%current-system)))
-               '()
-               '((add-after 'unpack 'disable-sse2
-                   (lambda _
-                     (substitute* "Source/cmake/DetectSSE2.cmake"
-                       (("CHECK_FOR_SSE2\\(\\)") ""))))))
          (add-before 'configure 'prepare-build-environment
            (lambda* (#:key inputs #:allow-other-keys)
              (setenv "CC" "clang")
              (setenv "CXX" "clang++")
              ;; XXX Until we switch back to using GCC,
-             ;; work around <https://bugs.gnu.org/51591>.
+             ;; work around <https://bugs.gnu.org/51591>
+             ;; and compile for i686 without extensions.
              ,@(if (target-x86-32?)
                    '((substitute* "Source/WTF/wtf/CheckedArithmetic.h"
                        (("#define USE_MUL_OVERFLOW 1")
-                        "#define USE_MUL_OVERFLOW 0")))
+                        "#define USE_MUL_OVERFLOW 0"))
+                     (setenv "CFLAGS" "-march=i686")
+                     (setenv "CXXFLAGS" "-march=i686"))
                    '())
              #t))
          (add-after 'install 'move-doc-files

base-commit: d29a9aa54b9df9167f4641dd8ca42c561b460c4c
-- 
2.33.1


--=-=-=--




Acknowledgement sent to Diego Nicola Barbato <dnbarbato@HIDDEN>:
New bug report received and forwarded. Copy sent to guix-patches@HIDDEN. Full text available.
Report forwarded to guix-patches@HIDDEN:
bug#51863; Package guix-patches. Full text available.
Please note: This is a static page, with minimal formatting, updated once a day.
Click here to see this page with the latest information and nicer formatting.
Last modified: Fri, 26 Nov 2021 04:15:02 UTC

GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997 nCipher Corporation Ltd, 1994-97 Ian Jackson.