From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: from mp2 ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by ms0.migadu.com with LMTPS id xUcHDsA2hmFIzgAAgWs5BA (envelope-from ) for ; Sat, 06 Nov 2021 09:03:12 +0100 Received: from aspmx1.migadu.com ([2001:41d0:2:4a6f::]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) by mp2 with LMTPS id KPUkCcA2hmHbeAAAB5/wlQ (envelope-from ) for ; Sat, 06 Nov 2021 08:03:12 +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 B8E572BE54 for ; Sat, 6 Nov 2021 09:03:11 +0100 (CET) Received: from localhost ([::1]:45850 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1mjGfO-0000kM-Rb for larch@yhetil.org; Sat, 06 Nov 2021 04:03:10 -0400 Received: from eggs.gnu.org ([2001:470:142:3::10]:58052) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1mjGfG-0000jx-CV for bug-guix@gnu.org; Sat, 06 Nov 2021 04:03:02 -0400 Received: from debbugs.gnu.org ([209.51.188.43]:36717) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1mjGfG-0005M7-3h for bug-guix@gnu.org; Sat, 06 Nov 2021 04:03:02 -0400 Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1mjGfF-0006LK-Vx for bug-guix@gnu.org; Sat, 06 Nov 2021 04:03:02 -0400 X-Loop: help-debbugs@gnu.org Subject: bug#51559: [PATCH] gnu: webkitgtk: Disable SSE2 when not on x86_64. Resent-From: Mark H Weaver Original-Sender: "Debbugs-submit" Resent-CC: bug-guix@gnu.org Resent-Date: Sat, 06 Nov 2021 08:03:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 51559 X-GNU-PR-Package: guix X-GNU-PR-Keywords: To: Liliana Marie Prikler , Maxime Devos , 51559@debbugs.gnu.org Received: via spool by 51559-submit@debbugs.gnu.org id=B51559.163618577324366 (code B ref 51559); Sat, 06 Nov 2021 08:03:01 +0000 Received: (at 51559) by debbugs.gnu.org; 6 Nov 2021 08:02:53 +0000 Received: from localhost ([127.0.0.1]:48263 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjGf6-0006Kv-Of for submit@debbugs.gnu.org; Sat, 06 Nov 2021 04:02:53 -0400 Received: from world.peace.net ([64.112.178.59]:33786) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1mjGf5-0006Ki-4A for 51559@debbugs.gnu.org; Sat, 06 Nov 2021 04:02:51 -0400 Received: from mhw by world.peace.net with esmtpsa (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1mjGey-0005VX-2k; Sat, 06 Nov 2021 04:02:44 -0400 From: Mark H Weaver In-Reply-To: References: <5acdf0477d3c75319d6f6ef668c6323be7ea680e.camel@gmail.com> <3c36e72879c977e9f1c9fcd485a75d908d2391c5.camel@telenet.be> Date: Sat, 06 Nov 2021 04:00:44 -0400 Message-ID: <87h7cpu308.fsf@netris.org> MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-guix@gnu.org List-Id: Bug reports for GNU Guix List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: maxim.cournoyer@gmail.com Errors-To: bug-guix-bounces+larch=yhetil.org@gnu.org Sender: "bug-Guix" X-Migadu-Flow: FLOW_IN ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=yhetil.org; s=key1; t=1636185791; 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: content-transfer-encoding:content-transfer-encoding:resent-cc: resent-from:resent-sender:resent-message-id:in-reply-to:in-reply-to: references:references:list-id:list-help:list-unsubscribe: list-subscribe:list-post; bh=tWBvvXmrIvdqZjvU8GqsZdNJnzez1fv0NOnf0KhmFOo=; b=j7oNpmDjDOq286hTgImtyvSlkkUrisYEHTSF5tnknZfXt2tUcAiMixem+iUxryS0G6HU9/ df+oLKAhZuL4+8FpG3QGbxyMgdkfj2k97ECTFtZU1FHyfBwMVsgXPln4/yyxxFgQay+SpH ljY9GMKtQRpgzInn0gysqC37uh+YDeuoPqDe7myqxAItMH4TjTd3EQ4QLzsZRtmzefjV1h ImXKKq8X8Pso4MXIUZMKewh9X5tBu4Wy2XqwqSrR00mGywo9PFeVBvWz7iaDbMx5JHb0mr NvEKQ2vuSYyzFk3Z1iXzyMrgFVn+8SlY7SzwRutGKwh+Ve69E1hPpw6xnLwtVg== ARC-Seal: i=1; s=key1; d=yhetil.org; t=1636185791; a=rsa-sha256; cv=none; b=et7vSRSW6V4fl8osaAbrVb9upQ0tmFPTEE1WiYrJdWoVTRX5ooKNbwm1vTJU+AeZ3S9W8L csmyfMi5yRsCQAK8fOnCm+RODLpewg603bv/qaUeWLZZ+1A9Y6e8+WXiT98CzFubbVAZVr aUgxoeA5Y4OzcSpccuacl/rHsH/oSGNQQWEiGeibWavZz4ybx0eFUttQm5Cz7bgpa0/A2Q l/x3BhX8wFDzWhIzETEzXrDkbNr6t9A20O2fwMvpzTMBTzlsa0cqGd24H9SOhjdW1uCdg3 cgAyCMkx1qaPhJSTEg+e+16egcaIQ4AjJ3I3Uaf20O3DCNmu8e20iom6321gDg== ARC-Authentication-Results: i=1; aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Spam-Score: -0.92 Authentication-Results: aspmx1.migadu.com; dkim=none; dmarc=none; spf=pass (aspmx1.migadu.com: domain of bug-guix-bounces@gnu.org designates 209.51.188.17 as permitted sender) smtp.mailfrom=bug-guix-bounces@gnu.org X-Migadu-Queue-Id: B8E572BE54 X-Spam-Score: -0.92 X-Migadu-Scanner: scn0.migadu.com X-TUID: cQw/0kIbTzEw Hi Liliana, Liliana Marie Prikler writes: > Am Freitag, den 05.11.2021, 20:15 +0000 schrieb Maxime Devos: >> Liliana Marie Prikler schreef op vr 05-11-2021 om 21:06 [+0100]: >> > * gnu/packages/webkit.scm (webkitgtk)[#:phases]: Add =E2=80=98disable- >> > sse2=E2=80=99. >> > --- >> > gnu/packages/webkit.scm | 5 +++++ >> > 1 file changed, 5 insertions(+) >> >=20 >> > diff --git a/gnu/packages/webkit.scm b/gnu/packages/webkit.scm >> > index e54b680855..45150e185f 100644 >> > --- a/gnu/packages/webkit.scm >> > +++ b/gnu/packages/webkit.scm >> > @@ -295,6 +295,11 @@ (define-public webkitgtk >> > (("libWPEBackend-fdo-([\\.0-9]+)\\.so" all >> > version) >> > (string-append wpebackend-fdo "/lib/" all))) >> > #t))) >> > + (add-after 'unpack 'disable-sse2 >> > + (lambda* (#:key system #:allow-other-keys) >> > + (unless (string-prefix? "x86_64" system) >>=20 >> IIUC, when cross-compiling, you need to look at 'target', not >> 'system'. At least, that's the case if %current-system/%current- >> target-system is used. Not sure about 'system' and 'target'. > Do target and system follow the same rules? Unfortunately not. It's a bit of a mess, IMO. %current-system is a Nix system string, e.g. "x86_64-linux", "i686-linux", "aarch64-linux", etc. %current-target-system is either #f (if not cross-compiling) or a GNU triplet, e.g. "x86_64-unknown-linux-gnu". It is quite common to write code like: __ (or %current-target-system ______ %current-system) but then you must then write code that copes properly with either Nix system strings or GNU triplets. > If so, I could write (or target system), no? Packages on master sadly > follow wildly different conventions and I picked one at random. A nice touch would be to use quasiquotation to perform the target checks in the host-side code, maybe something like this (after adding 'target-x86-32?' from 'core-updates-frozen' to (guix utils)): --8<---------------cut here---------------start------------->8--- diff --git a/gnu/packages/webkit.scm b/gnu/packages/webkit.scm index 358254f23f..439341c222 100644 --- a/gnu/packages/webkit.scm +++ b/gnu/packages/webkit.scm @@ -292,6 +292,12 @@ acceleration in mind, leveraging common 3D graphics AP= Is for best performance.") (("libWPEBackend-fdo-([\\.0-9]+)\\.so" all version) (string-append wpebackend-fdo "/lib/" all))) #t))) + ,@(if (target-x86-32?) + '((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") --8<---------------cut here---------------end--------------->8--- The nice thing about this approach is that it does not cause rebuilds on other systems. This benefit is especially useful for core packages, where the cost of rebuilds can be prohibitive, but where it is sometimes necessary to add more target-specific bits like this when Guix is bootstrapped on a new platform. What do you think? Anyway, thanks for working on it. Regards, Mark --=20 Disinformation flourishes because many people care deeply about injustice but very few check the facts. Ask me about .