From patchwork Sun Aug 2 23:34:42 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luis Araneda X-Patchwork-Id: 1340051 X-Patchwork-Delegate: chunkeey@googlemail.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.openwrt.org (client-ip=2001:8b0:10b:1231::1; helo=merlin.infradead.org; envelope-from=openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; dkim=pass (2048-bit key; secure) header.d=lists.infradead.org header.i=@lists.infradead.org header.a=rsa-sha256 header.s=merlin.20170209 header.b=yM1jBIjU; dkim=fail reason="signature verification failed" (2048-bit key; unprotected) header.d=gmail.com header.i=@gmail.com header.a=rsa-sha256 header.s=20161025 header.b=mSLU5ymb; dkim-atps=neutral Received: from merlin.infradead.org (merlin.infradead.org [IPv6:2001:8b0:10b:1231::1]) (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 ozlabs.org (Postfix) with ESMTPS id 4BKcq564jkz9sRN for ; Mon, 3 Aug 2020 09:36:33 +1000 (AEST) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=merlin.20170209; h=Sender:Content-Transfer-Encoding: Content-Type:Cc:List-Subscribe:List-Help:List-Post:List-Archive: List-Unsubscribe:List-Id:MIME-Version:Message-Id:Date:Subject:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=8wMkQ8GCYUefOIp7npKFrsyaqxj/H/sEdVivxOJfxqM=; b=yM1jBIjUxCbrU/emR07tIn1XDA Sjct+eAnBGT4wGdcmF4ZdVcZTlwdWU+HCwwPAP+DD3RwfSIFMA+lZOetld7Pp3JnpQQWgg2cAdaJn P4NXYYuwirdiFWY0Gz/jGp6XnrB3xYAogIMRPevks3eTBa1jvaAkC7BeuJO0HwgaAKf8QApac2emc YahDGzg1QXlVCKfEM4ztSUz6vxc5IRN4PVhT54iOy54sR0foGbML5KLa5qy8LE82h07qCt7TMlNDv IvfR01tZajbrx8D+a1n0Hch/K6IJ9puptDk+KHUilqziXIs1dlZp+OvorVXtb2Pgi/Zi3Au31SkUJ i6VLJ+Dw==; Received: from localhost ([::1] helo=merlin.infradead.org) by merlin.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2NVQ-000309-GL; Sun, 02 Aug 2020 23:35:04 +0000 Received: from mail-qv1-xf44.google.com ([2607:f8b0:4864:20::f44]) by merlin.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1k2NVM-0002zc-U1 for openwrt-devel@lists.openwrt.org; Sun, 02 Aug 2020 23:35:01 +0000 Received: by mail-qv1-xf44.google.com with SMTP id dd12so11577400qvb.0 for ; Sun, 02 Aug 2020 16:34:58 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=2PQwKuhVl7ptTQxZorYzu4Pq99jNxtqkbvi/cFZSkk0=; b=mSLU5ymbY8X4BewPSWmj1crOBcMj9Bpzp2r0NbmkigW7ZxEeZGpm3pusn2Ucr6m3KK T2Ei12ZLSmsHbWF6xJibl6Kk3xjNhdrNtviQxKJxTSDOl9bhpvI31BzsRgLjLNvT8wT0 EIsgTDRnBo4BAnBh+7JabIfvH8FjdK1O26jxEIGspTcClNio3JbiAnBHiRIED5ORQ1PA oDHNMpKd+g1ab0Ne7Wb+s9AsCqsW8TZPJPiTg5u6XdZSVJJgInNMru0+YcmOgho/9LsA xXkEBZ3aD8uATxhLV9v8YW7CzJg7rlZ6Lq3hvb1CMP837OBcV4oAG526JiAMG5xBcdSx P7hg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:mime-version :content-transfer-encoding; bh=2PQwKuhVl7ptTQxZorYzu4Pq99jNxtqkbvi/cFZSkk0=; b=sBz3mlhXsfczgQ1wveesveHaE8/DIauZ/jwbgUnOIiGx8DWsZ1wr2KdI5vYZxtDLAy abbH+5jj8MRJKLS3s66Jf0+vqbN9EvFHWAcUy4QuJVI48if1ts7qoXvxHNYnJmO69r0w IhtEuEuswku0i5ozsehG3qLX0M/InrvSnvV1pZTLyodk1DU12dIgb6bUu1c50wIeQCkZ cnc+CfVkZZaZieHVQig1DFavLwnT9JhL/OLrif4KLPa+zuYz+pIVyXTt756WxJ3OxbbH voqgwUz1Ae6G8brXZ8Kq+zd0xjTmOCGeX9N9r4D8bQntEoxCG8HWHf0LJOFLjh2vndat BMhg== X-Gm-Message-State: AOAM5319kBAVSn9+fdPm5yCarkJpRF1vacK5aMJrfLTL2hRtgSa4vMmk YRG733xiFp/WqrOYVBQPRtuda57efMw= X-Google-Smtp-Source: ABdhPJxira1M263uKcxtsJ3rYsI3mGJccowZpB6iMitHxw6gZX/gm1tACf34E2cLwHFKhZLFznr7lA== X-Received: by 2002:a05:6214:12b4:: with SMTP id w20mr6036224qvu.32.1596411296537; Sun, 02 Aug 2020 16:34:56 -0700 (PDT) Received: from asus-S451LA.lan ([186.105.25.227]) by smtp.gmail.com with ESMTPSA id 139sm16868107qkl.13.2020.08.02.16.34.55 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 02 Aug 2020 16:34:56 -0700 (PDT) From: Luis Araneda To: openwrt-devel@lists.openwrt.org Subject: [OpenWrt-Devel] [PATCH] uboot-zynq: fix dtc compilation on host gcc 10 Date: Sun, 2 Aug 2020 19:34:42 -0400 Message-Id: <20200802233442.1621160-1-luaraneda@gmail.com> X-Mailer: git-send-email 2.28.0 MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200802_193501_023738_6A41F4B0 X-CRM114-Status: GOOD ( 14.92 ) X-Spam-Score: -0.2 (/) X-Spam-Report: SpamAssassin version 3.4.4 on merlin.infradead.org summary: Content analysis details: (-0.2 points) 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:f44 listed in] [list.dnswl.org] 0.0 FREEMAIL_FROM Sender email is commonly abused enduser mail provider [luaraneda[at]gmail.com] 0.0 SPF_HELO_NONE SPF: HELO does not publish an SPF Record -0.0 SPF_PASS SPF: sender matches SPF record -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_AU Message has a valid DKIM or DK signature from author's domain -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.29 Precedence: list List-Id: OpenWrt Development List List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Luis Araneda Sender: "openwrt-devel" Errors-To: openwrt-devel-bounces+incoming=patchwork.ozlabs.org@lists.openwrt.org gcc 10 defaults to -fno-common, which causes an error when linking. Back-port the following Linux kernel commit to fix it: e33a814e772c (scripts/dtc: Remove redundant YYLOC global declaration) Tested on an Arch Linux host with gcc 10.1.0 Signed-off-by: Luis Araneda --- ...10-fix_dtc_compilation_on_host_gcc10.patch | 48 +++++++++++++++++++ 1 file changed, 48 insertions(+) create mode 100644 package/boot/uboot-zynq/patches/010-fix_dtc_compilation_on_host_gcc10.patch diff --git a/package/boot/uboot-zynq/patches/010-fix_dtc_compilation_on_host_gcc10.patch b/package/boot/uboot-zynq/patches/010-fix_dtc_compilation_on_host_gcc10.patch new file mode 100644 index 0000000000..a4080e4ea9 --- /dev/null +++ b/package/boot/uboot-zynq/patches/010-fix_dtc_compilation_on_host_gcc10.patch @@ -0,0 +1,48 @@ +From e33a814e772cdc36436c8c188d8c42d019fda639 Mon Sep 17 00:00:00 2001 +From: Dirk Mueller +Date: Tue, 14 Jan 2020 18:53:41 +0100 +Subject: [PATCH] scripts/dtc: Remove redundant YYLOC global declaration + +gcc 10 will default to -fno-common, which causes this error at link +time: + + (.text+0x0): multiple definition of `yylloc'; dtc-lexer.lex.o (symbol from plugin):(.text+0x0): first defined here + +This is because both dtc-lexer as well as dtc-parser define the same +global symbol yyloc. Before with -fcommon those were merged into one +defintion. The proper solution would be to to mark this as "extern", +however that leads to: + + dtc-lexer.l:26:16: error: redundant redeclaration of 'yylloc' [-Werror=redundant-decls] + 26 | extern YYLTYPE yylloc; + | ^~~~~~ +In file included from dtc-lexer.l:24: +dtc-parser.tab.h:127:16: note: previous declaration of 'yylloc' was here + 127 | extern YYLTYPE yylloc; + | ^~~~~~ +cc1: all warnings being treated as errors + +which means the declaration is completely redundant and can just be +dropped. + +Signed-off-by: Dirk Mueller +Signed-off-by: David Gibson +[robh: cherry-pick from upstream] +Cc: stable@vger.kernel.org +Signed-off-by: Rob Herring +--- + scripts/dtc/dtc-lexer.l | 1 - + 1 file changed, 1 deletion(-) + +diff --git a/scripts/dtc/dtc-lexer.l b/scripts/dtc/dtc-lexer.l +index 5c6c3fd557d7f..b3b7270300de5 100644 +--- a/scripts/dtc/dtc-lexer.l ++++ b/scripts/dtc/dtc-lexer.l +@@ -38,7 +38,6 @@ LINECOMMENT "//".*\n + #include "srcpos.h" + #include "dtc-parser.tab.h" + +-YYLTYPE yylloc; + extern bool treesource_error; + + /* CAUTION: this will stop working if we ever use yyless() or yyunput() */