From patchwork Tue Jan 19 07:53:00 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Fabrice Fontaine X-Patchwork-Id: 1428510 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; 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=tgHgTgJy; 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 4DKgs36m9mz9sCq for ; Tue, 19 Jan 2021 18:53:59 +1100 (AEDT) Received: from localhost (localhost [127.0.0.1]) by silver.osuosl.org (Postfix) with ESMTP id C0B59274AA; Tue, 19 Jan 2021 07:53:55 +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 uDIULewK3doL; Tue, 19 Jan 2021 07:53:54 +0000 (UTC) Received: from ash.osuosl.org (ash.osuosl.org [140.211.166.34]) by silver.osuosl.org (Postfix) with ESMTP id 8D9F62741E; Tue, 19 Jan 2021 07:53:53 +0000 (UTC) X-Original-To: buildroot@lists.busybox.net Delivered-To: buildroot@osuosl.org Received: from fraxinus.osuosl.org (smtp4.osuosl.org [140.211.166.137]) by ash.osuosl.org (Postfix) with ESMTP id 071651BF57B for ; Tue, 19 Jan 2021 07:53:52 +0000 (UTC) Received: from localhost (localhost [127.0.0.1]) by fraxinus.osuosl.org (Postfix) with ESMTP id 033D685F87 for ; Tue, 19 Jan 2021 07:53:52 +0000 (UTC) X-Virus-Scanned: amavisd-new at osuosl.org Received: from fraxinus.osuosl.org ([127.0.0.1]) by localhost (.osuosl.org [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id Aj8io5ZvOSNb for ; Tue, 19 Jan 2021 07:53:51 +0000 (UTC) X-Greylist: domain auto-whitelisted by SQLgrey-1.7.6 Received: from mail-wm1-f42.google.com (mail-wm1-f42.google.com [209.85.128.42]) by fraxinus.osuosl.org (Postfix) with ESMTPS id 1241185F09 for ; Tue, 19 Jan 2021 07:53:51 +0000 (UTC) Received: by mail-wm1-f42.google.com with SMTP id 190so15609256wmz.0 for ; Mon, 18 Jan 2021 23:53:50 -0800 (PST) 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=NHctz9B077c0C56DsenSydfBIEW+ksCLlaN7Wa+gwiw=; b=tgHgTgJyQxIsZDomCaxejod61JvD/XpeKbuCY8+5LdTvt6PAd4SfEdyMSH9QtYnzL8 MEXvLLRZV7BNFECp9GGuNyoZNZStO65/CBG7MA32RP3kMnKUVBBrxvUn1x5YzDhC/tOj zzll9soCOjKGkEYtp5lfubOkSI6jJ5UVcIO4Z0nJGHe2WPa9CXwqviIB4aYBCpNvnKgX q3HPaKMWXJ1W+RT3mkjhcCC1nOOAKzpmD5RVN4dzhkuvtrYJEX8ur95hrWwpfPVV3Oan MJFz+A+xA5hh4MIEaQpuQmM+TEc6v+ftqHuPpBGVgguWGgDbErGQP3dsst+U8ap00km7 PSsw== 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=NHctz9B077c0C56DsenSydfBIEW+ksCLlaN7Wa+gwiw=; b=sm9GQ1jXkMA5n2QwfFqPk3v+xMReXSleEQgtKi9/VrWPMxN2AHc120x4VvZ8mIOyV3 iPgOaWIGTmpn1+9uKSfdXcuY8WV9pab+5efV7T+IzNkTNj8rDf9Ao0QXDJL1OOPlYh47 zlAV4dVMAwfO3YoaJj//4ddWjH7VpC8nScrIU8kWltRGPhrGH+5mVOEVdZ1TWfcprf4A BVSkiUlzanzHwP8FpVi7obRq5CEe6TspR9lxBpxS04O8KAUkrupfx0RjyrPLhy6tSuPl hla74DTSryRjLgV2m+9ozMQNsF8Y6Fjqw0VWYg/ddchYyhnI76fWC+H9smMsb0AozbCi KiOg== X-Gm-Message-State: AOAM531uWsOpwporUSUKLpWjKt3MUZ6od40eenz2w/gfIX/sWSCrujAS qq40ERoFkGE2PsH69VisqtZnKTNWGFmtpw== X-Google-Smtp-Source: ABdhPJwIhFynsUrbiQ2ULhA+f9l6kCAVgf5uwEwobIsAZhjWezLL7wpNWzG2RtvoRpcn2kpLiTki2Q== X-Received: by 2002:a1c:7304:: with SMTP id d4mr2879013wmb.153.1611042829276; Mon, 18 Jan 2021 23:53:49 -0800 (PST) Received: from kali.home (2a01cb0881b76d00c2afd0dfa851d2b9.ipv6.abo.wanadoo.fr. [2a01:cb08:81b7:6d00:c2af:d0df:a851:d2b9]) by smtp.gmail.com with ESMTPSA id c6sm37595134wrh.7.2021.01.18.23.53.48 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 18 Jan 2021 23:53:48 -0800 (PST) From: Fabrice Fontaine To: buildroot@buildroot.org Date: Tue, 19 Jan 2021 08:53:00 +0100 Message-Id: <20210119075300.790235-1-fontaine.fabrice@gmail.com> X-Mailer: git-send-email 2.29.2 MIME-Version: 1.0 Subject: [Buildroot] [PATCH v2,1/1] package/i7z: fix build with gcc 10 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: Fabrice Fontaine , =?utf-8?q?Vincent_Stehl?= =?utf-8?q?=C3=A9?= Errors-To: buildroot-bounces@busybox.net Sender: "buildroot" Fixes: - http://autobuild.buildroot.org/results/1a433611ba8676cf1ca276fccaf3633971bd562e Signed-off-by: Fabrice Fontaine --- Changes v1 -> v2 (after review of Baruch Siach): - Use extern instead of static package/i7z/0001-fix-build-with-gcc-10.patch | 63 ++++++++++++++++++++ 1 file changed, 63 insertions(+) create mode 100644 package/i7z/0001-fix-build-with-gcc-10.patch diff --git a/package/i7z/0001-fix-build-with-gcc-10.patch b/package/i7z/0001-fix-build-with-gcc-10.patch new file mode 100644 index 0000000000..a25e937b07 --- /dev/null +++ b/package/i7z/0001-fix-build-with-gcc-10.patch @@ -0,0 +1,63 @@ +From 6e4e407a374512b5bcb5a7c184258653e472ef9f Mon Sep 17 00:00:00 2001 +From: Fabrice Fontaine +Date: Tue, 19 Jan 2021 07:47:58 +0100 +Subject: [PATCH] fix build with gcc 10 + +Fix the following build failure with gcc 10 (which defaults to +-fno-common): + +/home/buildroot/autobuild/instance-2/output-1/host/bin/x86_64-linux-gcc -D_LARGEFILE_SOURCE -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64 -Os -fno-schedule-insns2 -fno-schedule-insns -fno-inline-small-functions -fno-caller-saves -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -DBUILD_MAIN -Wimplicit-function-declaration -Dx64_BIT -o i7z i7z.o helper_functions.o i7z_Single_Socket.o i7z_Dual_Socket.o -lncurses -lpthread -lrt -lm +/home/buildroot/autobuild/instance-2/output-1/host/opt/ext-toolchain/bin/../lib/gcc/x86_64-buildroot-linux-gnu/10.2.0/../../../../x86_64-buildroot-linux-gnu/bin/ld: i7z_Dual_Socket.o:(.bss+0x0): multiple definition of `global_ts'; i7z_Single_Socket.o:(.bss+0x0): first defined here + +Fixes: + - http://autobuild.buildroot.org/results/1a433611ba8676cf1ca276fccaf3633971bd562e + +Signed-off-by: Fabrice Fontaine +[Upstream status: https://github.com/ajaiantilal/i7z/pull/27] +--- + i7z.c | 1 + + i7z_Dual_Socket.c | 2 +- + i7z_Single_Socket.c | 2 +- + 3 files changed, 3 insertions(+), 2 deletions(-) + +diff --git a/i7z.c b/i7z.c +index 61e2757..910a608 100644 +--- a/i7z.c ++++ b/i7z.c +@@ -34,6 +34,7 @@ int Dual_Socket(); + + int socket_0_num=0, socket_1_num=1; + bool use_ncurses = true; ++struct timespec global_ts; + + /////////////////////LOGGING TO FILE//////////////////////////////////////// + FILE *fp_log_file_freq; +diff --git a/i7z_Dual_Socket.c b/i7z_Dual_Socket.c +index 1388339..ceafdce 100644 +--- a/i7z_Dual_Socket.c ++++ b/i7z_Dual_Socket.c +@@ -37,7 +37,7 @@ float Read_Voltage_CPU(int cpu_num); + extern struct program_options prog_options; + FILE *fp_log_file; + +-struct timespec global_ts; ++extern struct timespec global_ts; + extern FILE *fp_log_file_freq_1, *fp_log_file_freq_2; + + extern char* CPU_FREQUENCY_LOGGING_FILE_single; +diff --git a/i7z_Single_Socket.c b/i7z_Single_Socket.c +index 16e98c1..b7266e6 100644 +--- a/i7z_Single_Socket.c ++++ b/i7z_Single_Socket.c +@@ -35,7 +35,7 @@ int Read_Thermal_Status_CPU(int cpu_num); + extern struct program_options prog_options; + extern FILE *fp_log_file_freq; + +-struct timespec global_ts; ++extern struct timespec global_ts; + + extern char* CPU_FREQUENCY_LOGGING_FILE_single; + extern char* CPU_FREQUENCY_LOGGING_FILE_dual; +-- +2.29.2 +