From patchwork Tue May 19 06:53:21 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Heiko Thiery X-Patchwork-Id: 1293002 Return-Path: X-Original-To: incoming-buildroot@patchwork.ozlabs.org Delivered-To: patchwork-incoming-buildroot@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=busybox.net (client-ip=140.211.166.136; helo=silver.osuosl.org; envelope-from=buildroot-bounces@busybox.net; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: ozlabs.org; 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=IDe96wuv; dkim-atps=neutral Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ozlabs.org (Postfix) with ESMTPS id 49R66l50D9z9sT4 for ; Tue, 19 May 2020 16:53:51 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id C481B20438; Tue, 19 May 2020 06:53:48 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id tUp2CyfcMrnx; Tue, 19 May 2020 06:53:47 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 2ECE62049A; Tue, 19 May 2020 06:53:47 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from silver.osuosl.org (smtp3.osuosl.org [140.211.166.136]) by ash.osuosl.org (Postfix) with ESMTP id B168C1BF2FF for ; Tue, 19 May 2020 06:53:45 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id 9B70D2049A for ; Tue, 19 May 2020 06:53:45 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from silver.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id J+5vF2UHwsUp for ; Tue, 19 May 2020 06:53:44 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wr1-f67.google.com (mail-wr1-f67.google.com [209.85.221.67]) by silver.osuosl.org (Postfix) with ESMTPS id 1459320438 for ; Tue, 19 May 2020 06:53:44 +0000 (UTC) Received: by mail-wr1-f67.google.com with SMTP id l17so14545289wrr.4 for ; Mon, 18 May 2020 23:53:43 -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=ALH2wpL6dgcOlODGJwGe425FgB9gkLebfa+Dtkrh7xA=; b=IDe96wuvkWY+3RosrVrqjrkNA0DWWrglQh3AiueIGWTjWecULv3IHP/sQzpr7lBDKC jQplDLOA90kAI8G4RMCsOIqYrkx9/vujT/0fakngguETirBxFQNN64jDYt+g6lntSM9Q g7nst3cSafFCSEVhKbDllBX591AhI7kFar0bBKzrygmymYuLl/+AzyAR4eSgbwOAUfg5 l+qRYCpX9tqWEpdAnXaRP7VX3yiQrNrh/y4YNSOY8Dwu8AUKeEk6YRStaqsOfBMlTJAR rnH3kfDydBRbKFyog6wlvCS+G79XbuHHAIIgCtImN3t+oSpLWdl4ppnLRPhBywwyfRd5 eyNg== 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=ALH2wpL6dgcOlODGJwGe425FgB9gkLebfa+Dtkrh7xA=; b=FSXc7D3nwGOgDhJm63jMic5/jfkof+ghcvEzFWcGevrkzaB8yA1/Dfb+iZyGXSfwOk TLB0PsyDTIhBGZIwLkWUyNzAOUcUd0NraYQffUDKvNH3gPuh/24oGoPpXCVdCUMCb9UW VOwdcvfPvWoEAkN9kUyNzlXgsXdgb+TdidcNR5Bev/gpDC9rx/0/hpSl3m1k2/efS8wA lz7VTarczjZEL6ZpLPkOf4IO9MuVqYmFpqguQ3F0WUM8oPqOGKAglGUZFZTeHd1Q9QYq aAQiBas2yWCdjmZ9Ja087iX/50WeEbaIKWzHMqgO8H288Lobi7TUuMV5YD57BvnM3pMD 3r+Q== X-Gm-Message-State: AOAM531zTfg4lsYKMBWHC2Q/Hjb79iJG67buGQLWBvTZKYMLQOpGoi7Y OyuEjGV/ZLB1+LcofZEccVXHzwaQ X-Google-Smtp-Source: ABdhPJy+pCFXRCp1JXw08aCIr/h6AlK04ONdmmyBuAIrbSptfHJNS+qahWZ12X/AZsdfaZ2Uj2WqiQ== X-Received: by 2002:adf:edc1:: with SMTP id v1mr23648016wro.125.1589871221864; Mon, 18 May 2020 23:53:41 -0700 (PDT) Received: from t450s.fritz.box (ip5b426f84.dynamic.kabel-deutschland.de. [91.66.111.132]) by smtp.gmail.com with ESMTPSA id l1sm20037878wrc.24.2020.05.18.23.53.40 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 May 2020 23:53:41 -0700 (PDT) From: Heiko Thiery To: buildroot@buildroot.org Date: Tue, 19 May 2020 08:53:21 +0200 Message-Id: <20200519065322.16403-1-heiko.thiery@gmail.com> X-Mailer: git-send-email 2.20.1 MIME-Version: 1.0 Subject: [Buildroot] [PATCH 1/1] package/vboot-utils: fix -fno-common build failure X-BeenThere: buildroot@busybox.net X-Mailman-Version: 2.1.29 Precedence: list List-Id: Discussion and development of buildroot List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: Heiko Thiery , Romain Naour Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Added upstream patch for fixing build failure when using GCC10 as a host compiler (-fno-common is now default). Fixes: http://autobuild.buildroot.net/results/aca662d9fd7052f3b361b731cd266edb3b6c41b0 http://autobuild.buildroot.net/results/6546b284cf306a2fde3c69d67daf9aacffa9e143 http://autobuild.buildroot.net/results/db20bb3c11a1a9558a5d8021015c6915f99097c8 Cc: Romain Naour Signed-off-by: Heiko Thiery --- ...-Make-vboot_version-extern-in-header.patch | 50 +++++++++++++++++++ 1 file changed, 50 insertions(+) create mode 100644 package/vboot-utils/0007-Make-vboot_version-extern-in-header.patch diff --git a/package/vboot-utils/0007-Make-vboot_version-extern-in-header.patch b/package/vboot-utils/0007-Make-vboot_version-extern-in-header.patch new file mode 100644 index 0000000000..6a3929f3c0 --- /dev/null +++ b/package/vboot-utils/0007-Make-vboot_version-extern-in-header.patch @@ -0,0 +1,50 @@ +From df4d2000a22db673a788b8e57e8e7c0cc3cee777 Mon Sep 17 00:00:00 2001 +From: Leonard Chan +Date: Thu, 3 Oct 2019 18:53:04 -0700 +Subject: [PATCH] Make vboot_version extern in header + +When enabling `-fno-common` in Fuchsia, we get a bunch of linker errors +when linking futility: + +``` +ld.lld: error: duplicate symbol: vboot_version +>>> defined at futility.h:43 (../../third_party/vboot_reference/futility/futility.h:43) +>>> host_x63-asan_no_detect_leaks/obj/third_party/vboot_reference/futility/futility.cmd_bdb.c.o:(vboot_version) +>>> defined at futility.h:43 (../../third_party/vboot_reference/futility/futility.h:43) +>>> host_x64-asan_no_detect_leaks/obj/third_party/vboot_reference/futility/futility.cmd_create.c.o:(.bss.vboot_version+0x0) +``` + +and think this is because -fno-common places vboot_version for +unitialized global variables in the BSS section of each object file. +Making it extern instead resolves each reference to its definition in +futility/misc.c. + +Change-Id: I591f07abd1f975a8a9d078bb4366e2e0861390b4 +Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/platform/vboot_reference/+/1839207 +Reviewed-by: Julius Werner +Reviewed-by: Joel Kitching +Commit-Queue: Julius Werner +Tested-by: Julius Werner + +Patch taken from upstream: https://chromium.googlesource.com/chromiumos/platform/vboot_reference/+/df4d2000a22db673a788b8e57e8e7c0cc3cee777 +Signed-off-by: Heiko Thiery +--- + futility/futility.h | 2 +- + 1 file changed, 1 insertion(+), 1 deletion(-) + +diff --git a/futility/futility.h b/futility/futility.h +index 3bce1106..5dc426dd 100644 +--- a/futility/futility.h ++++ b/futility/futility.h +@@ -41,7 +41,7 @@ enum vboot_version { + }; + + /* What's our preferred API & data format? */ +-enum vboot_version vboot_version; ++extern enum vboot_version vboot_version; + + /* Here's a structure to define the commands that futility implements. */ + struct futil_cmd_t { +-- +2.20.1 +