From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp1 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id QPQ4ENNEkmFvaQEAgWs5BA (envelope-from ) for ; Mon, 15 Nov 2021 12:30:27 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp1 with LMTPS id 2CLWC9NEkmE/GgAAbx9fmQ (envelope-from ) for ; Mon, 15 Nov 2021 11:30:27 +0000 Received: from lists.gnu.org (lists.gnu.org [209.51.188.17]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by aspmx1.migadu.com (Postfix) with ESMTPS id 7E0DCFF4F for ; Mon, 15 Nov 2021 12:30:26 +0100 (CET) Received: from localhost ([::1]:32800 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mmaBt-00006q-CF for larch@yhetil.org; Mon, 15 Nov 2021 06:30:25 -0500 Received: from eggs.gnu.org ([209.51.188.92]:34114) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mmaBX-0008Vq-Sm for guix-patches@gnu.org; Mon, 15 Nov 2021 06:30:03 -0500 Received: from debbugs.gnu.org ([209.51.188.43]:41293) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mmaBX-00019f-Jm for guix-patches@gnu.org; Mon, 15 Nov 2021 06:30:03 -0500 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mmaBX-0002bL-92 for guix-patches@gnu.org; Mon, 15 Nov 2021 06:30:03 -0500 X-Loop: help-debbugs@gnu.org Subject: [bug#51863] [PATCH] gnu: webkitgtk: Really disable SSE2 on i686-linux. Resent-From: Diego Nicola Barbato Original-Sender: "Debbugs-submit" Resent-CC: guix-patches@gnu.org Resent-Date: Mon, 15 Nov 2021 11:30:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 51863 X-GNU-PR-Package: guix-patches X-GNU-PR-Keywords: patch To: 51863@debbugs.gnu.org Cc: Mark H Weaver , Liliana Marie Prikler , Leo Famulari X-Debbugs-Original-To: guix-patches@gnu.org Received: via spool by submit@debbugs.gnu.org id=B.16369757799935 (code B ref -1); Mon, 15 Nov 2021 11:30:03 +0000 Received: (at submit) by debbugs.gnu.org; 15 Nov 2021 11:29:39 +0000 Received: from localhost ([127.0.0.1]:52839 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mmaB9-0002aB-Bs for submit@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 ) id 1mmaB4-0002Zz-LR for submit@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 ) id 1mmaB4-0007q5-G6 for guix-patches@gnu.org; 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 ) id 1mmaB1-00014g-Kp for guix-patches@gnu.org; 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 ; 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 Date: Mon, 15 Nov 2021 11:29:23 +0000 Message-ID: <87a6i5fyi4.fsf@GlaDOS.home> MIME-Version: 1.0 Content-Type: multipart/mixed; boundary="=-=-=" Received-SPF: pass client-ip=185.67.36.66; envelope-from=dnbarbato@posteo.de; 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-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: guix-patches@gnu.org List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guix-patches-bounces+larch=yhetil.org@gnu.org Sender: "Guix-patches" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1636975826; h=from:from:sender:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type:resent-cc:resent-from:resent-sender: resent-message-id:list-id:list-help:list-unsubscribe:list-subscribe: list-post:dkim-signature; bh=fYJZE6tXlxiFgys8kraUu8JTlLxd+PnJ5lm6BTRSHDQ=; b=j5HT1lg6eVP1B0I887bPo7gyqW8YSkrHF4XVUp0U5CTyKFE4zu3tLHvkI196tJ8Ad6RiZb nEOcd1OnzRyiFRhf8XrZ11JR/FdCkHQ5CRz9I4RCTTh8SfW2CbG7D7ljmI2fjzGqUyxyYD l1RFGJAPqngyTIHJ2IqTuoijcEbBCBE5WD6m6MliNR+7eYWVTYiyg+V8EB8rib/6KxI1z2 dwyxrVMixvYjAPYPif1kILELDP1XT7BTY3t4YmSDXsU5lhqXNG1QN+/XcEGpZcRShDqlv5 82PIdu+k04E00NeAZcYb69VvUhw6jKwacfdppxNNFCcHBP2GIEUi3oyK3vD3ag== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1636975826; a=rsa-sha256; cv=none; b=SWabGN4fTIrujy/6IuvJ9cAr29cc80PTXVfV6QQl8kruLdnbEK/d5wcCS4lpWLnRdlgmXc YqlCNqSQUnPw2OzvNGbTXJ7wvuTje44P2xmr1ZQX7iQp2pP1HgbQ1OyXmwc4bZ5hlT5Oyi cJFHRAeFQky3PrvuEdCkYwtvsaQUWbm4mA/pFVNSzvhbRzuBZr60CCM6xyKVjdGp7kqQwh YeI+OuZo9QW0MNJjJVcb75dKHKSgG/StXs01rA09H/GJH2Z9eF7YZnrpLHbL+aex7lC0Xv Kr1t/otAlXczle1/Oej7i+B316LqowK9UqXl8PEhTB3s1KGaXVzrnSLCGv7ylw== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.de header.s=2017 header.b="M0/whoUf"; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.de (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Spam-Score: -0.64 Authentication-Results: aspmx1.migadu.com; dkim=fail ("headers rsa verify failed") header.d=posteo.de header.s=2017 header.b="M0/whoUf"; dmarc=fail reason="SPF not aligned (strict)" header.from=posteo.de (policy=none); spf=pass (aspmx1.migadu.com: domain of guix-patches-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=guix-patches-bounces@gnu.org X-Migadu-Queue-Id: 7E0DCFF4F X-Spam-Score: -0.64 X-Migadu-Scanner: scn1.migadu.com X-TUID: e6CnHQvwyab+ --=-=-= 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 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 +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 . + ;; work around + ;; 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 --=-=-=--