* [Buildroot] [PATCH 1/1] package/i7z: fix build with gcc 10
@ 2021-01-19 6:53 Fabrice Fontaine
2021-01-19 7:01 ` Baruch Siach
0 siblings, 1 reply; 2+ messages in thread
From: Fabrice Fontaine @ 2021-01-19 6:53 UTC (permalink / raw)
To: buildroot
Fixes:
- http://autobuild.buildroot.org/results/1a433611ba8676cf1ca276fccaf3633971bd562e
Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
---
package/i7z/0001-fix-build-with-gcc-10.patch | 50 ++++++++++++++++++++
1 file changed, 50 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..ee10310000
--- /dev/null
+++ b/package/i7z/0001-fix-build-with-gcc-10.patch
@@ -0,0 +1,50 @@
+From 5be260153ff1145e3e0c0574324db9af3e00298f Mon Sep 17 00:00:00 2001
+From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
+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 <fontaine.fabrice@gmail.com>
+[Upstream status: https://github.com/ajaiantilal/i7z/pull/27]
+---
+ i7z_Dual_Socket.c | 2 +-
+ i7z_Single_Socket.c | 2 +-
+ 2 files changed, 2 insertions(+), 2 deletions(-)
+
+diff --git a/i7z_Dual_Socket.c b/i7z_Dual_Socket.c
+index 1388339..4a67c43 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;
++static 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..df8d35e 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;
++static struct timespec global_ts;
+
+ extern char* CPU_FREQUENCY_LOGGING_FILE_single;
+ extern char* CPU_FREQUENCY_LOGGING_FILE_dual;
+--
+2.29.2
+
--
2.29.2
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [Buildroot] [PATCH 1/1] package/i7z: fix build with gcc 10
2021-01-19 6:53 [Buildroot] [PATCH 1/1] package/i7z: fix build with gcc 10 Fabrice Fontaine
@ 2021-01-19 7:01 ` Baruch Siach
0 siblings, 0 replies; 2+ messages in thread
From: Baruch Siach @ 2021-01-19 7:01 UTC (permalink / raw)
To: buildroot
Hi Fabrice,
On Tue, Jan 19 2021, Fabrice Fontaine wrote:
> Fixes:
> - http://autobuild.buildroot.org/results/1a433611ba8676cf1ca276fccaf3633971bd562e
>
> Signed-off-by: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> ---
> package/i7z/0001-fix-build-with-gcc-10.patch | 50 ++++++++++++++++++++
> 1 file changed, 50 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..ee10310000
> --- /dev/null
> +++ b/package/i7z/0001-fix-build-with-gcc-10.patch
> @@ -0,0 +1,50 @@
> +From 5be260153ff1145e3e0c0574324db9af3e00298f Mon Sep 17 00:00:00 2001
> +From: Fabrice Fontaine <fontaine.fabrice@gmail.com>
> +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 <fontaine.fabrice@gmail.com>
> +[Upstream status: https://github.com/ajaiantilal/i7z/pull/27]
> +---
> + i7z_Dual_Socket.c | 2 +-
> + i7z_Single_Socket.c | 2 +-
> + 2 files changed, 2 insertions(+), 2 deletions(-)
> +
> +diff --git a/i7z_Dual_Socket.c b/i7z_Dual_Socket.c
> +index 1388339..4a67c43 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;
> ++static 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..df8d35e 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;
> ++static struct timespec global_ts;
Are you sure this is correct? This struct is not global anymore. You
have a separate struct for each file.
Maybe make one of them extern instead?
baruch
> +
> + extern char* CPU_FREQUENCY_LOGGING_FILE_single;
> + extern char* CPU_FREQUENCY_LOGGING_FILE_dual;
> +--
> +2.29.2
> +
--
~. .~ Tk Open Systems
=}------------------------------------------------ooO--U--Ooo------------{=
- baruch at tkos.co.il - tel: +972.52.368.4656, http://www.tkos.co.il -
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-01-19 7:01 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-19 6:53 [Buildroot] [PATCH 1/1] package/i7z: fix build with gcc 10 Fabrice Fontaine
2021-01-19 7:01 ` Baruch Siach
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.