From patchwork Wed Dec 8 01:28:21 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilya Lipnitskiy X-Patchwork-Id: 1565046 X-Patchwork-Delegate: hauke@hauke-m.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=IX+4dTeM; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=kdJMJEfi; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4J809C1pmrz9ssD for ; Wed, 8 Dec 2021 12:35:27 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=25lOU5cbdJ+JxXMPeUzx7MpycYcmfFe6MUsa45/vdcQ=; b=IX+4dTeMKJWyk2 Nd9Z3aFAz+XmJJR+4pYDKDcifAbmQarkrKtBjNJrWKynRKBNpYr72dOp+idfcVTsikwm66wbe6wuo 0X2tcmXqVbczsWOMJDPCWYVJM1z6wNPf2X122QqPXRD/qSuEiUXChb70Rx5P7qBbD2zyxqQvN27hi 93yIDD2IPb1a10fIb0TH0jvktjKodtr5ANu7ckmyXJHyZzp+5YkEFAzVnljpYz2XyTx2Q7bSGTsG/ xgtYV6ai/BAEtQrEVa4EtZ7g6d0kuajdg08YNHgPu/Irvx5S9UOq4z5HjcR0ML0EnL/Kb/rT52F6O u8TXj0cx+q1yXyvaq1tg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mulnC-00AYDg-AL; Wed, 08 Dec 2021 01:30:46 +0000 Received: from mail-pj1-x102d.google.com ([2607:f8b0:4864:20::102d]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mulmk-00AYA9-DE for openwrt-devel@lists.openwrt.org; Wed, 08 Dec 2021 01:30:22 +0000 Received: by mail-pj1-x102d.google.com with SMTP id w33-20020a17090a6ba400b001a722a06212so3091054pjj.0 for ; Tue, 07 Dec 2021 17:30:18 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=IdmER7HeQzogseIX637eBGfWkIWxM3UwBKth88AvF/U=; b=kdJMJEfiAzpij++fs6VQ3RE70oEBffCuyNye5NL99ZS0LQ0ZIof34afN2klT6oJGhz ZYOkvSI0iCUvhDz8G3T56uJT5hjZ0MGM2BHjtrkM46gOMNey/614MSyLnzNC9gGXkCDt yzBZzBVIGJ/B1uR5A0hHn60uZkRpx5Bn7isvY4VrgKOS6UZYTzMijQqz+XMeckurkOt1 Q5Klc9dr80+7USQdZTBMxh/pp0XmabJ0IUUF2NNcAf2XS/gNBmoAfnQcCBHngWe1a2bn 6aXbFcY0u8hU3MM2jO80phQCUYn+dL7H7WW799vf2I6tFwcGUG/NCQ8w6Iop1QYafdQ7 gy9A== 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:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=IdmER7HeQzogseIX637eBGfWkIWxM3UwBKth88AvF/U=; b=8G+ab0A6xk/bIc9+scjH7WATddej4YiOQbSztQz73PRnTVxa6B7GStjfGwPs4bV//i olaZe6kBuGZoBewj9wj6fjEbJWO9Gzrm90tZ7wS6oNmEbHKmUEBa9qBjli80EYfT3oKf btdDGGfC1tegKYOy2aZ+tH5WiXBppFZZOUKkzv9n8LlMVmLfTWBze2Z68zpDASijwr3/ zvvIqC8LSNnOW6pe7yltFmDIBX140U6q0IidDSQB4NR2fj0VftbAyo2pUgEUflouH4pa 5Av6wI33JO7iQE72Wjm72o3MQ1vYowQhWYYrSCDJlBkg1Oj+ZqWwYAssrDrJq+2ToSo1 o6Fw== X-Gm-Message-State: AOAM533hfLSBSDJwQ/1SVak7vq3JkPnDNa677YFzbpB63M51XFc4IVKJ FtMclAbUVEUZ66sYk7B8dAUc7ykYLbM= X-Google-Smtp-Source: ABdhPJxKgqmGzKYPA3/0GMpvzKyhMTjWXOo9yUb71rUAIDGo21Z+cETUJliLeS06ZMzZOolgPsgYiw== X-Received: by 2002:a17:90a:e395:: with SMTP id b21mr3211443pjz.103.1638927017414; Tue, 07 Dec 2021 17:30:17 -0800 (PST) Received: from z640-arch.lan ([2602:61:736c:4300::9d4]) by smtp.gmail.com with ESMTPSA id t131sm647085pgb.31.2021.12.07.17.30.16 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Dec 2021 17:30:17 -0800 (PST) From: Ilya Lipnitskiy To: openwrt-devel Cc: Ilya Lipnitskiy Subject: [PATCH 1/3] toolchain/gcc: remove upstreamed patch, add backport Date: Tue, 7 Dec 2021 17:28:21 -0800 Message-Id: <20211208012823.202082-2-ilya.lipnitskiy@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211208012823.202082-1-ilya.lipnitskiy@gmail.com> References: <20211208012823.202082-1-ilya.lipnitskiy@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211207_173018_481482_255A6A0B X-CRM114-Status: GOOD ( 24.69 ) X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: This patch has been upstream since GCC 10. Dragan Mladjenovic (2): Emit .note.GNU-stack for soft-float linux targets. Emit .note.GNU-stack for hard-float linux targets. Link: https://gcc.gnu.org/g:a3c1e1f2ff88 Link: https://gcc.gnu.org/g:54b3d52c3cca Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:102d listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [ilya.lipnitskiy[at]gmail.com] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org This patch has been upstream since GCC 10. Dragan Mladjenovic (2): Emit .note.GNU-stack for soft-float linux targets. Emit .note.GNU-stack for hard-float linux targets. Link: https://gcc.gnu.org/g:a3c1e1f2ff88 Link: https://gcc.gnu.org/g:54b3d52c3cca Add backport patch to define TARGET_LIBC_GNUSTACK on musl to add .note.GNU-stack on hard-float MIPS targets. Link: https://gcc.gnu.org/g:25abbb924968 The net effect should be the exact same functionality while following upstream code instead of a custom outdated patch. Signed-off-by: Ilya Lipnitskiy --- ...-define-TARGET_LIBC_GNUSTACK-on-musl.patch | 46 ++++++++ .../11.2.0/930-fix-mips-noexecstack.patch | 111 ------------------ 2 files changed, 46 insertions(+), 111 deletions(-) create mode 100644 toolchain/gcc/patches/11.2.0/011-v12-configure-define-TARGET_LIBC_GNUSTACK-on-musl.patch delete mode 100644 toolchain/gcc/patches/11.2.0/930-fix-mips-noexecstack.patch diff --git a/toolchain/gcc/patches/11.2.0/011-v12-configure-define-TARGET_LIBC_GNUSTACK-on-musl.patch b/toolchain/gcc/patches/11.2.0/011-v12-configure-define-TARGET_LIBC_GNUSTACK-on-musl.patch new file mode 100644 index 000000000000..94105bdf9f07 --- /dev/null +++ b/toolchain/gcc/patches/11.2.0/011-v12-configure-define-TARGET_LIBC_GNUSTACK-on-musl.patch @@ -0,0 +1,46 @@ +From ea650cae26da4a8fc04f0c4666f4dd776d0b5fc0 Mon Sep 17 00:00:00 2001 +From: Ilya Lipnitskiy +Date: Sun, 14 Nov 2021 21:54:25 -0800 +Subject: [PATCH] configure: define TARGET_LIBC_GNUSTACK on musl + +musl only uses PT_GNU_STACK to set default thread stack size and has no +executable stack support[0], so there is no reason not to emit the +.note.GNU-stack section on musl builds. + +[0]: https://lore.kernel.org/all/20190423192534.GN23599@brightrain.aerifal.cx/T/#u + +gcc/ChangeLog: + + * configure: Regenerate. + * configure.ac: define TARGET_LIBC_GNUSTACK on musl + +Signed-off-by: Ilya Lipnitskiy +--- + gcc/configure | 3 +++ + gcc/configure.ac | 3 +++ + 2 files changed, 6 insertions(+) + +--- a/gcc/configure ++++ b/gcc/configure +@@ -30954,6 +30954,9 @@ fi + # Check if the target LIBC handles PT_GNU_STACK. + gcc_cv_libc_gnustack=unknown + case "$target" in ++ mips*-*-linux-musl*) ++ gcc_cv_libc_gnustack=yes ++ ;; + mips*-*-linux*) + + if test $glibc_version_major -gt 2 \ +--- a/gcc/configure.ac ++++ b/gcc/configure.ac +@@ -6788,6 +6788,9 @@ fi + # Check if the target LIBC handles PT_GNU_STACK. + gcc_cv_libc_gnustack=unknown + case "$target" in ++ mips*-*-linux-musl*) ++ gcc_cv_libc_gnustack=yes ++ ;; + mips*-*-linux*) + GCC_GLIBC_VERSION_GTE_IFELSE([2], [31], [gcc_cv_libc_gnustack=yes], ) + ;; diff --git a/toolchain/gcc/patches/11.2.0/930-fix-mips-noexecstack.patch b/toolchain/gcc/patches/11.2.0/930-fix-mips-noexecstack.patch deleted file mode 100644 index 591dfe5a5008..000000000000 --- a/toolchain/gcc/patches/11.2.0/930-fix-mips-noexecstack.patch +++ /dev/null @@ -1,111 +0,0 @@ -From da45b3fde60095756f5f6030f6012c23a3d34429 Mon Sep 17 00:00:00 2001 -From: Andrew McDonnell -Date: Fri, 3 Oct 2014 19:09:00 +0930 -Subject: Add .note.GNU-stack section - -See http://lists.busybox.net/pipermail/uclibc/2014-October/048671.html -Below copied from https://gcc.gnu.org/ml/gcc-patches/2014-09/msg02430.html - -Re: [Patch, MIPS] Add .note.GNU-stack section - - From: Steve Ellcey - -On Wed, 2014-09-10 at 10:15 -0700, Eric Christopher wrote: -> -> -> On Wed, Sep 10, 2014 at 9:27 AM, wrote: - -> This works except you did not update the assembly files in -> libgcc or glibc. We (Cavium) have the same patch in our tree -> for a few released versions. - -> Mind just checking yours in then Andrew? - -> Thanks! -> -eric - -I talked to Andrew about what files he changed in GCC and created and -tested this new patch. Andrew also mentioned changing some assembly -files in glibc but I don't see any use of '.section .note.GNU-stack' in -any assembly files in glibc (for any platform) so I wasn't planning on -creating a glibc to add them to mips glibc assembly language files. - -OK to check in this patch? - -Steve Ellcey -sellcey@mips.com - - - -2014-09-26 Steve Ellcey ---- - gcc/config/mips/mips.c | 3 +++ - libgcc/config/mips/crti.S | 4 ++++ - libgcc/config/mips/crtn.S | 3 +++ - libgcc/config/mips/mips16.S | 4 ++++ - libgcc/config/mips/vr4120-div.S | 4 ++++ - 5 files changed, 18 insertions(+) - ---- a/gcc/config/mips/mips.c -+++ b/gcc/config/mips/mips.c -@@ -22890,6 +22890,9 @@ mips_asm_file_end (void) - #define TARGET_ASM_FILE_END mips_asm_file_end - - -+#undef TARGET_ASM_FILE_END -+#define TARGET_ASM_FILE_END file_end_indicate_exec_stack -+ - struct gcc_target targetm = TARGET_INITIALIZER; - - #include "gt-mips.h" ---- a/libgcc/config/mips/crti.S -+++ b/libgcc/config/mips/crti.S -@@ -24,6 +24,10 @@ see the files COPYING3 and COPYING.RUNTI - /* An executable stack is *not* required for these functions. */ - #include "gnustack.h" - -+ -+/* An executable stack is *not* required for these functions. */ -+ .section .note.GNU-stack,"",%progbits -+ - /* 4 slots for argument spill area. 1 for cpreturn, 1 for stack. - Return spill offset of 40 and 20. Aligned to 16 bytes for n32. */ - ---- a/libgcc/config/mips/crtn.S -+++ b/libgcc/config/mips/crtn.S -@@ -24,6 +24,9 @@ see the files COPYING3 and COPYING.RUNTI - /* An executable stack is *not* required for these functions. */ - #include "gnustack.h" - -+/* An executable stack is *not* required for these functions. */ -+ .section .note.GNU-stack,"",%progbits -+ - /* 4 slots for argument spill area. 1 for cpreturn, 1 for stack. - Return spill offset of 40 and 20. Aligned to 16 bytes for n32. */ - ---- a/libgcc/config/mips/mips16.S -+++ b/libgcc/config/mips/mips16.S -@@ -51,6 +51,10 @@ see the files COPYING3 and COPYING.RUNTI - values using the soft-float calling convention, but do the actual - operation using the hard floating point instructions. */ - -+/* An executable stack is *not* required for these functions. */ -+ .section .note.GNU-stack,"",%progbits -+ .previous -+ - #if defined _MIPS_SIM && (_MIPS_SIM == _ABIO32 || _MIPS_SIM == _ABIO64) - - /* This file contains 32-bit assembly code. */ ---- a/libgcc/config/mips/vr4120-div.S -+++ b/libgcc/config/mips/vr4120-div.S -@@ -29,6 +29,10 @@ see the files COPYING3 and COPYING.RUNTI - -mfix-vr4120. div and ddiv do not give the correct result when one - of the operands is negative. */ - -+/* An executable stack is *not* required for these functions. */ -+ .section .note.GNU-stack,"",%progbits -+ .previous -+ - .set nomips16 - - #define DIV \ From patchwork Wed Dec 8 01:28:22 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilya Lipnitskiy X-Patchwork-Id: 1565038 X-Patchwork-Delegate: hauke@hauke-m.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=TPso3e2w; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=XAn5eeTw; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4J808860DRz9tk5 for ; Wed, 8 Dec 2021 12:34:32 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=n1voAdM+1i9pbuAR4IQfOZpzlGDb89rhswPu004NEQQ=; b=TPso3e2wWhkqFD xh7wSlGqz1IX4lBD1Te1ODxhqxlCgC+oQv6Vd7hZtpzzcrT4zAenxgJ1vF7S0slFI/GOZa1TEuadi cHPGb7rjNK1FdyDJOFH5xbB3IDSXMasDh9TeuWV89IM0EsuBEwsRDS7S0z7uQz4ddOqYy8ZWw5wFG IrOWaLFE1aaJL+HeEDb+Vn8gRE7HySberl5pJOhfdou+rOeD+9QxIZ+bUO7VqAufbEIja00vasXFj Hvc6QusTH3x6Mqy9ICGwLxClXtmWPHmK5xazxo9WtHoc6aJSY7Sjb5h/WlKXEoc/KuXBg6N0F4toV srvt+AnKaeazdzwRKCMw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mulmz-00AYCJ-P8; Wed, 08 Dec 2021 01:30:33 +0000 Received: from mail-pj1-x1031.google.com ([2607:f8b0:4864:20::1031]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mulml-00AYAV-Ip for openwrt-devel@lists.openwrt.org; Wed, 08 Dec 2021 01:30:21 +0000 Received: by mail-pj1-x1031.google.com with SMTP id w33-20020a17090a6ba400b001a722a06212so3091082pjj.0 for ; Tue, 07 Dec 2021 17:30:19 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=0puJvcr03yJaRNiDEix/n50qJDuSaQnwzri44+w6zCo=; b=XAn5eeTwr7zwYi0cTOB+FuZp/Fg+0pLHCo6Qu6xmL1beQz5BHwlt2y7Z0aRCGInUbF 9WaMmlFoiILvwCUWmrV9apudY+9wvbqARrGwgxcShXx+BZJXF2S6UzWytH+kzSCMezFN MjvSqtTmRccrDPGjYtpw16+sJycgxl1hcwjkA/GYHhH28Nxzqdptqy58mMLo02ol7tnS nFLML9JHxNsLZyh1ZQjOvB4E77e57kZ1o4GTylB/2JR03jD+9XQsW6SMhmy83JTdEOfX HNNNoxxxR2HYusYLedVrZk1yKpKy8XTZQI7qj8gAa5ZM3iBMBiqBaxI9hRBHnTYGhsE1 rBEQ== 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:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=0puJvcr03yJaRNiDEix/n50qJDuSaQnwzri44+w6zCo=; b=7LiDShoZKc+Zscr6skfBQiHxGzCZ7h288VEgc+Lp2jMlgBYYpKHy9hQMUa4ysufKW9 Yq1McYW3g+JK0jcyeYzDqaWheasYfFO4YJKMsrDkOxPusokbXQ7OXn8N6K9jhhT9zec+ ys4p2ym6aH8Ia50+mUiRlDIkg1izjVWIJPSw418n+XJ3kqrVDUmpAOrCEfWVD8wbH7Ht PPTz2jWP396HMQwqGN/eFJiU9sJOONNEmBFKt1lP35QtBkwSCqy5d7+ogGWXLB3zN0eK HQ9oJ41pdCQ1JDmzlaYeBaoj0MYMn77bjjZDuI3jlMD6+l1Jd+1bSTxbRMaPw740fsc0 lvBw== X-Gm-Message-State: AOAM531skXxi78gNG7bfNOhad6YBJ/N5cUWCJp5EjwHKmr0ucKmlYZyU PVgpPV2NcqEmStOboC7UjzXknnXcfDs= X-Google-Smtp-Source: ABdhPJzQ+e/c3p1WNvw6oJq0FAsPzvTBNZl9U9Yqw967HraPP+hlyWpr5LBJTHBwyLYgtkiVrRu7Dw== X-Received: by 2002:a17:902:b7c6:b0:141:9a3a:f213 with SMTP id v6-20020a170902b7c600b001419a3af213mr55631681plz.15.1638927018684; Tue, 07 Dec 2021 17:30:18 -0800 (PST) Received: from z640-arch.lan ([2602:61:736c:4300::9d4]) by smtp.gmail.com with ESMTPSA id t131sm647085pgb.31.2021.12.07.17.30.17 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Dec 2021 17:30:18 -0800 (PST) From: Ilya Lipnitskiy To: openwrt-devel Cc: Ilya Lipnitskiy Subject: [PATCH 2/3] toolchain/gcc: replace revert with upstream fix Date: Tue, 7 Dec 2021 17:28:22 -0800 Message-Id: <20211208012823.202082-3-ilya.lipnitskiy@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211208012823.202082-1-ilya.lipnitskiy@gmail.com> References: <20211208012823.202082-1-ilya.lipnitskiy@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211207_173019_651996_1CBC389C X-CRM114-Status: GOOD ( 23.14 ) X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: This will make upgrade to v11.3.0 easier and follows upstream more closely. Signed-off-by: Ilya Lipnitskiy --- ...leanup-range-of-address-calculations.patch | 160 ...ld_using_range-range_of_address-PR10.patch | 114 +++++++++++++ 2 files changed, 114 inser [...] Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:1031 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [ilya.lipnitskiy[at]gmail.com] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org This will make upgrade to v11.3.0 easier and follows upstream more closely. Signed-off-by: Ilya Lipnitskiy --- ...leanup-range-of-address-calculations.patch | 160 ------------------ ...ld_using_range-range_of_address-PR10.patch | 114 +++++++++++++ 2 files changed, 114 insertions(+), 160 deletions(-) delete mode 100644 toolchain/gcc/patches/11.2.0/001-Revert-Cleanup-range-of-address-calculations.patch create mode 100644 toolchain/gcc/patches/11.2.0/001-v11.3.0-ranger-Fix-up-fold_using_range-range_of_address-PR10.patch diff --git a/toolchain/gcc/patches/11.2.0/001-Revert-Cleanup-range-of-address-calculations.patch b/toolchain/gcc/patches/11.2.0/001-Revert-Cleanup-range-of-address-calculations.patch deleted file mode 100644 index a97e061d6b64..000000000000 --- a/toolchain/gcc/patches/11.2.0/001-Revert-Cleanup-range-of-address-calculations.patch +++ /dev/null @@ -1,160 +0,0 @@ -From: Felix Fietkau -Date: Tue, 16 Nov 2021 10:39:51 +0100 -Subject: [PATCH] Revert "Cleanup range of address calculations." - -This reverts commit 47923622c663ffad8b14aa93706183290d4f6791. -This commit is causing issues with offset of struct members. - -https://gcc.gnu.org/bugzilla/show_bug.cgi?id=103255 ---- - delete mode 100644 gcc/testsuite/gcc.dg/tree-ssa/pr78655.c - ---- a/gcc/gimple-range.cc -+++ b/gcc/gimple-range.cc -@@ -431,9 +431,8 @@ gimple_ranger::range_of_range_op (irange - m_cache.register_dependency (lhs, op2); - } - -- if (gimple_code (s) == GIMPLE_ASSIGN -- && gimple_assign_rhs_code (s) == ADDR_EXPR) -- return range_of_address (r, s); -+ if (range_of_non_trivial_assignment (r, s)) -+ return true; - - if (range_of_expr (range1, op1, s)) - { -@@ -447,84 +446,48 @@ gimple_ranger::range_of_range_op (irange - return true; - } - --// Calculate the range of an assignment containing an ADDR_EXPR. -+// Calculate the range of a non-trivial assignment. That is, is one -+// inolving arithmetic on an SSA name (for example, an ADDR_EXPR). - // Return the range in R. --// If a range cannot be calculated, set it to VARYING and return true. -+// -+// If a range cannot be calculated, return false. - - bool --gimple_ranger::range_of_address (irange &r, gimple *stmt) -+gimple_ranger::range_of_non_trivial_assignment (irange &r, gimple *stmt) - { -- gcc_checking_assert (gimple_code (stmt) == GIMPLE_ASSIGN); -- gcc_checking_assert (gimple_assign_rhs_code (stmt) == ADDR_EXPR); -+ if (gimple_code (stmt) != GIMPLE_ASSIGN) -+ return false; - -- bool strict_overflow_p; -- tree expr = gimple_assign_rhs1 (stmt); -- poly_int64 bitsize, bitpos; -- tree offset; -- machine_mode mode; -- int unsignedp, reversep, volatilep; -- tree base = get_inner_reference (TREE_OPERAND (expr, 0), &bitsize, -- &bitpos, &offset, &mode, &unsignedp, -- &reversep, &volatilep); -- -- -- if (base != NULL_TREE -- && TREE_CODE (base) == MEM_REF -- && TREE_CODE (TREE_OPERAND (base, 0)) == SSA_NAME) -+ tree base = gimple_range_base_of_assignment (stmt); -+ if (base) - { -- tree ssa = TREE_OPERAND (base, 0); -- gcc_checking_assert (irange::supports_type_p (TREE_TYPE (ssa))); -- range_of_expr (r, ssa, stmt); -- range_cast (r, TREE_TYPE (gimple_assign_rhs1 (stmt))); -- -- poly_offset_int off = 0; -- bool off_cst = false; -- if (offset == NULL_TREE || TREE_CODE (offset) == INTEGER_CST) -+ if (TREE_CODE (base) == MEM_REF) - { -- off = mem_ref_offset (base); -- if (offset) -- off += poly_offset_int::from (wi::to_poly_wide (offset), -- SIGNED); -- off <<= LOG2_BITS_PER_UNIT; -- off += bitpos; -- off_cst = true; -+ if (TREE_CODE (TREE_OPERAND (base, 0)) == SSA_NAME) -+ { -+ int_range_max range1; -+ tree ssa = TREE_OPERAND (base, 0); -+ if (range_of_expr (range1, ssa, stmt)) -+ { -+ tree type = TREE_TYPE (ssa); -+ range_operator *op = range_op_handler (POINTER_PLUS_EXPR, -+ type); -+ int_range<2> offset (TREE_OPERAND (base, 1), -+ TREE_OPERAND (base, 1)); -+ op->fold_range (r, type, range1, offset); -+ return true; -+ } -+ } -+ return false; - } -- /* If &X->a is equal to X, the range of X is the result. */ -- if (off_cst && known_eq (off, 0)) -- return true; -- else if (flag_delete_null_pointer_checks -- && !TYPE_OVERFLOW_WRAPS (TREE_TYPE (expr))) -- { -- /* For -fdelete-null-pointer-checks -fno-wrapv-pointer we don't -- allow going from non-NULL pointer to NULL. */ -- if(!range_includes_zero_p (&r)) -- return true; -- } -- /* If MEM_REF has a "positive" offset, consider it non-NULL -- always, for -fdelete-null-pointer-checks also "negative" -- ones. Punt for unknown offsets (e.g. variable ones). */ -- if (!TYPE_OVERFLOW_WRAPS (TREE_TYPE (expr)) -- && off_cst -- && known_ne (off, 0) -- && (flag_delete_null_pointer_checks || known_gt (off, 0))) -+ if (gimple_assign_rhs_code (stmt) == ADDR_EXPR) - { -+ // Handle "= &a" and return non-zero. - r = range_nonzero (TREE_TYPE (gimple_assign_rhs1 (stmt))); - return true; - } -- r = int_range<2> (TREE_TYPE (gimple_assign_rhs1 (stmt))); -- return true; -- } -- -- // Handle "= &a". -- if (tree_single_nonzero_warnv_p (expr, &strict_overflow_p)) -- { -- r = range_nonzero (TREE_TYPE (gimple_assign_rhs1 (stmt))); -- return true; - } -- -- // Otherwise return varying. -- r = int_range<2> (TREE_TYPE (gimple_assign_rhs1 (stmt))); -- return true; -+ return false; - } - - // Calculate a range for phi statement S and return it in R. ---- a/gcc/gimple-range.h -+++ b/gcc/gimple-range.h -@@ -62,7 +62,7 @@ protected: - ranger_cache m_cache; - private: - bool range_of_phi (irange &r, gphi *phi); -- bool range_of_address (irange &r, gimple *s); -+ bool range_of_non_trivial_assignment (irange &r, gimple *s); - bool range_of_builtin_call (irange &r, gcall *call); - bool range_with_loop_info (irange &r, tree name); - void range_of_ssa_name_with_loop_info (irange &, tree, class loop *, ---- a/gcc/range-op.cc -+++ b/gcc/range-op.cc -@@ -3447,7 +3447,6 @@ pointer_table::pointer_table () - set (GT_EXPR, op_gt); - set (GE_EXPR, op_ge); - set (SSA_NAME, op_identity); -- set (INTEGER_CST, op_integer_cst); - set (ADDR_EXPR, op_addr); - set (NOP_EXPR, op_convert); - set (CONVERT_EXPR, op_convert); diff --git a/toolchain/gcc/patches/11.2.0/001-v11.3.0-ranger-Fix-up-fold_using_range-range_of_address-PR10.patch b/toolchain/gcc/patches/11.2.0/001-v11.3.0-ranger-Fix-up-fold_using_range-range_of_address-PR10.patch new file mode 100644 index 000000000000..71bbfe5a1df1 --- /dev/null +++ b/toolchain/gcc/patches/11.2.0/001-v11.3.0-ranger-Fix-up-fold_using_range-range_of_address-PR10.patch @@ -0,0 +1,114 @@ +From a6219e8e0719b14f474b0dcaa7bde2f4e57474f9 Mon Sep 17 00:00:00 2001 +From: Jakub Jelinek +Date: Wed, 17 Nov 2021 13:45:53 +0100 +Subject: [PATCH] ranger: Fix up fold_using_range::range_of_address [PR103255] + +If on &base->member the offset isn't constant or isn't zero and +-fdelete-null-pointer-checks and not -fwrapv-pointer and base has a range +that doesn't include NULL, we return the range of the base. +Usually it isn't a big deal, because for most pointers we just use +varying, range_zero and range_nonzero ranges and nothing beyond that, +but if a pointer is initialized from a constant, we actually track the +exact range and in that case this causes miscompilation. +As discussed on IRC, I think doing something like: + offset_int off2; + if (off_cst && off.is_constant (&off2)) + { + tree cst = wide_int_to_tree (sizetype, off2 / BITS_PER_UNIT); + // adjust range r with POINTER_PLUS_EXPR cst + if (!range_includes_zero_p (&r)) + return true; + } + // Fallback + r = range_nonzero (TREE_TYPE (gimple_assign_rhs1 (stmt))); + return true; +could work, given that most of the pointer ranges are just the simple ones +perhaps it is too much for little benefit. + +2021-11-17 Jakub Jelinek + + PR tree-optimization/103255 + * gimple-range.cc (fold_using_range::range_of_address): Return + range_nonzero rather than unadjusted base's range. Formatting fixes. + + * gcc.c-torture/execute/pr103255.c: New test. + +(cherry picked from commit c39cb6bf835ca12e590eaa6f90222e51be207c50) +--- + gcc/gimple-range.cc | 16 +++++--- + .../gcc.c-torture/execute/pr103255.c | 41 +++++++++++++++++++ + 2 files changed, 52 insertions(+), 5 deletions(-) + create mode 100644 gcc/testsuite/gcc.c-torture/execute/pr103255.c + +--- a/gcc/gimple-range.cc ++++ b/gcc/gimple-range.cc +@@ -491,14 +491,20 @@ gimple_ranger::range_of_address (irange + } + /* If &X->a is equal to X, the range of X is the result. */ + if (off_cst && known_eq (off, 0)) +- return true; ++ return true; + else if (flag_delete_null_pointer_checks + && !TYPE_OVERFLOW_WRAPS (TREE_TYPE (expr))) + { +- /* For -fdelete-null-pointer-checks -fno-wrapv-pointer we don't +- allow going from non-NULL pointer to NULL. */ +- if(!range_includes_zero_p (&r)) +- return true; ++ /* For -fdelete-null-pointer-checks -fno-wrapv-pointer we don't ++ allow going from non-NULL pointer to NULL. */ ++ if (!range_includes_zero_p (&r)) ++ { ++ /* We could here instead adjust r by off >> LOG2_BITS_PER_UNIT ++ using POINTER_PLUS_EXPR if off_cst and just fall back to ++ this. */ ++ r = range_nonzero (TREE_TYPE (gimple_assign_rhs1 (stmt))); ++ return true; ++ } + } + /* If MEM_REF has a "positive" offset, consider it non-NULL + always, for -fdelete-null-pointer-checks also "negative" +--- /dev/null ++++ b/gcc/testsuite/gcc.c-torture/execute/pr103255.c +@@ -0,0 +1,41 @@ ++/* PR tree-optimization/103255 */ ++ ++struct H ++{ ++ unsigned a; ++ unsigned b; ++ unsigned c; ++}; ++ ++#if __SIZEOF_POINTER__ >= 4 ++#define ADDR 0x400000 ++#else ++#define ADDR 0x4000 ++#endif ++#define OFF 0x20 ++ ++int ++main () ++{ ++ struct H *h = 0; ++ unsigned long o; ++ volatile int t = 1; ++ ++ for (o = OFF; o <= OFF; o += 0x1000) ++ { ++ struct H *u; ++ u = (struct H *) (ADDR + o); ++ if (t) ++ { ++ h = u; ++ break; ++ } ++ } ++ ++ if (h == 0) ++ return 0; ++ unsigned *tt = &h->b; ++ if ((__SIZE_TYPE__) tt != (ADDR + OFF + __builtin_offsetof (struct H, b))) ++ __builtin_abort (); ++ return 0; ++} From patchwork Wed Dec 8 01:28:23 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ilya Lipnitskiy X-Patchwork-Id: 1565040 X-Patchwork-Delegate: hauke@hauke-m.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: bilbo.ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=bombadil.20210309 header.b=U0hoqucl; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20210112 header.b=mVqkPQ+P; dkim-atps=neutral Authentication-Results: ozlabs.org; spf=none (no SPF record) smtp.mailfrom=lists.openwrt.org (client-ip=2607:7c80:54:e::133; helo=bombadil.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Received: from bombadil.infradead.org (bombadil.infradead.org [IPv6:2607:7c80:54:e::133]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4J808C1QQhz9ssD for ; Wed, 8 Dec 2021 12:34:35 +1100 (AEDT) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=PWiFYTC9LtOTX/u3lDe2PKP5lbilEDx1fTsKVurb/Sc=; b=U0hoquclqnc/MJ xMFQ1hQNjIsTA554bXe5CUJt46A3mN22g9asVcBM/ZQgxOneWZxA6YWMbCArTmNgipzknVL+ahEWL kSkwUgdKmVHrt2+DcYvEH7ir6friz3dZh157Q+HiqEofKX+KplabN9RdEag/yHYxaH+sYUc5rnqR2 aOWEonR/lctfxbTc2slmRgEUUUe7SV+zH+6oFeh64LvuRVpu4YuvTjYfo3PAza4NaNdj8mQ3uqb07 liTfLMZeJve4CNkl/lz8oH8twOUlNcIrMjWGbJw2Qh9LC2oYjupFDWiQKaff/qtptKgmi20ZPg77u WqtIPOiteGaGJb3KLExg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1mulnS-00AYFX-Fj; Wed, 08 Dec 2021 01:31:02 +0000 Received: from mail-pf1-x433.google.com ([2607:f8b0:4864:20::433]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1mulmn-00AYAo-3y for openwrt-devel@lists.openwrt.org; Wed, 08 Dec 2021 01:30:23 +0000 Received: by mail-pf1-x433.google.com with SMTP id o4so1012656pfp.13 for ; Tue, 07 Dec 2021 17:30:20 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=VSZYW8mi1vVc7H7JWUpYyIYr/JFyKpanbsDBho9SyTA=; b=mVqkPQ+PUr4nTYpM8l+AdmGGcsL4P0lsalfZQRPjwxj3zx6qT3YtyUWjusjEVE7xap vMUyk1Hepwxqj8THBXHrblAcMPD2Nc/8FzrMOmlNvKd8x0Udh/BR4Xk21m8a1u9HJAVb U0b5fDpbUX5fH659QTKg16gefiRtSAmfiSE3qwz+uLKw+OkMDz7sG4TgsOK225QrTRzu Xo/jTl5rn4tKDQPgUwDXZckXKg5gItY2UbHazQ2pHr6E8mtGTkqb462Ikr8KFrP/wFpe WLcVGCmDwlAqXjOJEYdCSrjg5H3Zl5wAU3fkbSeB6TaqGKFPLRMjD9olk/BtM8RinpcQ 9sEQ== 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:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=VSZYW8mi1vVc7H7JWUpYyIYr/JFyKpanbsDBho9SyTA=; b=SL6NTF4IDxhYSSibk1Xy5fMLCxAsvOi5ggAu1way4LFUePblyPU42XkLLvepC1tTbH 4dlg3r8+aSpmumYjh9TE+HIBY5fWnldctjieBCOJOGfoefGUV5cdivn0sS6fb2xIXCtA o0neJYY9qbqARvHa3f0bDRqlP/IHnWsZidAK8wYKTwFst/2ruJFfbpef7BsJVcCxFP9v so10E1O/defmADxmojHjdkBCeuLLHjUdksV64xSR26ZNc8dK2GtzqFhBnJy6K6EWr/En i9V83BfDCLtKAfTMuo0n7+BT76jRz3N0S+7nhVw3j5Osl6vLWcvBganY4EG/Qgj6zUK4 ZT5w== X-Gm-Message-State: AOAM532LOgsrvsGDvWOBZ+HIJc5si4+X6O4EDeAXvavJqD8AmTI2qg6k UsSxj25J5ifw+ZhUPzz279yuzJeGv3Y= X-Google-Smtp-Source: ABdhPJx+VqWiR/icn0A9Nlj+eIOx47waAmHsXikGIadJr050T3VLSOoLx0andcTYbXrv6QrGa/Dhdw== X-Received: by 2002:aa7:9acc:0:b0:4a2:b8b5:8813 with SMTP id x12-20020aa79acc000000b004a2b8b58813mr2714883pfp.4.1638927020116; Tue, 07 Dec 2021 17:30:20 -0800 (PST) Received: from z640-arch.lan ([2602:61:736c:4300::9d4]) by smtp.gmail.com with ESMTPSA id t131sm647085pgb.31.2021.12.07.17.30.18 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 07 Dec 2021 17:30:19 -0800 (PST) From: Ilya Lipnitskiy To: openwrt-devel Cc: Ilya Lipnitskiy Subject: [PATCH 3/3] toolchain/gcc: refresh gcc-11.2.0 patch Date: Tue, 7 Dec 2021 17:28:23 -0800 Message-Id: <20211208012823.202082-4-ilya.lipnitskiy@gmail.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20211208012823.202082-1-ilya.lipnitskiy@gmail.com> References: <20211208012823.202082-1-ilya.lipnitskiy@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20211207_173021_207196_33232FDF X-CRM114-Status: UNSURE ( 8.90 ) X-CRM114-Notice: Please train this message. X-Spam-Score: -0.2 (/) X-Spam-Report: Spam detection software, running on the system "bombadil.infradead.org", has NOT identified this incoming email as spam. The original message has been attached to this so you can view it or label similar future email. If you have any questions, see the administrator of that system for details. Content preview: Run make toolchain/gcc/minimal/refresh (with glibc, with musl toolchain/gcc/{initial, final}/refresh don't work) Fixes: ab241e0937c9 ("toolchain/gcc: fix build on MacOS arm64") Signed-off-by: Ilya Lipnitskiy --- .../patches/11.2.0/970-macos_arm64-building-fix.patch | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) Content analysis details: (-0.2 points, 5.0 required) pts rule name description ---- ---------------------- -------------------------------------------------- -0.0 RCVD_IN_DNSWL_NONE RBL: Sender listed at https://www.dnswl.org/, no trust [2607:f8b0:4864:20:0:0:0:433 listed in] [list.dnswl.org] -0.0 SPF_PASS SPF: sender matches SPF record 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [ilya.lipnitskiy[at]gmail.com] -0.1 DKIM_VALID_AU Message has a valid DKIM or DK signature from author's domain -0.1 DKIM_VALID Message has at least one valid DKIM or DK signature 0.1 DKIM_SIGNED Message has a DKIM or DK signature, not necessarily valid -0.1 DKIM_VALID_EF Message has a valid DKIM or DK signature from envelope-from domain X-BeenThere: openwrt-devel@lists.openwrt.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org Run make toolchain/gcc/minimal/refresh (with glibc, with musl toolchain/gcc/{initial,final}/refresh don't work) Fixes: ab241e0937c9 ("toolchain/gcc: fix build on MacOS arm64") Signed-off-by: Ilya Lipnitskiy --- .../patches/11.2.0/970-macos_arm64-building-fix.patch | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/toolchain/gcc/patches/11.2.0/970-macos_arm64-building-fix.patch b/toolchain/gcc/patches/11.2.0/970-macos_arm64-building-fix.patch index 6572b8e55900..424899eb9cb8 100644 --- a/toolchain/gcc/patches/11.2.0/970-macos_arm64-building-fix.patch +++ b/toolchain/gcc/patches/11.2.0/970-macos_arm64-building-fix.patch @@ -15,11 +15,9 @@ Date: Mon Aug 16 13:16:21 2021 +0100 Reviewed-by: John Scipione Reviewed-by: Adrien Destugues -diff --git a/gcc/config/aarch64/aarch64.h b/gcc/config/aarch64/aarch64.h -index 976f9afae5..736b83ff0b 100644 --- a/gcc/config/aarch64/aarch64.h +++ b/gcc/config/aarch64/aarch64.h -@@ -1000,7 +1000,7 @@ extern const char *aarch64_rewrite_mcpu (int argc, const char **argv); +@@ -1236,7 +1236,7 @@ extern const char *aarch64_rewrite_mcpu #define MCPU_TO_MARCH_SPEC_FUNCTIONS \ { "rewrite_mcpu", aarch64_rewrite_mcpu }, @@ -28,8 +26,6 @@ index 976f9afae5..736b83ff0b 100644 extern const char *host_detect_local_cpu (int argc, const char **argv); #define HAVE_LOCAL_CPU_DETECT # define EXTRA_SPEC_FUNCTIONS \ -diff --git a/gcc/config/host-darwin.c b/gcc/config/host-darwin.c -index 8f700eec85..b737abc006 100644 --- a/gcc/config/host-darwin.c +++ b/gcc/config/host-darwin.c @@ -22,6 +22,8 @@ @@ -40,8 +36,8 @@ index 8f700eec85..b737abc006 100644 +#include "hosthooks-def.h" /* Yes, this is really supposed to work. */ - static char pch_address_space[1024*1024*1024] __attribute__((aligned (4096))); -@@ -75,3 +77,5 @@ darwin_gt_pch_use_address (void *addr, size_t sz, int fd, size_t off) + /* This allows for a pagesize of 16384, which we have on Darwin20, but should +@@ -79,3 +81,5 @@ darwin_gt_pch_use_address (void *addr, s return ret; }